/* DebateRoom — Modern SaaS UI */

:root,
html[data-theme="midnight"] {
    --bg: #07070c;
    --bg-gradient: linear-gradient(160deg, #07070c 0%, #0d1118 50%, #121018 100%);
    --surface: rgba(18, 18, 28, 0.72);
    --topbar-bg: rgba(7, 7, 12, 0.85);
    --border: rgba(255, 255, 255, 0.08);
    --text: #eef0f6;
    --muted: #8b90a5;
    --accent: #6ee7a8;
    --accent-dim: #08b162;
    --blue: #5b9dff;
    --orange: #ff9f5a;
    --red: #ff5c6c;
    --yt: #ff0033;
    --glow-1: rgba(110, 231, 168, 0.12);
    --glow-2: rgba(91, 157, 255, 0.1);
    --glow-3: rgba(255, 159, 90, 0.06);
    --hero-gradient: linear-gradient(90deg, #6ee7a8, #5b9dff);
    --radius: 16px;
    --font: "Inter", system-ui, sans-serif;
    --display: "Space Grotesk", var(--font);
}

html[data-theme="ocean"] {
    --bg: #041018;
    --bg-gradient: linear-gradient(165deg, #020810 0%, #062032 40%, #0a2840 100%);
    --surface: rgba(8, 28, 44, 0.78);
    --topbar-bg: rgba(4, 16, 24, 0.9);
    --border: rgba(100, 200, 255, 0.12);
    --text: #e8f4fc;
    --muted: #7eb8d4;
    --accent: #5eead4;
    --accent-dim: #14b8a6;
    --blue: #38bdf8;
    --orange: #fdba74;
    --red: #fb7185;
    --glow-1: rgba(56, 189, 248, 0.18);
    --glow-2: rgba(20, 184, 166, 0.15);
    --glow-3: rgba(6, 182, 212, 0.1);
    --hero-gradient: linear-gradient(90deg, #5eead4, #38bdf8);
}

html[data-theme="sunrise"] {
    --bg: #1a0a12;
    --bg-gradient: linear-gradient(165deg, #1a0a12 0%, #3d1528 35%, #6b2818 70%, #2a1520 100%);
    --surface: rgba(40, 20, 30, 0.75);
    --topbar-bg: rgba(26, 10, 18, 0.88);
    --border: rgba(255, 180, 140, 0.14);
    --text: #fff5f0;
    --muted: #d4a898;
    --accent: #ffb347;
    --accent-dim: #ff8c42;
    --blue: #ff9a8b;
    --orange: #ff6b6b;
    --red: #ff4757;
    --glow-1: rgba(255, 140, 66, 0.2);
    --glow-2: rgba(255, 107, 107, 0.15);
    --glow-3: rgba(255, 179, 71, 0.12);
    --hero-gradient: linear-gradient(90deg, #ffb347, #ff6b6b);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background: var(--bg-gradient);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.3s ease;
}

body.modal-open { overflow: hidden; }

.bg-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, var(--glow-1), transparent),
        radial-gradient(ellipse 60% 40% at 90% 10%, var(--glow-2), transparent),
        radial-gradient(ellipse 50% 30% at 50% 100%, var(--glow-3), transparent);
    z-index: 0;
    transition: background 0.6s ease;
}

.glass {
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--topbar-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--display);
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.brand strong {
    display: block;
    font-family: var(--display);
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.brand small {
    color: var(--muted);
    font-size: 0.75rem;
}

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

/* Main menu — Debate / EdTech */
.main-menu {
    display: flex;
    gap: 0.35rem;
    padding: 0.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.menu-tab {
    padding: 0.45rem 0.9rem;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.2s;
}

.menu-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.menu-tab.active {
    background: rgba(110, 231, 168, 0.14);
    color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(110, 231, 168, 0.25);
}

.hidden { display: none !important; }

/* EdTech view */
.edtech-hero span { background: var(--hero-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.edtech-case {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.edtech-case-head {
    margin-bottom: 1.25rem;
}

.edtech-case-head h2 {
    margin: 0.5rem 0 0;
    font-family: var(--display);
    font-size: 1.35rem;
}

.badge-edtech {
    background: rgba(91, 157, 255, 0.15);
    color: var(--blue);
    border: 1px solid rgba(91, 157, 255, 0.3);
}

.edtech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.edtech-card {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border);
}

.edtech-card h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.edtech-card p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.55;
}

.edtech-steps {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.edtech-input { margin-bottom: 1.5rem; }

.edtech-form-title {
    margin: 0 0 1rem;
    font-family: var(--display);
    font-size: 1.1rem;
}

.edtech-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.preset-chip {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(91, 157, 255, 0.08);
    color: var(--blue);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.preset-chip:hover {
    background: rgba(91, 157, 255, 0.18);
    border-color: rgba(91, 157, 255, 0.35);
}

.edtech-fields {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.edtech-fields input,
.edtech-fields textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text);
    font-size: 0.92rem;
    font-family: inherit;
    resize: vertical;
}

.edtech-fields input:focus,
.edtech-fields textarea:focus {
    outline: none;
    border-color: rgba(91, 157, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(91, 157, 255, 0.12);
}

.edtech-stage { margin-bottom: 2rem; }

@media (max-width: 900px) {
    .topbar { flex-wrap: wrap; gap: 0.75rem; }
    .main-menu { order: 3; width: 100%; justify-content: center; }
}

/* Language switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.lang-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, background 0.15s;
    display: grid;
    place-items: center;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.08);
}

.lang-btn.active {
    border-color: var(--accent);
    background: rgba(110, 231, 168, 0.12);
    box-shadow: 0 0 12px rgba(110, 231, 168, 0.2);
}

.lang-flag {
    font-size: 1.25rem;
    line-height: 1;
}

/* Theme switcher */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.theme-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, background 0.15s;
    display: grid;
    place-items: center;
}

.theme-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.08);
}

.theme-btn.active {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 40%, transparent);
}

.theme-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.glass,
.panel,
.input-bar,
.roadmap,
.modal-card {
    transition: background 0.4s ease, border-color 0.4s ease;
}


/* RTL (Arabic) */
html[dir="rtl"] .topbar,
html[dir="rtl"] .panel-head,
html[dir="rtl"] .url-row,
html[dir="rtl"] .status-row,
html[dir="rtl"] .bubble-header,
html[dir="rtl"] .footer {
    flex-direction: row-reverse;
}

html[dir="rtl"] .brand,
html[dir="rtl"] .nav-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .bubble.analyst,
html[dir="rtl"] .bubble.cynic {
    border-left: none;
    border-right: 3px solid var(--blue);
}

html[dir="rtl"] .bubble.cynic {
    border-right-color: var(--orange);
}

html[dir="rtl"] .article-card,
html[dir="rtl"] .topic-info {
    text-align: right;
}

html[dir="rtl"] .typing,
html[dir="rtl"] .hero,
html[dir="rtl"] .roadmap-text {
    text-align: right;
}

html[dir="rtl"] .hero h1 {
    text-align: right;
}


/* Buttons */
.btn {
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    font-family: inherit;
}

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

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

.btn.primary {
    background: linear-gradient(135deg, var(--accent-dim), #0dd97a);
    color: #041208;
    box-shadow: 0 4px 20px rgba(8, 177, 98, 0.35);
}

.btn.danger {
    background: linear-gradient(135deg, #c0392b, var(--red));
    color: #fff;
}

.btn.outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
}

.btn.full { width: 100%; }

.btn.google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #fff;
    color: #1f1f1f;
    border: 1px solid #dadce0;
    font-weight: 600;
    text-decoration: none;
}

.btn.google:hover:not(:disabled) {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn.sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.auth-area {
    display: flex;
    align-items: center;
}

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

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-divider {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin: 1rem 0;
    position: relative;
}

.form-divider::before,
.form-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border);
}

.form-divider::before { left: 0; }
.form-divider::after { right: 0; }

.google-icon { flex-shrink: 0; }


/* Shell */
.shell {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-family: var(--display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 1rem;
    letter-spacing: -0.03em;
}

.hero h1 span {
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lead {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* Input bar */
.input-bar {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.tab.active {
    background: rgba(110, 231, 168, 0.12);
    border-color: rgba(110, 231, 168, 0.3);
    color: var(--accent);
}

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

.url-row input {
    flex: 1 1 280px;
    min-width: 0;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
}

.url-row input:focus {
    outline: none;
    border-color: rgba(110, 231, 168, 0.5);
    box-shadow: 0 0 0 3px rgba(110, 231, 168, 0.12);
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.playback-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 200px;
}

.control-label {
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
}

.control-group input[type="range"] {
    flex: 1;
    min-width: 100px;
    accent-color: var(--accent);
}

.control-group output {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    min-width: 2.5rem;
}

.control-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}

.control-toggle input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
}

.hint-inline {
    font-size: 0.72rem;
    color: var(--muted);
}

.radio-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.65rem;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    background: rgba(255, 92, 108, 0.1);
    border: 1px solid rgba(255, 92, 108, 0.35);
    font-size: 0.78rem;
}

.radio-on-air {
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--red);
    animation: pulse-dot 1.2s infinite;
}

#radio-speaker {
    color: var(--text);
    font-weight: 500;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.status-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted);
}

.status-pill.live .dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse-dot 1.5s infinite; }
.status-pill.loading .dot { background: var(--blue); animation: pulse-dot 0.8s infinite; }
.status-pill.error { color: var(--red); }
.status-pill.error .dot { background: var(--red); }

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--red);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 92, 108, 0.12);
    border: 1px solid rgba(255, 92, 108, 0.3);
}

.live-badge span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
}

.live-badge.pulse span { animation: pulse-dot 1s infinite; }

.hidden { display: none !important; }

/* Stage */
.stage {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
    min-height: 520px;
}

.panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.panel-head h2 {
    margin: 0;
    font-family: var(--display);
    font-size: 1rem;
    font-weight: 600;
}

.panel-head .hint {
    font-size: 0.75rem;
    color: var(--muted);
}

.stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.stats strong { color: var(--text); }

.source-body { flex: 1; padding: 1rem; }

.source-notice {
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.12);
    color: var(--text);
    font-size: 0.82rem;
    line-height: 1.5;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--muted);
}

.empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.6; }

/* Video */
.video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    margin-bottom: 1rem;
}

.video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.source-meta h3, .article-card h3 {
    margin: 0.5rem 0;
    font-size: 1rem;
    line-height: 1.4;
}

.badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
}

.badge-yt { background: var(--yt); color: #fff; }
.badge-news { background: var(--blue); color: #fff; }

.article-card .excerpt {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.55;
    margin: 0.75rem 0;
}

.link-out {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.link-out:hover { text-decoration: underline; }

/* Debate feed */
.debate-feed {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    max-height: 460px;
    scroll-behavior: smooth;
}

.typing {
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.typing .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: bounce 1.2s infinite;
}

.typing .dot:nth-child(2) { animation-delay: 0.15s; }
.typing .dot:nth-child(3) { animation-delay: 0.3s; }

.bubble {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    animation: slideIn 0.35s ease-out;
}

.bubble.analyst {
    background: linear-gradient(135deg, rgba(91, 157, 255, 0.08), rgba(91, 157, 255, 0.02));
    border-left: 3px solid var(--blue);
}

.bubble.cynic {
    background: linear-gradient(135deg, rgba(255, 159, 90, 0.08), rgba(255, 159, 90, 0.02));
    border-left: 3px solid var(--orange);
}

.bubble-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.6rem;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--display);
}

.analyst .avatar { background: rgba(91, 157, 255, 0.2); color: var(--blue); }
.cynic .avatar { background: rgba(255, 159, 90, 0.2); color: var(--orange); }

.bubble-header strong { display: block; font-size: 0.9rem; }
.bubble-header span { font-size: 0.72rem; color: var(--muted); }
.bubble-header time { margin-left: auto; font-size: 0.7rem; color: var(--muted); }

.bubble p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

/* Roadmap */
.roadmap {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 2rem;
    align-items: start;
}

.roadmap h2 {
    font-family: var(--display);
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
}

.roadmap-text p:last-child { color: var(--muted); margin: 0; }

.roadmap-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.feature-card {
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.25);
    position: relative;
}

.feature-card.soon { opacity: 0.85; }

.fc-icon { font-size: 1.5rem; display: block; margin-bottom: 0.5rem; }

.feature-card h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}

.feature-card p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.45;
}

.tag {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(110, 231, 168, 0.15);
    color: var(--accent);
}

.tag-live {
    background: rgba(96, 165, 250, 0.2);
    color: #93c5fd;
}

/* Ebook export */
.ebook-panel {
    margin: 1.5rem 2rem;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
}

.ebook-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ebook-copy h2 {
    margin: 0.25rem 0 0.5rem;
    font-size: 1.15rem;
}

.ebook-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    max-width: 36rem;
}

.ebook-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ebook-actions.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.ebook-locked {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.ebook-locked.hidden {
    display: none;
}

.ebook-includes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.8rem;
    color: var(--muted);
}

.ebook-includes li::before {
    content: "✓ ";
    color: var(--accent);
}

/* Footer */
.footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--muted);
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.modal-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    transform: translateY(12px);
    transition: transform 0.25s;
}

.modal.open .modal-card { transform: translateY(0); }

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
}

.modal-card h2 {
    font-family: var(--display);
    margin: 0 0 0.35rem;
}

.modal-card > p {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 1.25rem;
}

.modal-card input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-msg {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
    min-height: 1.2em;
}

.form-msg.success { color: var(--accent); }
.form-msg.error { color: var(--red); }

/* Animations */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
}

/* Responsive */
@media (max-width: 960px) {
    .stage { grid-template-columns: 1fr; }
    .debate-feed { max-height: 360px; }
    .roadmap { grid-template-columns: 1fr; }
    .roadmap-cards { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .topbar { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.75rem; }
    .nav-actions .ghost { display: none; }
    .theme-switcher { order: -2; width: 100%; justify-content: center; flex-wrap: wrap; }
    .lang-switcher { order: -1; width: 100%; justify-content: center; flex-wrap: wrap; }
    .shell { padding: 1rem; }
    .url-row .btn { flex: 1; }
}
