/* ===== ГЛОБАЛЬНЫЕ СТИЛИ ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --background: #0f0f1a;
    --surface: #1a1a2e;
    --surface-hover: #252542;
    --border: #2d2d4a;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-surface: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ===== СКРОЛЛБАР ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--gradient-primary);
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    top: -200px;
    right: -200px;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 30px); }
}

.login-box {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box h2 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 26px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-form .input-group {
    position: relative;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    padding-left: 44px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-normal);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.login-form .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    transition: color var(--transition-fast);
}

.login-form input:focus + .input-icon {
    color: var(--primary);
}

.login-btn {
    padding: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.registration-note {
    margin-top: 24px;
    padding: 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.registration-note p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.registration-note a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.registration-note a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ===== HEADER ===== */
.header-left { display: flex; align-items: center; gap: 12px; }

.back-btn {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.back-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--surface-hover);
}

.header-left h1 {
    font-size: 20px; font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left h1 {
    font-size: 20px;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-left .logo-icon {
    font-size: 24px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.icon-btn:hover {
    background: var(--surface-hover);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.logout-btn {
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    background: var(--surface);
    padding: 8px;
    margin: 0 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    gap: 4px;
}

.tab {
    flex: 1;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-normal);
    position: relative;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
}

.tab.active {
    color: var(--text-primary);
    background: var(--gradient-primary);
    box-shadow: var(--shadow-sm);
}

.tab .tab-icon {
    margin-right: 6px;
}

/* ===== MAIN CONTENT ===== */
.main {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== DROPZONE ===== */
.dropzone {
    background: var(--gradient-surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 24px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.dropzone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.dropzone:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.dropzone:hover::before {
    opacity: 0.05;
}

.dropzone.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.01);
}

.dropzone-content {
    position: relative;
    z-index: 1;
}

.dropzone .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.7;
    transition: all var(--transition-normal);
}

.dropzone:hover .icon {
    opacity: 1;
    transform: scale(1.1);
}

.dropzone p {
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
}

.dropzone small {
    color: var(--text-muted);
    font-size: 13px;
}

/* ===== BAN MESSAGE ===== */
.ban-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2); }
    50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

.ban-message p {
    color: var(--danger);
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.ban-message small {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ===== UPLOAD PROGRESS ===== */
.upload-progress {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-progress h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-progress h3::before {
    content: '📤';
}

.progress-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-item {
    background: var(--background);
    padding: 14px;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
    transition: all var(--transition-normal);
}

.progress-item:hover {
    background: var(--surface-hover);
}

.progress-item.completed {
    border-left-color: var(--success);
}

.progress-item.error {
    border-left-color: var(--danger);
}

.progress-file {
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

.progress-bar {
    background: var(--background);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    background: var(--gradient-primary);
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-item.completed .progress-fill {
    background: var(--success);
}

.progress-item.completed .progress-fill::after {
    display: none;
}

.progress-item.error .progress-fill {
    background: var(--danger);
}

.progress-item.error .progress-fill::after {
    display: none;
}

.progress-status {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== FILES SECTION ===== */
.files-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border);
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.files-header h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.files-header h3::before {
    content: '📁';
}

.files-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.files-count {
    color: var(--text-muted);
    font-size: 13px;
    background: var(--background);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

/* ===== VIEW TOGGLE ===== */
.view-toggle {
    display: flex;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.view-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 12px;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.view-toggle-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

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

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 15px;
}

/* ===== FILE LIST - LIST VIEW ===== */
.file-list.list-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-list.list-view .file-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--background);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.file-list.list-view .file-card:hover {
    background: var(--surface-hover);
    border-color: var(--border);
    transform: translateX(4px);
}

.file-list.list-view .file-preview img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border);
    transition: transform var(--transition-fast);
}

.file-list.list-view .file-preview:hover img {
    transform: scale(1.05);
}

.file-list.list-view .file-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-radius: var(--radius-sm);
    font-size: 20px;
    border: 1px solid var(--border);
}

.file-list.list-view .file-info {
    flex: 1;
    min-width: 0;
}

.file-list.list-view .file-name {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.file-list.list-view .file-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.file-list.list-view .file-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.file-list.list-view .file-card:hover .file-actions {
    opacity: 1;
}

/* ===== FILE LIST - GRID VIEW ===== */
.file-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 8px 0;
}

.file-list.grid-view .file-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 20px;
    background: var(--background);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    border: 1px solid var(--border);
    min-height: 220px;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.file-list.grid-view .file-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.file-list.grid-view .file-card:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.file-list.grid-view .file-card:hover::before {
    transform: scaleX(1);
}

.file-list.grid-view .file-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.file-list.grid-view .file-preview img {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--border);
    transition: all var(--transition-normal);
}

.file-list.grid-view .file-card:hover .file-preview img {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.file-list.grid-view .file-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-radius: var(--radius-md);
    font-size: 40px;
    border: 2px solid var(--border);
    transition: all var(--transition-normal);
}

.file-list.grid-view .file-card:hover .file-icon {
    border-color: var(--primary);
    transform: scale(1.05);
}

.file-list.grid-view .file-info {
    width: 100%;
    min-width: 0;
}

.file-list.grid-view .file-name {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    font-weight: 500;
}

.file-list.grid-view .file-meta {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ===== FILE ACTIONS ===== */
.file-actions {
    display: flex;
    gap: 4px;
}

.rename-btn, .delete-btn, .download-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.rename-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

.delete-btn:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    transform: scale(1.1);
}

.download-btn:hover {
    background: var(--success);
    border-color: var(--success);
    color: white;
    transform: scale(1.1);
}

.file-list.grid-view .file-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
}

.file-list.grid-view .rename-btn,
.file-list.grid-view .delete-btn,
.file-list.grid-view .download-btn {
    padding: 10px;
    font-size: 16px;
    border-radius: var(--radius-md);
    width: 42px;
    height: 42px;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

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

.modal {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 450px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.modal p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.modal-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

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

.modal-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.modal-btn.cancel {
    background: var(--background);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.modal-btn.cancel:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

/* ===== NOTIFICATION ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    animation: slideInRight 0.3s ease;
    max-width: 350px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification::before {
    font-size: 18px;
}

.notification.success {
    background: var(--success);
}

.notification.success::before {
    content: '✓';
}

.notification.error {
    background: var(--danger);
}

.notification.error::before {
    content: '✕';
}

.notification.info {
    background: var(--primary);
}

.notification.info::before {
    content: 'ℹ';
}

/* ===== IMAGE PREVIEW OVERLAY ===== */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    cursor: zoom-out;
    animation: fadeIn 0.2s ease;
}

.image-preview-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== LOADING STATES ===== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .tabs {
        margin: 0 16px;
    }

    .main {
        padding: 16px;
    }

    .dropzone {
        padding: 30px 20px;
    }

    .file-list.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .file-list.grid-view .file-card {
        min-height: 180px;
        padding: 16px;
    }

    .file-list.grid-view .file-preview img,
    .file-list.grid-view .file-icon {
        width: 70px;
        height: 70px;
    }

    .file-list.grid-view .file-icon {
        font-size: 28px;
    }

    .files-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .files-controls {
        width: 100%;
        justify-content: space-between;
    }

    .modal {
        margin: 16px;
        width: calc(100% - 32px);
        padding: 24px;
    }

    .notification {
        left: 16px;
        right: 16px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 24px;
    }

    .header {
        flex-direction: column;
        text-align: center;
    }

    .header-right {
        justify-content: center;
        width: 100%;
    }

    .file-list.grid-view {
        grid-template-columns: repeat(2, 1fr);
    }

    .file-list.list-view .file-card {
        flex-wrap: wrap;
    }

    .file-list.list-view .file-actions {
        opacity: 1;
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }
}

/* ===== TOOLTIPS ===== */
[title] {
    position: relative;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    margin-bottom: 6px;
    z-index: 100;
    animation: fadeIn 0.2s ease;
}