@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&display=swap');

:root {
    --neon-primary: #8b5cf6;
    --neon-secondary: #6d28d9;
    --neon-accent: #a78bfa;
    --neon-cyan: #22d3ee;
    --neon-glow: rgba(139, 92, 246, 0.5);

    --bg-body: #070710;
    --bg-grid-line: rgba(139, 92, 246, 0.04);
    --bg-glow-top: rgba(139, 92, 246, 0.35);
    --bg-glow-bottom: rgba(34, 211, 238, 0.18);
    --bg-glow-opacity: 0.4;

    --glass-bg: rgba(10, 10, 30, 0.55);
    --glass-border: rgba(139, 92, 246, 0.15);
    --glass-border-hover: rgba(139, 92, 246, 0.35);

    --text-primary: #e2e0ff;
    --text-secondary: rgba(180, 170, 240, 0.6);
    --text-dim: rgba(160, 150, 220, 0.35);
    --text-label: rgba(160, 150, 220, 0.2);

    --input-bg: rgba(10, 10, 30, 0.5);
    --input-bg-focus: rgba(15, 15, 40, 0.6);
    --input-border: rgba(139, 92, 246, 0.15);
    --input-placeholder: rgba(160, 150, 220, 0.15);
    --input-shadow-focus: rgba(139, 92, 246, 0.15);

    --file-item-hover-bg: rgba(139, 92, 246, 0.05);
    --file-item-hover-border: rgba(139, 92, 246, 0.08);
    --file-item-active-bg: rgba(139, 92, 246, 0.1);
    --file-item-active-border: rgba(139, 92, 246, 0.2);
    --file-item-active-shadow: rgba(139, 92, 246, 0.05);

    --file-nav-border: rgba(139, 92, 246, 0.06);
    --path-item-hover-bg: rgba(139, 92, 246, 0.1);

    --tag-border: rgba(139, 92, 246, 0.12);
    --tag-vid-border: rgba(34, 211, 238, 0.15);
    --tag-vid-color: rgba(34, 211, 238, 0.6);
    --tag-vid-active-border: rgba(34, 211, 238, 0.3);
    --tag-vid-active-color: rgba(34, 211, 238, 0.9);

    --scrollbar-thumb: rgba(139, 92, 246, 0.12);
    --sort-option-bg: #0a0a1e;

    --btn-neon-bg-a: rgba(139, 92, 246, 0.25);
    --btn-neon-bg-b: rgba(109, 40, 217, 0.15);
    --btn-neon-hover-bg-a: rgba(139, 92, 246, 0.4);
    --btn-neon-hover-bg-b: rgba(109, 40, 217, 0.25);

    --btn-ghost-hover-bg: rgba(139, 92, 246, 0.06);
    --icon-btn-bg: rgba(139, 92, 246, 0.06);
    --icon-btn-hover-bg: rgba(139, 92, 246, 0.12);

    --clock-seg-bg: rgba(139, 92, 246, 0.08);
    --clock-seg-border: rgba(139, 92, 246, 0.2);

    --screen-bg: #000;
    --screen-shadow-outer: rgba(139, 92, 246, 0.08);
    --screen-shadow-inner: rgba(0, 0, 0, 0.4);

    --hex-ring-border: rgba(139, 92, 246, 0.2);
    --hex-ring-border-before: rgba(139, 92, 246, 0.1);
    --hex-ring-border-after: rgba(34, 211, 238, 0.1);

    --status-error: rgba(255, 80, 80, 0.9);
    --status-error-bg: rgba(255, 80, 80, 0.08);
    --status-error-border: rgba(255, 80, 80, 0.2);
    --status-success: rgba(34, 211, 238, 0.9);
    --status-success-bg: rgba(34, 211, 238, 0.08);
    --status-success-border: rgba(34, 211, 238, 0.2);

    --scan-line-opacity: 0.5;
}

:root[data-theme="light"] {
    --bg-body: #f0f0f5;
    --bg-grid-line: rgba(139, 92, 246, 0.08);
    --bg-glow-top: rgba(139, 92, 246, 0.25);
    --bg-glow-bottom: rgba(34, 211, 238, 0.12);
    --bg-glow-opacity: 0.35;

    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(139, 92, 246, 0.2);
    --glass-border-hover: rgba(139, 92, 246, 0.4);

    --text-primary: #1a1a2e;
    --text-secondary: rgba(40, 40, 70, 0.65);
    --text-dim: rgba(60, 50, 100, 0.4);
    --text-label: rgba(100, 80, 160, 0.25);

    --input-bg: rgba(240, 240, 250, 0.6);
    --input-bg-focus: rgba(235, 235, 248, 0.75);
    --input-border: rgba(139, 92, 246, 0.2);
    --input-placeholder: rgba(100, 80, 160, 0.2);
    --input-shadow-focus: rgba(139, 92, 246, 0.2);

    --file-item-hover-bg: rgba(139, 92, 246, 0.06);
    --file-item-hover-border: rgba(139, 92, 246, 0.12);
    --file-item-active-bg: rgba(139, 92, 246, 0.12);
    --file-item-active-border: rgba(139, 92, 246, 0.25);
    --file-item-active-shadow: rgba(139, 92, 246, 0.08);

    --file-nav-border: rgba(139, 92, 246, 0.1);
    --path-item-hover-bg: rgba(139, 92, 246, 0.12);

    --tag-border: rgba(139, 92, 246, 0.18);
    --tag-vid-border: rgba(34, 211, 238, 0.22);
    --tag-vid-color: rgba(8, 160, 180, 0.7);
    --tag-vid-active-border: rgba(34, 211, 238, 0.4);
    --tag-vid-active-color: rgba(8, 160, 180, 0.95);

    --scrollbar-thumb: rgba(139, 92, 246, 0.15);
    --sort-option-bg: #f0f0f5;

    --btn-neon-bg-a: rgba(139, 92, 246, 0.3);
    --btn-neon-bg-b: rgba(109, 40, 217, 0.18);
    --btn-neon-hover-bg-a: rgba(139, 92, 246, 0.45);
    --btn-neon-hover-bg-b: rgba(109, 40, 217, 0.3);

    --btn-ghost-hover-bg: rgba(139, 92, 246, 0.08);
    --icon-btn-bg: rgba(139, 92, 246, 0.08);
    --icon-btn-hover-bg: rgba(139, 92, 246, 0.15);

    --clock-seg-bg: rgba(139, 92, 246, 0.06);
    --clock-seg-border: rgba(139, 92, 246, 0.18);

    --screen-bg: #1a1a2e;
    --screen-shadow-outer: rgba(139, 92, 246, 0.12);
    --screen-shadow-inner: rgba(0, 0, 0, 0.15);

    --hex-ring-border: rgba(139, 92, 246, 0.25);
    --hex-ring-border-before: rgba(139, 92, 246, 0.15);
    --hex-ring-border-after: rgba(34, 211, 238, 0.15);

    --status-error: rgba(200, 40, 40, 0.9);
    --status-error-bg: rgba(200, 40, 40, 0.08);
    --status-error-border: rgba(200, 40, 40, 0.2);
    --status-success: rgba(10, 160, 180, 0.9);
    --status-success-bg: rgba(34, 211, 238, 0.1);
    --status-success-border: rgba(34, 211, 238, 0.25);

    --scan-line-opacity: 0.12;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]):not([data-theme="light"]) {
        --bg-body: #f0f0f5;
        --bg-grid-line: rgba(139, 92, 246, 0.08);
        --bg-glow-top: rgba(139, 92, 246, 0.25);
        --bg-glow-bottom: rgba(34, 211, 238, 0.12);
        --bg-glow-opacity: 0.35;

        --glass-bg: rgba(255, 255, 255, 0.65);
        --glass-border: rgba(139, 92, 246, 0.2);
        --glass-border-hover: rgba(139, 92, 246, 0.4);

        --text-primary: #1a1a2e;
        --text-secondary: rgba(40, 40, 70, 0.65);
        --text-dim: rgba(60, 50, 100, 0.4);
        --text-label: rgba(100, 80, 160, 0.25);

        --input-bg: rgba(240, 240, 250, 0.6);
        --input-bg-focus: rgba(235, 235, 248, 0.75);
        --input-border: rgba(139, 92, 246, 0.2);
        --input-placeholder: rgba(100, 80, 160, 0.2);
        --input-shadow-focus: rgba(139, 92, 246, 0.2);

        --file-item-hover-bg: rgba(139, 92, 246, 0.06);
        --file-item-hover-border: rgba(139, 92, 246, 0.12);
        --file-item-active-bg: rgba(139, 92, 246, 0.12);
        --file-item-active-border: rgba(139, 92, 246, 0.25);
        --file-item-active-shadow: rgba(139, 92, 246, 0.08);

        --file-nav-border: rgba(139, 92, 246, 0.1);
        --path-item-hover-bg: rgba(139, 92, 246, 0.12);

        --tag-border: rgba(139, 92, 246, 0.18);
        --tag-vid-border: rgba(34, 211, 238, 0.22);
        --tag-vid-color: rgba(8, 160, 180, 0.7);
        --tag-vid-active-border: rgba(34, 211, 238, 0.4);
        --tag-vid-active-color: rgba(8, 160, 180, 0.95);

        --scrollbar-thumb: rgba(139, 92, 246, 0.15);
        --sort-option-bg: #f0f0f5;

        --btn-neon-bg-a: rgba(139, 92, 246, 0.3);
        --btn-neon-bg-b: rgba(109, 40, 217, 0.18);
        --btn-neon-hover-bg-a: rgba(139, 92, 246, 0.45);
        --btn-neon-hover-bg-b: rgba(109, 40, 217, 0.3);

        --btn-ghost-hover-bg: rgba(139, 92, 246, 0.08);
        --icon-btn-bg: rgba(139, 92, 246, 0.08);
        --icon-btn-hover-bg: rgba(139, 92, 246, 0.15);

        --clock-seg-bg: rgba(139, 92, 246, 0.06);
        --clock-seg-border: rgba(139, 92, 246, 0.18);

        --screen-bg: #1a1a2e;
        --screen-shadow-outer: rgba(139, 92, 246, 0.12);
        --screen-shadow-inner: rgba(0, 0, 0, 0.15);

        --hex-ring-border: rgba(139, 92, 246, 0.25);
        --hex-ring-border-before: rgba(139, 92, 246, 0.15);
        --hex-ring-border-after: rgba(34, 211, 238, 0.15);

        --status-error: rgba(200, 40, 40, 0.9);
        --status-error-bg: rgba(200, 40, 40, 0.08);
        --status-error-border: rgba(200, 40, 40, 0.2);
        --status-success: rgba(10, 160, 180, 0.9);
        --status-success-bg: rgba(34, 211, 238, 0.1);
        --status-success-border: rgba(34, 211, 238, 0.25);

        --scan-line-opacity: 0.12;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-body);
    font-family: 'Orbitron', 'Segoe UI', -apple-system, sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--bg-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 30%, transparent 70%);
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 0;
    opacity: var(--bg-glow-opacity);
}

.bg-glow-top {
    width: 600px;
    height: 600px;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--bg-glow-top), transparent 70%);
}

.bg-glow-bottom {
    width: 500px;
    height: 500px;
    bottom: -150px;
    right: -100px;
    background: radial-gradient(circle, var(--bg-glow-bottom), transparent 70%);
}

.scan-line {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    opacity: var(--scan-line-opacity);
}

.dashboard {
    position: relative;
    z-index: 1;
    max-width: 1500px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    min-height: 100vh;
}

/* ========== TOP BAR ========== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.8rem;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.top-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 90%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-glow), transparent);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-icon {
    font-size: 1.5rem;
    color: var(--neon-accent);
    filter: drop-shadow(0 0 8px var(--neon-glow));
    animation: pulse-icon 3s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { opacity: 0.6; filter: drop-shadow(0 0 6px var(--neon-glow)); }
    50% { opacity: 1; filter: drop-shadow(0 0 16px var(--neon-glow)); }
}

.brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--text-primary);
}

.brand-sub {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    color: var(--text-dim);
    margin-left: 0.3rem;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-dim);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 60, 60, 0.7);
    box-shadow: 0 0 8px rgba(255, 60, 60, 0.4);
}

.status-dot.online {
    background: rgba(34, 211, 238, 0.9);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
    animation: dot-blink 2s ease-in-out infinite;
}

@keyframes dot-blink {
    0%, 100% { box-shadow: 0 0 8px rgba(34, 211, 238, 0.3); }
    50% { box-shadow: 0 0 18px rgba(34, 211, 238, 0.7); }
}

.status-label {
    color: var(--text-dim);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle-btn {
    font-size: 0.9rem;
    transition: all 0.3s;
}

.theme-toggle-btn:hover {
    transform: rotate(30deg);
}

/* ========== DIGITAL CLOCK ========== */
.digital-clock {
    text-align: center;
    user-select: none;
}

.clock-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
}

.clock-seg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 56px;
    font-size: 2rem;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
    color: var(--neon-accent);
    background: var(--clock-seg-bg);
    border: 1px solid var(--clock-seg-border);
    border-radius: 6px;
    text-shadow:
        0 0 10px var(--neon-glow),
        0 0 30px rgba(139, 92, 246, 0.3),
        0 0 60px rgba(139, 92, 246, 0.1);
    box-shadow:
        inset 0 0 15px rgba(139, 92, 246, 0.1),
        0 0 10px rgba(139, 92, 246, 0.15);
    transition: all 0.15s ease;
}

.clock-colon {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--neon-accent);
    text-shadow: 0 0 8px var(--neon-glow);
    animation: colon-blink 1s step-end infinite;
    padding: 0 0.1rem;
}

@keyframes colon-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

.clock-date {
    margin-top: 0.25rem;
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    color: var(--text-dim);
}

/* ========== MAIN GRID ========== */
.main-grid {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
}

/* ========== GLASS CARD ========== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
    z-index: 2;
    pointer-events: none;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--neon-glow), transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s;
}

.glass-card:hover .card-glow {
    opacity: 0.6;
}

/* ========== FILE CARD ========== */
.file-card {
    width: 420px;
    flex-shrink: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.3rem;
    position: relative;
    z-index: 2;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.title-icon {
    color: var(--neon-accent);
    font-size: 0.9rem;
    filter: drop-shadow(0 0 4px var(--neon-glow));
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--icon-btn-bg);
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    border-color: var(--glass-border-hover);
    background: var(--icon-btn-hover-bg);
    color: var(--neon-accent);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
}

/* ========== FLOATING CONFIG PANEL ========== */
.floating-config {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    max-width: calc(100vw - 2rem);
    z-index: 100;
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(139, 92, 246, 0.15);
    animation: float-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.floating-config.dragging {
    transition: none;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(139, 92, 246, 0.25);
    cursor: grabbing;
}

.floating-drag-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    cursor: grab;
    border-bottom: 1px solid var(--file-nav-border);
    position: relative;
    z-index: 3;
}

.floating-drag-bar:active {
    cursor: grabbing;
}

.drag-dots {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    line-height: 1;
}

.drag-title {
    flex: 1;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.floating-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: var(--icon-btn-bg);
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.floating-close-btn:hover {
    border-color: rgba(255, 80, 80, 0.4);
    background: rgba(255, 80, 80, 0.1);
    color: rgba(255, 80, 80, 0.8);
}

.floating-config-body {
    padding: 0.8rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    position: relative;
    z-index: 2;
}

.config-hint-text {
    font-size: 0.6rem;
    color: var(--text-dim);
    padding: 0.4rem 0.6rem;
    background: rgba(34, 211, 238, 0.05);
    border: 1px solid rgba(34, 211, 238, 0.1);
    border-radius: 6px;
    letter-spacing: 0.05em;
    text-align: center;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.input-group label {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--text-dim);
}

.label-hint {
    font-weight: 400;
    letter-spacing: 0;
    color: var(--text-label);
}

.input-group input {
    padding: 0.55rem 0.7rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.72rem;
    font-family: 'Consolas', 'Monaco', monospace;
    outline: none;
    transition: all 0.2s;
}

.input-group input::placeholder {
    color: var(--input-placeholder);
}

.input-group input:focus {
    border-color: var(--neon-accent);
    box-shadow: 0 0 12px var(--input-shadow-focus);
    background: var(--input-bg-focus);
}

.input-row {
    display: flex;
    gap: 0.6rem;
}

.input-row .input-group {
    flex: 1;
}

.config-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.3rem;
}

.inline-status {
    font-size: 0.65rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.1em;
}

.inline-status.success {
    color: var(--status-success);
    background: var(--status-success-bg);
    border: 1px solid var(--status-success-border);
}

.inline-status.error {
    color: var(--status-error);
    background: var(--status-error-bg);
    border: 1px solid var(--status-error-border);
}

/* ========== BUTTONS ========== */
.btn-neon {
    padding: 0.55rem 1.3rem;
    border-radius: 6px;
    border: 1px solid var(--neon-accent);
    background: linear-gradient(135deg, var(--btn-neon-bg-a), var(--btn-neon-bg-b));
    color: var(--neon-accent);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 8px var(--neon-glow);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.btn-neon:hover {
    background: linear-gradient(135deg, var(--btn-neon-hover-bg-a), var(--btn-neon-hover-bg-b));
    box-shadow:
        0 0 25px rgba(139, 92, 246, 0.3),
        0 0 50px rgba(139, 92, 246, 0.1);
    transform: translateY(-1px);
}

.btn-neon:active {
    transform: scale(0.97);
}

.btn-ghost {
    padding: 0.45rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-dim);
    font-size: 0.68rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ghost:hover {
    border-color: var(--glass-border-hover);
    color: var(--text-secondary);
    background: var(--btn-ghost-hover-bg);
}

.btn-tiny {
    padding: 0.3rem 0.5rem;
    font-size: 0.6rem;
    border-radius: 4px;
}

/* ========== FILE NAV ========== */
.file-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.3rem;
    border-top: 1px solid var(--file-nav-border);
    position: relative;
    z-index: 2;
}

.path-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-wrap: wrap;
}

.path-item {
    font-size: 0.65rem;
    color: var(--neon-accent);
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    transition: all 0.15s;
    letter-spacing: 0.08em;
}

.path-item:hover {
    background: var(--path-item-hover-bg);
    text-shadow: 0 0 6px var(--neon-glow);
}

.path-separator {
    font-size: 0.6rem;
    color: var(--text-dim);
    margin: 0 0.1rem;
}

.file-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1.3rem;
    position: relative;
    z-index: 2;
}

.search-field {
    flex: 1;
    padding: 0.45rem 0.65rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.65rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.05em;
    outline: none;
    transition: all 0.2s;
}

.search-field::placeholder {
    color: var(--input-placeholder);
}

.search-field:focus {
    border-color: var(--neon-accent);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.1);
}

.sort-field {
    padding: 0.45rem 0.5rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 0.6rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.05em;
    outline: none;
    cursor: pointer;
}

.sort-field option {
    background: var(--sort-option-bg);
    color: var(--text-primary);
}

/* ========== FILE LIST ========== */
.file-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
    padding: 0.3rem 0.8rem;
    position: relative;
    z-index: 2;
}

.file-list::-webkit-scrollbar {
    width: 3px;
}

.file-list::-webkit-scrollbar-track {
    background: transparent;
}

.file-list::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 2px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.file-item:hover {
    background: var(--file-item-hover-bg);
    border-color: var(--file-item-hover-border);
}

.file-item.active {
    background: var(--file-item-active-bg);
    border-color: var(--file-item-active-border);
    box-shadow: inset 0 0 20px var(--file-item-active-shadow);
}

.file-icon {
    font-size: 0.8rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    color: var(--neon-accent);
    opacity: 0.7;
}

.file-item.active .file-icon {
    opacity: 1;
    text-shadow: 0 0 6px var(--neon-glow);
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 0.7rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.03em;
}

.file-item.active .file-name {
    color: var(--neon-accent);
    text-shadow: 0 0 4px rgba(139, 92, 246, 0.3);
}

.file-meta {
    font-size: 0.55rem;
    color: var(--text-dim);
    margin-top: 0.15rem;
    letter-spacing: 0.05em;
}

.file-tag {
    font-size: 0.5rem;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    letter-spacing: 0.1em;
    flex-shrink: 0;
    border: 1px solid var(--tag-border);
    color: var(--text-dim);
}

.file-tag.vid {
    border-color: var(--tag-vid-border);
    color: var(--tag-vid-color);
}

.file-item.active .file-tag.vid {
    border-color: var(--tag-vid-active-border);
    color: var(--tag-vid-active-color);
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 2rem;
    color: var(--text-dim);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
}

.pulse-ring {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--neon-accent);
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

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

.empty-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    color: var(--text-dim);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
}

/* ========== PLAYER CARD ========== */
.player-card {
    flex: 1;
    min-width: 0;
}

.player-card .card-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

.now-playing {
    font-size: 0.7rem;
    color: var(--neon-accent);
    text-shadow: 0 0 6px rgba(139, 92, 246, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    letter-spacing: 0.05em;
}

.file-meta-tag {
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

/* ========== SCREEN / VIDEO PLAYER ========== */
.screen {
    position: relative;
    flex: 1;
    margin: 0 1rem 1rem;
    background: var(--screen-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow:
        0 0 30px var(--screen-shadow-outer),
        inset 0 0 40px var(--screen-shadow-inner);
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}

.screen video.active {
    display: block;
}

.screen-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen-placeholder.hidden {
    display: none;
}

.placeholder-art {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.hex-ring {
    width: 80px;
    height: 80px;
    border: 2px solid var(--hex-ring-border);
    border-radius: 50%;
    position: relative;
    animation: hex-spin 6s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.1);
}

.hex-ring::before,
.hex-ring::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.hex-ring::before {
    inset: -8px;
    border: 1px solid var(--hex-ring-border-before);
}

.hex-ring::after {
    inset: 8px;
    border: 1px solid var(--hex-ring-border-after);
    animation: hex-spin 4s linear infinite reverse;
}

.hex-ring-inner {
    width: 12px;
    height: 12px;
    background: var(--neon-accent);
    border-radius: 50%;
    box-shadow:
        0 0 10px var(--neon-glow),
        0 0 25px rgba(139, 92, 246, 0.4);
}

@keyframes hex-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.placeholder-label {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--neon-accent);
    text-shadow: 0 0 10px var(--neon-glow);
    animation: placeholder-pulse 2s ease-in-out infinite;
}

@keyframes placeholder-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

.placeholder-sub {
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    color: var(--text-dim);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .main-grid {
        flex-direction: column;
    }

    .file-card {
        width: 100%;
        max-height: 420px;
    }

    .screen {
        min-height: 280px;
    }
}

@media (max-width: 768px) {
    .dashboard {
        padding: 0.8rem 0.8rem;
    }

    .top-bar {
        padding: 0.6rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .brand-text {
        font-size: 0.8rem;
    }

    .clock-seg {
        width: 32px;
        height: 42px;
        font-size: 1.3rem;
    }

    .clock-colon {
        font-size: 1.2rem;
    }

    .input-row {
        flex-direction: column;
    }

    .screen {
        min-height: 200px;
        margin: 0 0.5rem 0.5rem;
    }

    .player-card .card-actions {
        flex-wrap: wrap;
    }
}
