/* ================================================================
   DJ PLAYLIST DOWNLOADER PRO — ULTRA-SOBER OLED BLACK STYLESHEET
   Mobile-First • High Contrast • Sleek Hardware Aesthetic
   ================================================================ */

:root {
    --bg-black: #000000;
    --bg-surface: #0a0a0c;
    --bg-card: #121215;
    --bg-card-hover: #18181c;
    --bg-input: #08080a;
    
    --border-subtle: #1e1e24;
    --border-focus: #3f3f46;
    --border-light: rgba(255, 255, 255, 0.12);

    --text-pure: #ffffff;
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --accent-white: #ffffff;
    --accent-black: #000000;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --topbar-height: 64px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    background-color: var(--bg-black);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* App Container */
.app-layout {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.65rem 0.75rem calc(75px + env(safe-area-inset-bottom, 0px)) 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

@media (min-width: 768px) {
    :root {
        --topbar-height: 72px;
    }
    .app-layout {
        padding: 1.25rem 1.5rem calc(80px + env(safe-area-inset-bottom, 0px)) 1.5rem;
        gap: 1.25rem;
    }
}

/* ================================================================
   1. APP TOPBAR (100% FLUSH TO TOP EDGE & STICKY)
   ================================================================ */
.app-topbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
    padding-top: max(0.45rem, env(safe-area-inset-top, 0px));
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.45rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .topbar-inner {
        padding: 0.65rem 1.5rem;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.nav-hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #141416;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.38rem 0.65rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.15s ease;
    min-height: 34px;
}

.nav-hub-btn:hover {
    background: #202024;
    color: var(--text-pure);
    border-color: var(--border-focus);
}

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

.brand-icon {
    font-size: 1.25rem;
    color: var(--text-pure);
    animation: spinSlow 15s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.brand-title {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-pure);
}

.topbar-hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #141418;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 32px;
}

.topbar-hub-btn:hover {
    background: #202026;
    color: var(--text-pure);
    border-color: var(--border-focus);
}

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

/* Indicador de Descargas Disponibles / Plan en Topbar */
.quota-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #101014;
    border: 1px solid var(--border-subtle);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.quota-pill:hover {
    background: #18181e;
    border-color: var(--border-focus);
    transform: translateY(-1px);
}

.quota-icon {
    font-size: 0.8rem;
    color: var(--accent-warning);
}

.quota-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.quota-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.quota-value {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-pure);
    font-family: var(--font-mono);
}

.quota-arrow {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-left: 2px;
}

/* ================================================================
   PLANES MODAL (CARROUSEL / GRID DE 3 PLANES)
   ================================================================ */
.plans-modal-box {
    max-width: 620px;
}

.plans-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-top: 0.5rem;
}

@media (min-width: 600px) {
    .plans-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
}

.plan-card {
    background: #0f0f13;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
    position: relative;
    transition: all 0.2s ease;
}

.plan-card:hover {
    border-color: var(--border-focus);
    background: #15151c;
}

.plan-card.active-plan {
    border-color: var(--accent-white);
    background: #141419;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}

.plan-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #27272a;
    color: #e4e4e7;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.plan-badge.featured {
    background: #ffffff;
    color: #000000;
}

.plan-title {
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-pure);
}

.plan-limit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.plan-limit strong {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-pure);
    font-family: var(--font-mono);
    line-height: 1;
}

.plan-limit span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: left;
    width: 100%;
}

.plan-features li {
    font-size: 0.72rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.plan-features li i {
    color: var(--accent-success);
    font-size: 0.65rem;
}

/* Exit Confirmation Modal */
.exit-modal-box {
    max-width: 420px;
}

/* Tab Progreso View Card */
.progress-view-card {
    min-height: 280px;
}

/* ================================================================
   2. APP BOTTOM BAR (MOBILE-FIRST NAVIGATION DOCK)
   ================================================================ */
.app-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(4, 4, 6, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border-subtle);
    padding-bottom: max(0.35rem, env(safe-area-inset-bottom, 0px));
    padding-top: 0.25rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7);
}

.bottom-nav-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.25rem;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    padding: 0.35rem 0.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    flex: 1;
    min-width: 0;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i {
    font-size: 1.15rem;
    color: var(--text-muted);
    transition: transform 0.15s ease, color 0.15s ease;
}

.bottom-nav-item:hover {
    color: var(--text-secondary);
}

.bottom-nav-item:hover i {
    color: var(--text-secondary);
}

.bottom-nav-item.active {
    color: var(--text-pure);
}

.bottom-nav-item.active i {
    color: var(--text-pure);
    transform: translateY(-1px);
}

.item-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bottom-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: #27272a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0 4px;
    border-radius: var(--radius-full);
    min-width: 14px;
    text-align: center;
    line-height: 14px;
}

/* Central Highlighted Button: Refrescar / Novedades */
.bottom-nav-center {
    flex: 1.15;
}

.center-btn-disc {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #141418;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-pure);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: -6px;
}

.center-btn-disc i {
    font-size: 1.05rem;
    color: var(--text-pure);
}

.bottom-nav-center:hover .center-btn-disc,
.bottom-nav-center:active .center-btn-disc {
    background: #222228;
    border-color: #ffffff;
    transform: scale(1.08);
}

.center-btn-disc.spinning i {
    animation: spinSlow 1s linear infinite;
}

/* ================================================================
   4. CARDS & SECTIONS
   ================================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-pure);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ================================================================
   5. SEARCH & URL INPUT CARD
   ================================================================ */
.search-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

@media (min-width: 640px) {
    .search-input-group {
        flex-direction: row;
    }
}

.input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.8rem 2.4rem 0.8rem 2.75rem;
    color: var(--text-pure);
    font-size: 16px; /* Prevents auto-zoom on mobile */
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.input-wrapper input:focus {
    border-color: var(--border-focus);
    background: #0d0d10;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.clear-btn {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 639px) {
    .action-buttons {
        width: 100%;
    }
    .action-buttons .btn {
        flex: 1;
    }
}

.quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

.option-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #18181c;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.option-pill.active {
    background: #27272a;
    color: var(--text-pure);
    border-color: var(--border-light);
}

/* ================================================================
   6. PROGRESS CARD
   ================================================================ */
.progress-card {
    background: #0f1715;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

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

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-pure);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-success);
    box-shadow: 0 0 10px var(--accent-success);
}

.live-dot.pulse {
    animation: pulseAnim 1.5s infinite;
}

@keyframes pulseAnim {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.badge-stats {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.progress-track-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #d1fae5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-success);
    border-radius: var(--radius-full);
    transition: width 0.25s ease-out;
}

/* ================================================================
   7. CONTENT GRID (RESPONSIVE)
   ================================================================ */
.content-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 880px) {
    .content-grid {
        display: grid;
        grid-template-columns: 1.15fr 0.85fr;
        gap: 1.25rem;
    }
}

.grid-column {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 280px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.column-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-pure);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-count {
    background: #27272a;
    color: var(--text-pure);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Channel Card */
.channel-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #18181c;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem;
}

.channel-thumb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-light);
}

.channel-details h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-pure);
}

.channel-details p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Results & Queue List */
.results-list, .queue-list, .library-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* Item Card */
.item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #151518;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    gap: 0.75rem;
    transition: all 0.15s ease;
}

.item-card:hover {
    background: #1a1a20;
    border-color: var(--border-focus);
}

.item-card-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.item-icon-box {
    width: 42px;
    height: 42px;
    background: #222227;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-pure);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.item-info {
    min-width: 0;
    flex: 1;
}

.item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-pure);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    gap: 0.4rem;
}

.empty-icon {
    font-size: 2.2rem;
    color: #27272a;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.empty-state .hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Queue Actions */
.queue-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* ================================================================
   8. LIBRARY TAB (DOWNLOADS READY)
   ================================================================ */
.library-card {
    min-height: 400px;
}

.library-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.library-item {
    display: flex;
    flex-direction: column;
    background: #141418;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    gap: 0.75rem;
    transition: all 0.15s ease;
}

@media (min-width: 640px) {
    .library-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.library-item:hover {
    border-color: var(--border-focus);
    background: #18181e;
}

.library-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.library-icon {
    width: 40px;
    height: 40px;
    background: #27272a;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-pure);
    flex-shrink: 0;
}

.library-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-pure);
    word-break: break-word;
}

.library-badge {
    font-size: 0.75rem;
    color: var(--accent-success);
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    margin-top: 2px;
}

.library-actions {
    display: flex;
    gap: 0.5rem;
}

/* ================================================================
   9. TERMINAL TAB
   ================================================================ */
.terminal-card {
    background: #050505;
    border: 1px solid var(--border-subtle);
    padding: 0;
    overflow: hidden;
}

.terminal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0d0d0f;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.6rem 1rem;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-actions {
    display: flex;
    gap: 0.4rem;
}

.btn-terminal {
    background: #18181b;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    cursor: pointer;
}

.btn-terminal:hover {
    background: #27272a;
    color: var(--text-pure);
}

.terminal-screen {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.6;
    padding: 1rem;
    height: 380px;
    overflow-y: auto;
    color: #e4e4e7;
    background: #000000;
}

.terminal-welcome {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
}

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

.term-line {
    word-break: break-all;
    white-space: pre-wrap;
    padding: 1px 0;
}

.term-line.system { color: #38bdf8; }
.term-line.success { color: #4ade80; }
.term-line.error { color: #f87171; }
.term-line.warn { color: #fbbf24; }

/* ================================================================
   10. BUTTONS & CONTROLS
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.15s ease;
    min-height: 44px;
}

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

.btn-primary {
    background: var(--accent-white);
    color: var(--accent-black);
    border-color: var(--accent-white);
}

.btn-primary:hover:not(:disabled) {
    background: #e4e4e7;
    border-color: #e4e4e7;
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: #18181b;
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: #27272a;
    border-color: var(--border-focus);
    color: var(--text-pure);
}

.btn-dark {
    background: transparent;
    border-color: var(--border-subtle);
    color: var(--text-muted);
}

.btn-dark:hover:not(:disabled) {
    background: #121214;
    color: var(--text-primary);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 0.85rem 1.4rem;
    font-size: 0.95rem;
    min-height: 48px;
}

.btn-sm {
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
    min-height: 38px;
}

/* ================================================================
   11. MODALS & OVERLAYS
   ================================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-pure);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header .success-text {
    color: var(--accent-success);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-pure);
}

.modal-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Form controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input, .form-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.9rem;
    color: var(--text-pure);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}

.form-input:focus, .form-select:focus {
    border-color: var(--border-focus);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--accent-white);
    width: 18px;
    height: 18px;
}

.strategy-options {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.strategy-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #18181c;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.strategy-option:hover {
    border-color: var(--border-focus);
}

.strategy-option input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--accent-white);
}

.option-details {
    display: flex;
    flex-direction: column;
}

.option-details strong {
    font-size: 0.85rem;
    color: var(--text-pure);
}

.option-details span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.summary-results-container {
    max-height: 220px;
    overflow-y: auto;
    background: #09090b;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.naming-preview-tag {
    font-size: 0.72rem;
    color: var(--text-muted);
}
