/* Base Styles & Variables */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.1);
    --secondary: #ec4899;
    --secondary-hover: #db2777;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f1f5f9;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --white: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.9);
    --backdrop: rgba(15, 23, 42, 0.8);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    font-size: 16px;
    line-height: 1.5;
    color: var(--dark);
    background: linear-gradient(135deg, #0f172a, #334155);
    min-height: 100vh;
    direction: rtl;
}

/* Layout */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 1.5rem;
}

/* Particles Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 1.875rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn i {
    font-size: 1.125rem;
}

/* Form Elements */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    border-radius: var(--radius);
    border: 2px solid var(--gray-light);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--white);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Auth Styles */
.auth-wrapper {
    width: 100%;
    max-width: 28rem;
}

.auth-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.auth-header {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.logo-icon {
    width: 4rem;
    height: 4rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

.auth-title {
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    opacity: 0.8;
}

.auth-body {
    padding: 2rem;
}

/* Upload App Styles */
.upload-wrapper {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 800px;
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.app-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 1rem 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-title i {
    font-size: 1.5rem;
}

.app-title h1 {
    margin-bottom: 0;
}

.app-content {
    flex: 1;
    overflow: auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .app-content {
        grid-template-columns: 1fr 1fr;
    }
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-title h2 {
    margin-bottom: 0;
}

.badge {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--gray-light);
    border-radius: var(--radius);
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.5);
}

.upload-area:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    animation: bounce 2s ease infinite;
}

.upload-text {
    margin-bottom: 1.5rem;
}

.upload-text h3 {
    color: var(--dark);
}

.upload-text p {
    color: var(--gray);
}

.upload-info {
    margin-top: 2rem;
    color: var(--gray);
}

.format-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.format-badge {
    background-color: var(--gray-light);
    color: var(--dark);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Progress Bar */
.upload-progress-container {
    margin-top: 1.5rem;
    display: none;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.progress-bar-container {
    background-color: var(--gray-light);
    border-radius: var(--radius-sm);
    height: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    width: 100%;
    height: 100%;
    background-color: transparent;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

/* Files List */
.files-section {
    display: flex;
    flex-direction: column;
}

.files-container {
    flex: 1;
    overflow: auto;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.view-options {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    background: none;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.view-btn:hover, .view-btn.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.files-list {
    display: grid;
    gap: 1rem;
}

.files-list.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.files-list.list-view {
    grid-template-columns: 1fr;
}

.file-item {
    background-color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.file-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

.file-info {
    flex: 1;
    overflow: hidden;
}

.file-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    color: var(--gray);
    font-size: 0.875rem;
}

.file-actions {
    padding: 1rem 1.5rem;
    background-color: rgba(241, 245, 249, 0.5);
    display: flex;
    gap: 0.5rem;
}

.file-actions button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.copy-link {
    background-color: var(--primary);
    color: var(--white);
}

.copy-link:hover {
    background-color: var(--primary-hover);
}

.delete-file {
    background-color: var(--danger);
    color: var(--white);
}

.delete-file:hover {
    background-color: #dc2626;
}

/* No Files */
.no-files {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--gray);
}

.no-files-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.no-files h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

/* Notification System */
.notification-container {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1000;
    max-width: 24rem;
    width: calc(100% - 3rem);
}

.notification {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease-out;
    transform-origin: bottom left;
}

.notification-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notification-message {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: var(--transition);
}

.notification-close:hover {
    color: var(--dark);
}

.notification.success .notification-icon {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.notification.error .notification-icon {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.notification.warning .notification-icon {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.notification.info .notification-icon {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateX(-20px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .auth-header, .auth-body {
        padding: 1.5rem;
    }
    
    .app-content {
        padding: 1.5rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .files-list.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 576px) {
    .files-list.grid-view {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        padding: 1rem;
    }
    
    .app-content {
        padding: 1rem;
    }
    
    .notification-container {
        left: 1rem;
        right: 1rem;
        width: calc(100% - 2rem);
    }
} 