/* 
  CloudDL - V2 Strict Dashboard Theme
  Theme: UI Clean, Ordered, High Contrast Dark
*/

:root {
    /* Pure, Ordered Dark Mode Palette */
    --bg-window: #000000;      /* Absolutely pure black background */
    --bg-header: #0a0a0a;      /* Almost black for header */
    --bg-card: #111111;        /* slightly elevated */
    --bg-input: #1a1a1a;
    --bg-hover: #222222;
    
    --border-color: #262626;   /* Crisp, rigid border */
    
    --text-primary: #ededed;
    --text-secondary: #a1a1aa;
    
    --accent: #ffffff;         /* Pure white accent (high-end minimal) */
    --accent-hover: #e5e5e5;
    --accent-text: #000000;    /* Black text on white elements */
    
    --danger: #ef4444;
    --success: #10b981;
    
    --font-ui: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

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

body {
    font-family: var(--font-ui);
    background-color: var(--bg-window);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* TOP NAVIGATION */
.topbar {
    width: 100%;
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0; left: 0;
    z-index: 100;
}

.topbar-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.topbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar .logo .icon {
    width: 28px;
    height: 28px;
}

.topbar .logo .text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-btn.active {
    background: var(--text-primary);
    color: var(--bg-window);
    font-weight: 600;
}

/* MAIN CONTENT CONTAINER */
.main-content {
    max-width: 800px; /* Highly constrained to keep everything ordered */
    margin: 100px auto 40px auto; /* 100px gives breathing room under fixed header */
    padding: 24px;
    min-height: calc(100vh - 140px);
}

.tab-pane {
    display: none;
    animation: fadeUp 0.3s ease;
}

.tab-pane.active {
    display: block;
}

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

/* PAGES / DASHBOARD ALIGNMENT */
.page-header {
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

/* HOME TAB - CENTER STAGE */
.center-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
}

.hero-logo {
    text-align: center;
    margin-bottom: 40px;
}

.hero-img {
    width: 140px;
    height: auto;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-primary);
}

/* INPUTS & WRAPPERS */
.url-input-wrapper {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    transition: border-color 0.2s;
}

.url-input-wrapper:focus-within {
    border-color: var(--accent);
}

.url-icon {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 4px 8px;
    border-radius: 4px;
}

.url-input-wrapper input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 15px;
    flex: 1;
    margin: 0 16px;
    outline: none;
}

.url-input-wrapper input::placeholder {
    color: var(--text-secondary);
    font-family: var(--font-ui);
}

.clear-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}
.clear-btn:hover { color: var(--text-primary); }

.submit-btn {
    background: var(--text-primary);
    color: var(--bg-window);
    border: none;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-left: 12px;
    transition: 0.2s;
}

.submit-btn:hover {
    background: var(--accent-hover);
}

/* BUTTONS & PILLS */
.options-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.pill-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: 0.2s;
}

.pill-btn:hover {
    background: var(--bg-hover);
}

.pill-btn.highlight {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

.w-full { width: 100%; }

.btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    background: var(--bg-hover);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-window);
    border-color: transparent;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.98); }

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

/* CARDS & POPUPS */
.preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    margin-top: 32px;
    text-align: left;
}

.preview-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

#previewThumb {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
}

.details .name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.details .meta {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.popup {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 16px;
    text-align: left;
    display: none;
    width: 100%;
    animation: fadeUp 0.2s;
}
.popup.active { display: block; }

.popup-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* SETTINGS GROUPS */
.settings-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.settings-label {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.settings-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.settings-input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: 14px;
    outline: none;
    width: 100%;
}
.settings-input:focus { border-color: var(--text-secondary); }

/* STATUS & LOGS */
.status-area { margin-top: 24px; width: 100%; }

.banner {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-mono);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}
.banner-info { border-left: 3px solid var(--text-primary); }
.banner-success { border-left: 3px solid var(--success); }
.banner-error { border-left: 3px solid var(--danger); }

.progress-track {
    background: var(--bg-input);
    border-radius: 9999px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-fill {
    height: 100%;
    background: var(--text-primary);
    transition: width 0.3s linear;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* TORRENTS */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px 24px;
    text-align: center;
    background: var(--bg-input);
    cursor: pointer;
    transition: 0.2s;
}
.drop-zone:hover { border-color: var(--text-secondary); }

.drop-zone .icon { font-size: 32px; margin-bottom: 12px; }
.drop-zone .text { font-size: 14px; font-weight: 500; color: var(--text-secondary); }

.torrent-file-list {
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    margin-bottom: 16px;
}

.torrent-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.torrent-file-item:hover { background: var(--bg-hover); }

.torrent-file-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-window);
    border: 1px solid var(--border-color);
    width: 18px;
    height: 18px;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}
.torrent-file-item input[type="checkbox"]:checked {
    background: var(--text-primary);
}
.torrent-file-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px; top: 3px;
    width: 4px; height: 8px;
    border: solid var(--bg-window);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.tf-name { flex: 1; font-size: 13px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-size { font-size: 12px; color: var(--text-secondary); font-family: var(--font-mono); }

/* HISTORY & ACCOUNT */
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 24px;
}
.avatar-large {
    width: 80px; height: 80px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.account-info .name { font-size: 20px; font-weight: 700; }
.account-info .email { color: var(--text-secondary); }

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

/* LOGIN */
.login-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-window);
    display: none;
    align-items: center; justify-content: center;
    z-index: 1000;
}
.login-overlay.active { display: flex; }
.login-card {
    text-align: center;
    padding: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    max-width: 400px; width: 100%;
}
.login-header { margin-bottom: 24px; }
.login-logo { width: 100px; margin-bottom: 16px; }
.logo-big { font-size: 28px; font-weight: 700; letter-spacing: -1px; }
.error-text { color: var(--danger); font-size: 13px; margin-top: 16px; }

/* Server status */
.req-indicator { font-size: 13px; font-weight: 500; }
.req-indicator.online { color: var(--success); }
.req-indicator.offline { color: var(--danger); }

/* RESPONSIVE */
@media (max-width: 768px) {
    .topbar-container { 
        flex-direction: column; 
        padding: 12px;
        gap: 12px;
    }
    .nav-menu {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
        justify-content: flex-start;
    }
    .nav-menu::-webkit-scrollbar {
        height: 0px;
    }
    .main-content { margin-top: 100px; padding: 16px; }
    .hero-title { font-size: 24px; }
    .url-input-wrapper { flex-direction: column; gap: 12px; align-items: stretch; padding: 12px; }
    .url-input-wrapper input { margin: 0; }
    .submit-btn { margin-left: 0; }
    .options-row { flex-direction: column; }
    .pill-btn, .btn { width: 100%; }
}

/* ── Google Drive open button ───────────────────────────────────────────────── */
.btn-drive {
    display: block;
    margin-top: 12px;
    background: #10b981;
    color: #fff;
    border: none;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}
.btn-drive:hover { background: #059669; }
.btn-drive:active { transform: scale(0.98); }

/* ── banner-success upgrade ─────────────────────────────────────────────────── */
.banner-success {
    border-left: 3px solid var(--success);
    background: rgba(16, 185, 129, 0.08);
}

/* ── Login button loading state ─────────────────────────────────────────────── */
.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}
.btn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 10px;
    border: 2px solid rgba(0,0,0,0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

/* ── Inline spinner (magnet analysis) ──────────────────────────────────────── */
.spinner-inline {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

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

/* ── Toast notifications ────────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--text-primary);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
    max-width: 320px;
}

.toast.visible {
    opacity: 1;
    transform: translateX(0);
}

.toast-info  { border-left: 3px solid var(--text-primary); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-success { border-left: 3px solid var(--success); }

/* ── Improved history items ─────────────────────────────────────────────────── */
.history-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.h-left { flex: 1; min-width: 0; }
.h-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.h-meta {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}
.h-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.h-stat { font-size: 13px; }
.h-drive-link {
    font-size: 12px;
    color: #10b981;
    text-decoration: none;
    font-family: var(--font-mono);
}
.h-drive-link:hover { text-decoration: underline; }

/* ── Responsive additions ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .toast-container { bottom: 12px; right: 12px; left: 12px; }
    .toast { max-width: 100%; }
    .history-item { flex-direction: column; gap: 8px; }
    .h-right { align-items: flex-start; }
}

/* ── Legal links (Account tab) ──────────────────────────────────────────────── */
.legal-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.legal-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.legal-link:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background: var(--bg-hover);
}

.legal-icon {
    font-size: 14px;
}

/* ── Quality badges ─────────────────────────────────────────────────────────── */
.quality-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.quality-badge {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.15s;
}
.quality-badge:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.quality-badge.active {
    background: var(--text-primary);
    color: var(--bg-window);
    border-color: var(--text-primary);
}

/* ── Recent URL dropdown ────────────────────────────────────────────────────── */
.recent-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    z-index: 200;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.recent-item {
    padding: 10px 16px;
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s, color 0.15s;
}
.recent-item:hover { background: var(--bg-hover); color: var(--text-primary); }
/* make url-input-wrapper position:relative so dropdown anchors correctly */
.url-input-wrapper { position: relative; }

/* ── Speed graph ─────────────────────────────────────────────────────────────── */
.speed-graph-container {
    margin-top: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px 8px;
}
.speed-graph-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.speed-graph {
    width: 100%;
    min-height: 52px;
}

/* ── Batch URL textarea ──────────────────────────────────────────────────────── */
.batch-textarea {
    width: 100%;
    min-height: 140px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 12px 16px;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
    margin-bottom: 0;
    display: block;
}
.batch-textarea:focus { border-color: var(--text-secondary); }

/* ── Full Mobile Responsive ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
    /* Nav */
    .topbar-container {
        flex-direction: column;
        padding: 10px 16px;
        gap: 10px;
    }
    .topbar .logo .text { font-size: 17px; }
    .nav-menu {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
        justify-content: flex-start;
        gap: 4px;
    }
    .nav-menu::-webkit-scrollbar { height: 0; }
    .nav-btn { font-size: 13px; padding: 6px 12px; }

    /* Main */
    .main-content { margin-top: 110px; padding: 12px; }
    .hero-title { font-size: 20px; }

    /* URL input */
    .url-input-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }
    .url-input-wrapper input { min-width: 0; flex: 1 1 100%; margin: 0; font-size: 14px; }
    .url-icon { display: none; }
    .submit-btn { flex: 1; margin-left: 0; font-size: 13px; }
    .clear-btn { font-size: 18px; }

    /* Options row */
    .options-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .pill-btn { width: 100%; font-size: 12px; padding: 8px 10px; }

    /* Cards */
    .preview-card { padding: 16px; }
    .preview-info { flex-direction: column; gap: 12px; }
    #previewThumb { width: 60px; height: 60px; }

    /* Torrent file list */
    .torrent-file-list { max-height: 260px; }

    /* Quality badges */
    .quality-badge { font-size: 11px; padding: 5px 10px; }

    /* Settings */
    .settings-group { padding: 16px; }

    /* History */
    .history-item { flex-direction: column; gap: 8px; }
    .h-right { align-items: flex-start; }

    /* Toast */
    .toast-container { bottom: 10px; right: 10px; left: 10px; }
    .toast { max-width: 100%; }

    /* Account */
    .account-info { flex-direction: column; text-align: center; }
    .avatar-large { width: 60px; height: 60px; }

    /* Popups */
    .popup { padding: 16px; }

    /* Batch textarea */
    .batch-textarea { min-height: 100px; font-size: 12px; }

    /* Speed graph */
    .speed-graph-container { padding: 10px 12px 6px; }
}

/* ── Themes ─────────────────────────────────────────────────────────────────── */
/* Midnight Blue (Default is already AMOLED-like, so we'll map midnight to standard dark) */
body.theme-midnight {
    --bg-window: #09090b;
    --bg-header: #09090b;
    --bg-card: #141416;
    --bg-input: #1f1f22;
    --bg-hover: #29292c;
    --border-color: #27272a;
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --accent: #2563eb;
    --accent-hover: #3b82f6;
    --accent-text: #ffffff;
}

body.theme-cyberpunk {
    --bg-window: #0c0822;
    --bg-header: #0c0822;
    --bg-card: #140d36;
    --bg-input: #20155e;
    --bg-hover: #ff007f30;
    --border-color: #4b3e8c;
    --text-primary: #00ffcc;
    --text-secondary: #ff007f;
    --accent: #ff007f;
    --accent-hover: #cc0066;
    --accent-text: #ffffff;
    --success: #00ffcc;
    --danger: #ff3333;
}

body.theme-amoled {
    /* Pure, Ordered Dark Mode Palette */
    --bg-window: #000000;
    --bg-header: #0a0a0a;
    --bg-card: #111111;
    --bg-input: #1a1a1a;
    --bg-hover: #222222;
    --border-color: #262626;
    --text-primary: #ededed;
    --text-secondary: #a1a1aa;
    --accent: #ffffff;
    --accent-hover: #e5e5e5;
    --accent-text: #000000;
}

body.theme-light {
    --bg-window: #f4f4f5;
    --bg-header: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #e4e4e7;
    --bg-hover: #d4d4d8;
    --border-color: #d4d4d8;
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --accent: #09090b;
    --accent-hover: #27272a;
    --accent-text: #ffffff;
}

/* Adjust button text contrast for light theme */
body.theme-light .pill-btn,
body.theme-light .btn-danger,
body.theme-light .clear-btn { color: var(--text-primary); }
body.theme-light .pill-btn.active { color: var(--accent-text); border-color: var(--accent); }
body.theme-light .pill-btn:hover { background: var(--bg-hover); border-color: var(--border-color); }

