/* Dark Premium: high-contrast design for mastermind clubs and premium formats */
:root {
    --app-bg: #080b14;
    --app-card: #111827;
    --app-border: rgba(148, 163, 184, 0.18);
    --app-primary: #8b5cf6;
    --app-primary-dark: #7c3aed;
    --app-soft: rgba(139, 92, 246, .16);
    --app-text: #e5e7eb;
    --app-muted: #9ca3af;
    --app-success: #34d399;
}

body.theme-dark {
    background:
        radial-gradient(circle at top left, rgba(139, 92, 246, .20), transparent 28rem),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, .12), transparent 30rem),
        linear-gradient(180deg, #050816 0%, #0f172a 52%, #020617 100%);
    color: var(--app-text);
}

.theme-dark .app-navbar {
    background: rgba(2, 6, 23, .82);
    border-bottom-color: rgba(148, 163, 184, .16);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
}

.theme-dark .app-navbar .navbar-brand,
.theme-dark .app-navbar .navbar-brand:hover,
.theme-dark .app-navbar .navbar-brand:focus {
    color: #f9fafb !important;
}

.theme-dark .card,
.theme-dark .hero-card,
.theme-dark .page-head,
.theme-dark .hero-demo-panel,
.theme-dark .feature-card,
.theme-dark .telegram-cta-box,
.theme-dark .auth-card,
.theme-dark .qr-screen-card,
.theme-dark .qr-frame {
    background: rgba(17, 24, 39, .88);
    border-color: var(--app-border);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .32) !important;
    color: var(--app-text);
}

.theme-dark .landing-hero {
    background:
        radial-gradient(circle at top right, rgba(139, 92, 246, .26), transparent 18rem),
        linear-gradient(135deg, rgba(17, 24, 39, .96) 0%, rgba(15, 23, 42, .92) 52%, rgba(30, 41, 59, .88) 100%);
    border-color: var(--app-border);
}

.theme-dark .text-muted,
.theme-dark .format-description,
.theme-dark .table thead th,
.theme-dark .theme-switcher-label {
    color: var(--app-muted) !important;
}

.theme-dark .btn-nav,
.theme-dark .user-pill,
.theme-dark .scenario-question,
.theme-dark .workflow-question-preview,
.theme-dark .info-box,
.theme-dark .copy-link-box,
.theme-dark .format-option,
.theme-dark .form-actions-bar,
.theme-dark .theme-switcher {
    background: rgba(15, 23, 42, .82);
    border-color: var(--app-border);
    color: var(--app-text);
}

.theme-dark .btn-outline-dark {
    color: #e5e7eb;
    border-color: rgba(229, 231, 235, .35);
}

.theme-dark .btn-outline-dark:hover {
    background: #e5e7eb;
    color: #0f172a;
}

.theme-dark .btn-outline-secondary,
.theme-dark .btn-outline-primary,
.theme-dark .btn-outline-danger,
.theme-dark .btn-outline-success {
    border-color: rgba(148, 163, 184, .28);
}

.theme-dark .form-control,
.theme-dark .form-select,
.theme-dark textarea {
    background-color: rgba(2, 6, 23, .70);
    color: #f9fafb;
    border-color: rgba(148, 163, 184, .24);
}

.theme-dark .form-control:focus,
.theme-dark .form-select:focus {
    background-color: rgba(2, 6, 23, .90);
    color: #f9fafb;
    border-color: var(--app-primary);
    box-shadow: 0 0 0 .25rem rgba(139, 92, 246, .16);
}

.theme-dark .form-control::placeholder {
    color: #94a3b8;
}

.theme-dark .table {
    color: var(--app-text);
}

.theme-dark .table td,
.theme-dark .table th {
    border-color: rgba(148, 163, 184, .13);
}

.theme-dark .table-hover tbody tr:hover {
    color: #f9fafb;
    background-color: rgba(139, 92, 246, .08);
}

.theme-dark .demo-row {
    border-bottom-color: rgba(148, 163, 184, .14);
}

.theme-dark .feature-icon,
.theme-dark .auth-icon,
.theme-dark .theme-link.active {
    background: var(--app-primary);
}

.theme-dark .eyebrow,
.theme-dark .scenario-question-number {
    color: #ddd6fe;
    background: rgba(139, 92, 246, .18);
}

.theme-dark .format-option:hover,
.theme-dark .format-option.active {
    border-color: rgba(167, 139, 250, .55);
    background: linear-gradient(135deg, rgba(139, 92, 246, .18) 0%, rgba(17, 24, 39, .92) 100%);
}

.theme-dark .format-title,
.theme-dark a:not(.btn):not(.theme-link):not(.navbar-brand) {
    color: #e5e7eb;
}

.theme-dark .stat-card {
    background: linear-gradient(180deg, rgba(17, 24, 39, .98) 0%, rgba(30, 41, 59, .92) 100%);
}

.theme-dark .app-footer {
    border-top-color: rgba(148, 163, 184, .14);
}

.theme-dark .copy-toast {
    background: #f9fafb;
    color: #0f172a;
}
