/* CSS Variables for consistent theming */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a6fd8;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 2000;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.mobile-menu-toggle i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.mobile-menu-toggle.active {
    background: var(--secondary-color);
}

.mobile-menu-toggle.active i {
    transform: rotate(90deg);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none !important; /* Hide by default everywhere */
}

/* Only show the menu toggle in dashboard on mobile */
@media (max-width: 1024px) {
    .dashboard:not(.auth-container) .mobile-menu-toggle {
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: var(--primary-color);
        color: white;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        cursor: pointer;
        display: flex !important;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-md);
        transition: all 0.3s ease;
    }

    .dashboard:not(.auth-container) .mobile-menu-toggle:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
    }

    .dashboard:not(.auth-container) .mobile-menu-toggle:active {
        transform: translateY(0);
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
    color: white;
}

.cloud-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 2s ease-in-out infinite;
}

.loading-text {
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0.9;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1002;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.mobile-menu-toggle.active {
    background: var(--secondary-color);
}

.mobile-menu-toggle i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle.active i {
    transform: rotate(90deg);
}

@media (max-width: 1024px) {
    .dashboard .mobile-menu-toggle {
        display: flex !important;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    width: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    min-height: 70px;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    padding-right: 2rem;
}

.nav-brand i {
    font-size: 2rem;
    transition: all 0.3s ease;
}

.nav-brand.menu-active i {
    transform: rotate(90deg);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
    padding-left: 2rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

/* Authentication Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff10" points="0,1000 1000,0 1000,1000"/></svg>');
    pointer-events: none;
}

.auth-card {
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
    position: relative;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    text-align: center; /* ensure children center-aligned */
}

.logo i {
    font-size: 3.5rem;
    color: var(--primary-color);
    display: block;
}

.logo h1 {
    font-size: 1.4rem; /* slightly smaller to avoid long wrapping */
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.05;
    white-space: normal; /* allow normal wrapping but centered */
    word-break: keep-all;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.auth-form h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

/* Forgot password small link */
.forgot a {
    color: var(--primary-color);
    text-decoration: none;
}

.forgot a:hover {
    text-decoration: underline;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    transition: color 0.3s ease;
}

.form-group input:focus + .form-icon {
    color: var(--primary-color);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.btn-google {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-google:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-google i {
    color: #db4437;
}

.btn-upload {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    color: var(--text-light);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 1rem;
    font-size: 0.875rem;
}

.auth-switch {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-switch a:hover {
    color: var(--primary-dark);
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
    padding-top: 70px;
    background: var(--bg-secondary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: none;
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.mobile-menu-toggle.active {
    background: var(--secondary-color);
}

.mobile-menu-toggle i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle.active i {
    transform: rotate(90deg);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    overflow-y: auto;
    position: fixed;
    top: 70px;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }
}

.sidebar-header {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.sidebar-header .btn-upload {
    width: 100%;
    max-width: 200px;
    justify-content: center;
    margin: 0 auto;
}

.storage-info {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.storage-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.storage-used {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 1s ease;
}

.storage-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item a:hover,
.nav-item.active a {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-icon {
    position: absolute;
    right: 0.75rem;
    color: var(--text-light);
    pointer-events: none;
    transition: color 0.3s ease;
}

.filter-dropdown:hover .filter-icon {
    color: var(--primary-color);
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 300px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.view-toggle {
    display: flex;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.view-btn {
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* File Grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    animation: slideInGrid 0.6s ease;
}

@keyframes slideInGrid {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.file-grid.list-view {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.file-item {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    
}

.file-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.file-item:hover::before {
    transform: scaleX(1);
}

.file-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.file-icon {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.file-icon i {
    font-size: 3rem;
}

.file-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    background: var(--bg-secondary);
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-light);
}

.file-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-item:hover .file-actions {
    opacity: 1;
}

/* List View Styles */
.file-grid.list-view .file-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    gap: 1rem;
    justify-content: space-between;
}

.file-grid.list-view .file-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.file-grid.list-view .file-icon {
    font-size: 2rem;
    margin: 0;
    flex-shrink: 0;
}

.file-grid.list-view .file-preview {
    width: 50px;
    height: 50px;
    margin: 0;
    flex-shrink: 0;
}

.file-grid.list-view .file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.file-grid.list-view .file-name {
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-grid.list-view .file-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.file-grid.list-view .file-actions {
    opacity: 1;
    margin: 0;
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

.modal-small {
    max-width: 400px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    position: relative;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    overflow: hidden;
    cursor: pointer;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(102, 126, 234, 0) 0%,
        rgba(102, 126, 234, 0.1) 50%,
        rgba(118, 75, 162, 0) 100%);
    z-index: 1;
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.upload-area:hover::before,
.upload-area.dragover::before {
    transform: translateX(100%);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

.upload-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    position: relative;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.upload-icon::after {
    content: '';
    position: absolute;
    width: 110%;
    height: 110%;
    border: 2px dashed var(--primary-color);
    border-radius: 50%;
    animation: spin 10s linear infinite;
    opacity: 0.5;
}

.upload-icon i {
    font-size: 3rem;
    color: white;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.upload-text h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upload-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 280px;
    margin: 0 auto 1rem auto;
}

.upload-hint {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.upload-content:hover .upload-hint {
    opacity: 1;
    transform: scale(1.05);
}

.upload-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--border-color) 20%,
        var(--border-color) 80%,
        transparent 100%
    );
    z-index: 1;
}

.upload-divider span {
    background: var(--bg-primary);
    padding: 0 1.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 2;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upload-actions {
    display: flex;
    justify-content: center;
}

.browse-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: var(--radius-xl);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.browse-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transition: left 0.6s ease;
}

.browse-btn:hover::before {
    left: 100%;
}

.browse-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.browse-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
}

.browse-btn:hover::after {
    opacity: 1;
}

.browse-btn:active {
    transform: translateY(-2px) scale(0.98);
}

.browse-btn i {
    font-size: 1.3rem;
    animation: floatIcon 2s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.upload-area.dragover .upload-icon {
    animation: bounce 0.6s ease infinite;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

.upload-progress {
    margin-top: 2rem;
}

.upload-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.upload-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.upload-filename {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.upload-size {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.upload-percentage {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.upload-progress {
    margin-top: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Delete Confirmation Modal */
.delete-confirmation {
    text-align: center;
    padding: 1rem 0;
}

.delete-icon {
    font-size: 3rem;
    color: var(--error-color);
    margin-bottom: 1.5rem;
}

.delete-confirmation p {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.file-name-confirm {
    font-weight: 600;
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem !important;
}

.delete-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-danger {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Link Preview Modal */
.link-preview-content {
    padding: 1rem 0;
}

.link-container {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1rem 0;
}

.link-text {
    word-break: break-all;
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    max-height: 100px;
    overflow-y: auto;
}

.link-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.link-expiry {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.link-expiry i {
    color: var(--warning-color);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem !important;
    right: 2rem;
    z-index: 3000;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--success-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: toastSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
    pointer-events: auto;
    transform-origin: bottom right;
}

.toast.error {
    border-left-color: var(--error-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast-icon {
    font-size: 1.25rem;
    color: var(--success-color);
}

.toast.error .toast-icon {
    color: var(--error-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

.toast-message {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.toast-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        box-shadow: none;
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }
    
    .main-content {
        margin-left: 0;
    }

    .dashboard {
        position: relative;
    }
    
    .search-box input {
        width: 200px;
    }
}

@media (max-width: 900px) {
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .user-info {
        gap: 0.75rem;
    }
    
    .search-box input {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        height: 60px;
    }
    
    .nav-brand {
        font-size: 1.25rem;
        gap: 0.5rem;
    }
    
    .nav-brand i {
        font-size: 1.5rem;
    }
    
    .user-info {
        gap: 0.5rem;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
    }
    
    .btn-secondary {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .btn-secondary span {
        display: none;
    }
    
    .btn-secondary i {
        margin: 0;
    }
    
    .auth-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .dashboard {
        padding-top: 60px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .filter-dropdown {
        order: 1;
        flex: 1;
        min-width: 100px;
    }
    
    .filter-select {
        width: 100%;
        min-width: auto;
        padding: 0.65rem 2rem 0.65rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .search-box {
        order: 2;
        flex: 2;
        min-width: 150px;
    }
    
    .search-box input {
        width: 100%;
        max-width: none;
    }
    
    .view-toggle {
        order: 3;
        flex-shrink: 0;
    }
    
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .toast-container {
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }
    
    .nav-container {
        padding: 0 1rem;
        height: 60px;
        min-height: 60px;
    }
    
    .nav-brand {
        font-size: 1.2rem;
        gap: 0.5rem;
        margin: 0 auto;
    }

    .auth-container .nav-brand span {
        display: block;
    }
    
    .auth-container .nav-brand i {
        font-size: 2rem;
        cursor: default;
    }

    .dashboard .nav-brand {
        margin: 0;
    }

    .dashboard .nav-brand span {
        display: none;
    }
    
    .dashboard .nav-brand i {
        font-size: 1.75rem;
        cursor: pointer;
    }
    
    .user-info {
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    #user-name {
        display: none;
    }
    
    .btn-secondary {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
        min-width: auto;
        white-space: nowrap;
    }
    
    .dashboard {
        padding-top: 50px;
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    .filter-select {
        padding: 0.5rem 1.75rem 0.5rem 0.5rem;
        font-size: 0.75rem;
        min-width: 80px;
    }
    
    .filter-icon {
        right: 0.5rem;
        font-size: 0.8rem;
    }
    
    .search-box input {
        padding: 0.5rem 0.5rem 0.5rem 2rem;
        font-size: 0.8rem;
    }
    
    .view-toggle {
        gap: 0.25rem;
    }
    
    .view-btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .file-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .upload-area {
        padding: 1.5rem;
        min-height: 250px;
        gap: 1rem;
    }
    
    .upload-icon {
        width: 60px;
        height: 60px;
    }
    
    .upload-icon i {
        font-size: 2rem;
    }
    
    .upload-text h4 {
        font-size: 1.1rem;
    }
    
    .upload-text p {
        font-size: 0.8rem;
    }
    
    .browse-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        min-width: 140px;
    }
    
    .upload-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .upload-details {
        text-align: center;
    }
    
    .upload-percentage {
        text-align: center;
        font-size: 1rem;
    }
}