@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a3e;
    --bg-card: rgba(30, 30, 70, 0.6);
    --bg-hover: rgba(60, 60, 120, 0.4);
    --bg-input: rgba(20, 20, 50, 0.8);
    --accent: #6c63ff;
    --accent-hover: #7f78ff;
    --accent-glow: rgba(108, 99, 255, 0.3);
    --success: #00d68f;
    --danger: #ff6b6b;
    --warning: #ffc107;
    --text-primary: #e8e8f0;
    --text-secondary: #9595b5;
    --text-muted: #6565a0;
    --border: rgba(100, 100, 180, 0.2);
    --border-hover: rgba(108, 99, 255, 0.4);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(108, 99, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(0, 214, 143, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-2%, -2%);
    }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ============ AUTH PAGE ============ */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo p {
    color: var(--text-secondary);
    margin-top: 6px;
    font-size: 14px;
}

.auth-logo-img {
    width: 72px;
    height: 72px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 16px rgba(108, 99, 255, 0.4));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.auth-tab.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-card);
}

.btn-danger {
    background: rgba(255, 107, 107, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.btn-danger:hover {
    background: rgba(255, 107, 107, 0.25);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    font-size: 16px;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    animation: slideUp 0.3s ease;
}

.alert-error {
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.25);
    color: var(--danger);
}

.alert-success {
    background: rgba(0, 214, 143, 0.12);
    border: 1px solid rgba(0, 214, 143, 0.25);
    color: var(--success);
}

/* ============ DASHBOARD LAYOUT ============ */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-logo {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 8px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo-icon {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 8px rgba(108, 99, 255, 0.3));
}

.sidebar-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px var(--accent-glow);
    margin-bottom: 24px;
}

.sidebar-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.sidebar-nav {
    flex: 1;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.sidebar-nav-item:hover,
.sidebar-nav-item.active {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav-item .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-user {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--success));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.sidebar-user-info {
    flex: 1;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: var(--transition);
}

.sidebar-logout:hover {
    color: var(--danger);
}

/* ============ MAIN CONTENT ============ */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 28px 32px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.breadcrumb-item {
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
    font-family: inherit;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 6px;
}

.breadcrumb-item:hover {
    color: var(--accent);
    background: var(--bg-hover);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
    cursor: default;
}

.breadcrumb-sep {
    color: var(--text-muted);
    font-size: 12px;
}

.topbar-actions {
    display: flex;
    gap: 8px;
}

/* ============ FILE GRID ============ */
.section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
    padding-left: 4px;
}

.folder-grid,
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.folder-card,
.file-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.folder-card:hover,
.file-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.folder-card .card-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.file-card .card-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.card-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.card-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: var(--transition);
}

.folder-card:hover .card-actions,
.file-card:hover .card-actions {
    opacity: 1;
}

/* ============ DROPZONE ============ */
.dropzone-overlay {
    position: fixed;
    inset: 0;
    background: rgba(108, 99, 255, 0.12);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.dropzone-overlay.active {
    display: flex;
}

.dropzone-box {
    background: var(--bg-card);
    border: 3px dashed var(--accent);
    border-radius: var(--radius-lg);
    padding: 60px 80px;
    text-align: center;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.dropzone-box .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.dropzone-box h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.dropzone-box p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============ UPLOAD PROGRESS ============ */
.upload-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 360px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 500;
    display: none;
    overflow: hidden;
}

.upload-panel.active {
    display: block;
    animation: slideUp 0.3s ease;
}

.upload-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
}

.upload-panel-body {
    max-height: 240px;
    overflow-y: auto;
    padding: 8px 0;
}

.upload-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
}

.upload-item-icon {
    font-size: 20px;
}

.upload-item-info {
    flex: 1;
    min-width: 0;
}

.upload-item-name {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-item-progress {
    height: 3px;
    background: var(--bg-input);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.upload-item-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--success));
    border-radius: 2px;
    transition: width 0.3s ease;
}

.upload-item-status {
    font-size: 18px;
}

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
}

/* ============ TOAST ============ */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-size: 13px;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* ============ HAMBURGER MENU ============ */
.hamburger {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.hamburger:hover {
    background: var(--bg-hover);
}

/* ============ SEARCH BOX ============ */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    pointer-events: none;
}

.search-box input {
    width: 220px;
    padding: 8px 32px 8px 36px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--accent);
    outline: none;
    width: 280px;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    transition: var(--transition);
}

.search-clear:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* ============ TRASH CARD ============ */
.trash-card {
    border-color: rgba(255, 107, 107, 0.2);
    background: rgba(255, 107, 107, 0.04);
}

.trash-card:hover {
    border-color: rgba(255, 107, 107, 0.4);
}

/* ============ RESPONSIVE ============ */

/* Sidebar overlay on mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

@media (max-width: 1024px) {
    .search-box input {
        width: 160px;
    }

    .search-box input:focus {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        z-index: 100;
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
    }

    .main-content {
        margin-left: 0;
        padding: 16px 12px;
    }

    .topbar {
        flex-wrap: wrap;
        gap: 8px;
        padding-bottom: 12px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .search-box {
        flex: 1;
    }

    .search-box input {
        width: 100%;
    }

    .search-box input:focus {
        width: 100%;
    }

    .breadcrumb {
        flex: 1;
        min-width: 0;
    }

    .breadcrumb-item {
        font-size: 12px;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .folder-grid,
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }

    .folder-card,
    .file-card {
        padding: 14px 10px;
    }

    .card-name {
        font-size: 12px;
    }

    .card-actions {
        gap: 2px;
    }

    .auth-card {
        padding: 28px 20px;
        margin: 16px;
    }

    .upload-panel {
        width: calc(100% - 24px);
        left: 12px;
        right: 12px;
    }

    /* Modals full-width on mobile */
    .modal {
        width: calc(100vw - 32px);
        max-width: 100%;
    }

    /* Preview full-screen mobile */
    .preview-header {
        padding: 10px 12px;
    }

    .preview-title {
        font-size: 13px;
    }

    .preview-content {
        padding: 8px;
    }

    .preview-video {
        max-height: calc(100vh - 80px);
    }
}

@media (max-width: 480px) {

    .folder-grid,
    .file-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .card-icon {
        font-size: 28px;
    }

    .topbar-actions .btn {
        font-size: 11px;
        padding: 6px 10px;
    }

    .section-title {
        font-size: 11px;
    }
}

/* ============ STORAGE BAR ============ */
.storage-section {
    padding: 16px 12px;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.storage-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.storage-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--success));
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ============ PREVIEW MODAL ============ */
.preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 5000;
    display: none;
    flex-direction: column;
}

.preview-overlay.active {
    display: flex;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(20, 20, 30, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.preview-title {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.preview-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-close {
    color: #fff;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.preview-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.preview-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 24px;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.preview-video {
    width: 90vw;
    max-width: 1200px;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.preview-pdf {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.preview-text {
    width: 100%;
    max-height: 100%;
    overflow: auto;
    padding: 24px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 1px solid var(--border);
}

.preview-audio-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.preview-audio-icon {
    font-size: 72px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.preview-loading {
    color: var(--text-secondary);
    font-size: 18px;
}

.preview-unsupported {
    text-align: center;
    color: var(--text-secondary);
}

.preview-unsupported-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.preview-unsupported h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* ============ ADMIN PANEL ============ */
.admin-content {
    padding: 4px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.admin-stat-value {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.admin-table-wrap {
    overflow-x: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th {
    text-align: left;
    padding: 14px 16px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(108, 99, 255, 0.04);
}

.admin-usage-bar {
    width: 80px;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

.admin-usage-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.admin-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.admin-badge.admin {
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent);
}

.admin-badge.user {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}