
    :root {
        --bg: #0a0a0f;
        --surface: #111118;
        --border: #1e1e2e;
        --accent: #7fffff;
        --accent2: #ff7fff;
        --text: #e8e8f0;
        --muted: #555570;
        --success: #00ffaa;
        --error: #ff4466;
        --warn: #ffaa00;
        --radius: 12px;
    }

    .fmt-pill {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.75rem;
        padding: 5px 14px;
        border-radius: 999px;
        border: 1px solid var(--border);
        color: var(--muted);
        letter-spacing: 0.08em;
    }

    .fmt-pill.active {
        border-color: var(--accent);
        color: var(--accent);
        background: rgba(127, 255, 255, 0.06);
    }


    /* ── Drop Zone ── */
    .drop-zone {
        position: relative;
        padding: 52px 32px;
        text-align: center;
        cursor: pointer;
        border-bottom: 1px solid var(--border);
        transition: background 0.2s;
    }

    .drop-zone::before {
        content: '';
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient(45deg,
                transparent,
                transparent 20px,
                rgba(127, 255, 255, 0.015) 20px,
                rgba(127, 255, 255, 0.015) 21px);
        pointer-events: none;
    }

    .drop-zone:hover,
    .drop-zone.over {
        background: rgba(127, 255, 255, 0.03);
    }

    .drop-zone input {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
        width: 100%;
        height: 100%;
    }

    .dz-icon {
        font-size: 2.8rem;
        margin-bottom: 14px;
        filter: grayscale(0.3);
    }

    .dz-title {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 6px;
    }

    .dz-title span {
        color: var(--primary-color);
    }

    .dz-sub {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.75rem;
        color: var(--muted);
        letter-spacing: 0.05em;
    }

    /* ── Config Panel ── */
    .config {
        padding: 24px 32px;
        border-bottom: 1px solid var(--border);
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 20px;
    }

    @media (max-width: 520px) {
        .config {
            grid-template-columns: 1fr 1fr;
        }
    }

    .field label {
        display: block;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.68rem;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin-bottom: 8px;
    }

    .seg-btn-group {
        display: flex;
        border: 1px solid var(--border);
        border-radius: 8px;
        overflow: hidden;
    }

    .seg-btn {
        flex: 1;
        padding: 8px 0;
        background: transparent;
        border: none;
        color: var(--muted);
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.78rem;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
    }

    .seg-btn:not(:last-child) {
        border-right: 1px solid var(--border);
    }

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

    .seg-btn.active-pink {
        background: rgba(255, 127, 255, 0.1);
        color: var(--accent2);
    }

    select,
    input[type="number"] {
        width: 100%;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--text);
        padding: 8px 12px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.8rem;
        outline: none;
    }

    select:focus,
    input[type="number"]:focus {
        border-color: var(--accent);
    }

    /* ── File Queue ── */
    .queue {
        padding: 0 32px;
        max-height: 280px;
        overflow-y: auto;
    }

    .queue:empty {
        display: none;
    }

    .queue:not(:empty) {
        padding: 16px 32px;
        border-bottom: 1px solid var(--border);
    }

    .q-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .q-item:last-child {
        border-bottom: none;
    }

    .q-ext {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.65rem;
        font-weight: 500;
        padding: 3px 7px;
        border-radius: 5px;
        background: var(--primary-color);
        color: white;
        border: 1px solid rgba(127, 255, 255, 0.15);
        text-transform: uppercase;
        flex-shrink: 0;
    }

    .q-ext.eps {
        background: rgba(255, 127, 255, 0.08);
        color: var(--accent2);
        border-color: rgba(255, 127, 255, 0.15);
    }

    .q-name {
        flex: 1;
        font-size: 0.84rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .q-size {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.72rem;
        color: var(--muted);
        white-space: nowrap;
    }

    .q-badge {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.68rem;
        padding: 3px 9px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.06);
        color: var(--muted);
        white-space: nowrap;
        flex-shrink: 0;
    }

    .q-badge.processing {
        background: rgba(127, 127, 255, 0.12);
        color: #aaaaff;
    }

    .q-badge.done {
        background: rgba(0, 255, 170, 0.1);
        color: var(--success);
    }

    .q-badge.error {
        background: rgba(255, 68, 102, 0.1);
        color: var(--error);
    }

    /* ── Actions ── */
    .actions {
        padding: 24px 32px;
        display: flex;
        gap: 12px;
    }

    .btn-primary {
        flex: 1;
        padding: 14px;
        border: none;
        border-radius: 10px;
        background: var(--primary-color) !important;
        color: #000;
        font-family: 'Syne', sans-serif;
        font-size: 0.95rem;
        font-weight: 700;
        cursor: pointer;
        transition: opacity 0.2s, transform 0.1s;
        letter-spacing: 0.02em;
    }

    .btn-primary:hover:not(:disabled) {
        opacity: 0.85;
        transform: translateY(-1px);
    }

    /* .btn-primary:disabled { opacity: 0.3; cursor: not-allowed; } */

    .btn-secondary {
        padding: 14px 20px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: transparent;
        color: var(--muted);
        font-family: 'Syne', sans-serif;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        transition: border-color 0.2s, color 0.2s;
    }

    .btn-secondary:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

    .btn-secondary:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

    /* ── Progress ── */
    .progress-bar {
        height: 2px;
        background: var(--border);
        position: relative;
        overflow: hidden;
    }

    .progress-bar.hidden {
        display: none;
    }

    .progress-fill {
        height: 100%;
        background: linear-gradient(90deg, var(--accent), var(--accent2));
        width: 0%;
        transition: width 0.4s ease;
        position: relative;
    }

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

    @keyframes shimmer {
        from {
            opacity: 0
        }

        50% {
            opacity: 1
        }

        to {
            opacity: 0
        }
    }

    /* ── Status Bar ── */
    .status-bar {
        padding: 12px 32px;
        border-top: 1px solid var(--border);
        display: flex;
        align-items: center;
        gap: 10px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.75rem;
        min-height: 42px;
    }

    .status-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--muted);
        flex-shrink: 0;
    }

    .status-dot.loading {
        background: var(--warn);
        animation: pulse 1s ease-in-out infinite;
    }

    .status-dot.ready {
        background: var(--success);
    }

    .status-dot.error {
        background: var(--error);
    }

    @keyframes pulse {

        0%,
        100% {
            opacity: 0.4
        }

        50% {
            opacity: 1
        }
    }

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

    .status-text.ok {
        color: #000;
    }

    .status-text.err {
        color: var(--error);
    }

    /* ── Download Results ── */
    .results {
        padding: 0 32px 24px;
        display: none;
        flex-direction: column;
        gap: 10px;
    }

    .results.show {
        display: flex;
    }

    .results-title {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.7rem;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.1em;
        padding-top: 8px;
        margin-bottom: 4px;
    }

    .result-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        /* background: rgba(0, 255, 170, 0.04); */
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: 8px;
    }

    .result-item .ri-name {
        flex: 1;
        font-size: 0.84rem;
        color: #000;
    }

    .result-item .ri-size {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.72rem;
        color: var(--muted);
    }

    .btn-dl {
        padding: 5px 14px;
        border: 1px solid rgba(0, 255, 170, 0.25);
        border-radius: 6px;
        background: green;
        color: white;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.72rem;
        cursor: pointer;
        transition: background 0.15s;
        white-space: nowrap;
    }

    /* .btn-dl:hover {
        background: rgba(0, 255, 170, 0.1);
    } */

    .btn-dl-all {
        width: 100%;
        padding: 11px;
        border: 1px solid rgba(127, 255, 255, 0.2);
        border-radius: 10px;
        background: transparent;
        color: var(--accent);
        font-family: 'Syne', sans-serif;
        font-size: 0.88rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s;
    }

    .btn-dl-all:hover {
        background: rgba(127, 255, 255, 0.06);
    }

    /* ── Note ── */
    .note {
        margin-top: 28px;
        max-width: 680px;
        width: 100%;
        padding: 16px 20px;
        border: 1px solid var(--border);
        border-radius: 12px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.75rem;
        color: var(--muted);
        line-height: 1.8;
    }

    .note strong {
        color: var(--accent);
        font-weight: 500;
    }

    .note .row {
        display: flex;
        gap: 8px;
        margin-bottom: 4px;
    }

    .note .row:last-child {
        margin-bottom: 0;
    }

    .note .arrow {
        color: var(--accent2);
        flex-shrink: 0;
    }

    ::-webkit-scrollbar {
        width: 4px;
    }

    .card {
        border: 2px dashed rgba(0, 0, 0, 0.3);
    }

    ::-webkit-scrollbar-track {
        background: transparent;
    }

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