/* ============================================================
   InstaGame — Cloud Gaming on Demand
   Design system: dark theme, indigo/violet accents, mobile-first
   ============================================================ */

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #a78bfa;
    --success: #10b981;
    --success-hover: #059669;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --bg: #0f0f23;
    --bg-card: #1a1a2e;
    --bg-elevated: #22223a;
    --bg-input: #16213e;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: #334155;
    --border-subtle: #26324a;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

code {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ============ Header / Nav ============ */
header {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    background: rgba(15, 15, 35, 0.92);
    backdrop-filter: blur(12px);
    z-index: 100;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    white-space: nowrap;
}
.logo span { color: var(--text); }

.nav-links { display: flex; align-items: center; gap: 6px; }

.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    border: none;
    font-family: inherit;
    transition: all 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--bg-card); }
.nav-link.active { color: var(--primary); }

.nav-btn {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-btn:hover { background: var(--bg-card); border-color: var(--primary); }
.nav-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.nav-btn.primary:hover { background: var(--primary-hover); }

/* ============ Views ============ */
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============ Buttons ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); }
.btn-success:hover { background: var(--success-hover); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text); border-color: var(--text-dim); transform: none; }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-lg { padding: 16px 40px; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* ============ Landing Page (lp-* namespace) ============ */

/* --- Hero --- */
.lp-hero {
    padding: 80px 0 48px;
    position: relative;
    overflow: hidden;
}
.lp-hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -200px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    pointer-events: none;
}
.lp-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.lp-hero-left { position: relative; z-index: 1; }
.lp-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}
.lp-headline {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    color: #fff;
    margin-bottom: 20px;
}
.lp-highlight {
    color: var(--accent);
}
.lp-subhead {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 32px;
    max-width: 520px;
}
.lp-hero-cta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.lp-btn-glow {
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.4), 0 4px 16px rgba(99, 102, 241, 0.2);
}
.lp-btn-glow:hover {
    box-shadow: 0 0 36px rgba(99, 102, 241, 0.55), 0 6px 24px rgba(99, 102, 241, 0.3);
}
.lp-ghost-link {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}
.lp-ghost-link:hover { color: var(--primary); }
.lp-trust-micro {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-dim);
}
.lp-trust-micro span { white-space: nowrap; }

/* --- Hero Terminal --- */
.lp-hero-right { position: relative; z-index: 1; }
.lp-terminal {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), 0 0 40px rgba(99, 102, 241, 0.08);
    background: #0d1117;
}
.lp-terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #161b22;
    border-bottom: 1px solid var(--border-subtle);
}
.lp-dot { width: 10px; height: 10px; border-radius: 50%; }
.lp-dot.red { background: #ef4444; }
.lp-dot.yellow { background: #f59e0b; }
.lp-dot.green { background: #10b981; }
.lp-terminal-title { margin-left: 8px; font-size: 0.72rem; color: var(--text-dim); font-weight: 500; }
.lp-terminal-body {
    padding: 20px 20px 12px;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.8;
}
.lp-line { opacity: 0; animation: lpLineIn 0.4s ease forwards; }
.lp-line-1 { animation-delay: 0.3s; }
.lp-line-2 { animation-delay: 1.0s; }
.lp-line-3 { animation-delay: 2.0s; }
.lp-line-4 { animation-delay: 2.8s; }
.lp-line-5 { animation-delay: 3.6s; }
.lp-line-6 { animation-delay: 4.4s; }
.lp-line-7 { animation-delay: 5.2s; }
@keyframes lpLineIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.lp-prompt { color: var(--success); font-weight: 700; margin-right: 8px; }
.lp-dim { color: var(--text-dim); margin-right: 8px; }
.lp-ok { color: var(--success); margin-right: 8px; font-weight: 700; }
.lp-accent { color: var(--accent); font-weight: 600; }
.lp-blink { animation: lpBlink 1s step-end infinite; }
@keyframes lpBlink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
.lp-hud-bar {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    background: #161b22;
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}
.lp-hud-chip {
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
}
.lp-hud-live { color: var(--success); animation: lpLivePulse 1.6s ease-in-out infinite; }
@keyframes lpLivePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* --- Trust Row --- */
.lp-trust {
    padding: 36px 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    text-align: center;
}
.lp-trust-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 14px;
    font-weight: 600;
}
.lp-trust-logos {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.lp-trust-item {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

/* --- Landing sections --- */
.lp-section { padding: 64px 0; }
.lp-section-title { text-align: center; font-size: 2rem; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.5px; color: #fff; }
.lp-section-sub { text-align: center; color: var(--text-muted); margin-bottom: 40px; font-size: 1.05rem; }

/* --- Cost Comparison Cards --- */
.lp-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}
.lp-compare-card {
    border-radius: var(--radius);
    padding: 32px 28px;
    position: relative;
}
.lp-compare-bad {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
}
.lp-compare-good {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(16, 185, 129, 0.06));
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 8px 40px rgba(99, 102, 241, 0.1);
}
.lp-compare-vs {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}
.lp-compare-header {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.lp-compare-price {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}
.lp-compare-bad .lp-compare-price { color: var(--danger); }
.lp-compare-good .lp-compare-price { color: var(--success); }
.lp-compare-price span { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }
.lp-compare-card ul {
    list-style: none;
    margin: 0 0 16px;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.lp-compare-card ul li {
    padding: 5px 0 5px 20px;
    position: relative;
}
.lp-compare-bad ul li::before { content: '✗'; position: absolute; left: 0; color: var(--danger); font-weight: 700; }
.lp-compare-good ul li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.lp-compare-total {
    font-size: 0.9rem;
    color: var(--text-dim);
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}
.lp-compare-total strong { color: var(--text); }

/* --- Timeline (How it works) --- */
.lp-timeline {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    padding-left: 80px;
}
.lp-timeline::before {
    content: '';
    position: absolute;
    left: 35px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--success));
    border-radius: 2px;
}
.lp-tl-step {
    position: relative;
    padding-bottom: 32px;
}
.lp-tl-step:last-child { padding-bottom: 0; }
.lp-tl-time {
    position: absolute;
    left: -80px;
    top: 2px;
    width: 56px;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--bg);
    padding: 4px 0;
    border-radius: 4px;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
}
.lp-tl-step::before {
    content: '';
    position: absolute;
    left: -49px;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}
.lp-tl-content h3 { font-size: 1.05rem; margin-bottom: 4px; color: #fff; }
.lp-tl-content p { color: var(--text-muted); font-size: 0.9rem; }

/* --- Comparison Table --- */
.lp-table-wrap { overflow-x: auto; }
.lp-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 640px;
}
.lp-compare-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}
.lp-compare-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-muted);
}
.lp-compare-table tr:last-child td { border-bottom: none; }
.lp-col-highlight {
    background: rgba(99, 102, 241, 0.06);
    color: #fff !important;
    font-weight: 600;
}
.lp-compare-table thead .lp-col-highlight {
    color: var(--primary) !important;
    background: rgba(99, 102, 241, 0.1);
}

/* --- Final CTA Band --- */
.lp-cta-band {
    text-align: center;
    padding: 64px 24px;
    margin: 32px -20px 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(16, 185, 129, 0.08));
    border-top: 1px solid rgba(99, 102, 241, 0.3);
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius);
}
.lp-cta-band h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
}
.lp-cta-band p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 28px;
}

/* --- Landing Footer --- */
.lp-footer {
    border-top: 1px solid var(--border-subtle);
    margin-top: 48px;
    padding: 28px 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}
.lp-footer a { color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.lp-footer a:hover { color: var(--text); }

/* --- Keep .section for pricing/other views --- */
.section { padding: 56px 0; }
.section-title { text-align: center; font-size: 2rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px; }
.section-sub { text-align: center; color: var(--text-muted); margin-bottom: 40px; }

/* ============ Pricing ============ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.pricing-section { margin-bottom: 2.5rem; }
.pricing-section-title { font-size: 1.3rem; margin-bottom: 0.3rem; }
.pricing-section-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.pricing-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
}
.bonus-tag {
    background: var(--primary);
    color: #000;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    vertical-align: middle;
}
.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 28px 22px;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
}
.price-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.price-card.popular { border-color: var(--primary); box-shadow: 0 0 24px rgba(99, 102, 241, 0.15); }
.price-card.popular::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
}
.price-card.current { border-color: var(--success); }
.price-card.current::before {
    content: 'YOUR PLAN';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
}
.price-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.price-card .price { font-size: 2.1rem; font-weight: 800; color: var(--primary); line-height: 1.2; }
.price-card .price span { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.price-card .gpu-label { font-size: 0.78rem; color: var(--accent); font-weight: 600; margin-top: 4px; }
.price-card ul {
    list-style: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 16px 0 20px;
    text-align: left;
    flex: 1;
}
.price-card ul li { padding: 4px 0 4px 22px; position: relative; }
.price-card ul li::before { content: '✓'; position: absolute; left: 2px; color: var(--success); font-weight: 700; }

/* ============ FAQ ============ */
.faq { max-width: 720px; margin: 0 auto; }
.faq details {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    overflow: hidden;
}
.faq summary {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--primary); font-size: 1.3rem; font-weight: 400; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 16px; color: var(--text-muted); font-size: 0.9rem; }

/* ============ Footer ============ */
footer {
    border-top: 1px solid var(--border-subtle);
    margin-top: 48px;
    padding: 28px 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ============ Auth Forms ============ */
/* Google sign-in button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #fff;
    color: #3c4043;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 14px 24px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}
.btn-google:hover {
    background: #f7f8f8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.btn-google:active {
    background: #eee;
}
.google-icon {
    flex-shrink: 0;
}
.auth-note {
    font-size: 0.85rem;
    color: var(--text-dim, #888);
    margin-top: 16px;
    text-align: center;
}

.auth-container {
    max-width: 420px;
    margin: 48px auto;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 36px;
}
.auth-container h2 { text-align: center; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--primary); }
.form-hint { font-size: 0.75rem; color: var(--text-dim); margin-top: 5px; }

.auth-toggle { text-align: center; margin-top: 18px; color: var(--text-muted); font-size: 0.875rem; }
.auth-toggle a { color: var(--primary); cursor: pointer; text-decoration: none; }
.auth-toggle a:hover { text-decoration: underline; }

.error-msg { color: var(--danger); font-size: 0.85rem; margin-top: 10px; text-align: center; min-height: 0; }
.success-msg { color: var(--success); font-size: 0.85rem; margin-top: 10px; text-align: center; }

/* ============ Dashboard ============ */
.dashboard { padding: 32px 0 48px; }
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.dashboard-header h2 { font-size: 1.5rem; }
.dashboard-header .user-email { color: var(--text-dim); font-size: 0.85rem; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
}
.card h3 { margin-bottom: 4px; font-size: 1.1rem; }
.card .card-sub { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 16px; }

.status-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-badge.running { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-badge.running::before { animation: pulse 1.6s ease infinite; }
.status-badge.hibernated, .status-badge.stopped { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-badge.frozen { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.status-badge.freezing { background: rgba(56, 189, 248, 0.15); color: #38bdf8; animation: pulse 2s infinite; }
.status-badge.pending, .status-badge.starting { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.status-badge.stopping, .status-badge.hibernating { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-badge.terminating, .status-badge.terminated { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.status-badge.none { background: rgba(148, 163, 184, 0.15); color: var(--text-muted); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    margin: 22px 0;
}
.stat-item {
    text-align: center;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 14px 8px;
}
.stat-item .value { font-size: 1.35rem; font-weight: 700; color: var(--primary); line-height: 1.3; }
.stat-item .label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-item.highlight .value { color: var(--success); }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ---- Banners ---- */
.banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.banner .banner-close { margin-left: auto; background: none; border: none; color: inherit; cursor: pointer; font-size: 1.1rem; opacity: 0.7; }
.banner .banner-close:hover { opacity: 1; }
.banner.success { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--success); }
.banner.warning { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.4); color: var(--warning); }
.banner.danger { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.4); color: var(--danger); }
.banner a { color: inherit; font-weight: 700; }

/* ---- Credits panel (insufficient credits upsell) ---- */
.credits-panel {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 18px;
}
.credits-panel h4 { color: var(--danger); margin-bottom: 6px; }
.credits-panel p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 14px; }

/* ---- DCV Connect card ---- */
.dcv-card {
    margin-top: 20px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.45);
    border-radius: var(--radius);
    padding: 22px;
}
.dcv-card .dcv-connect {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.dcv-card h4 { color: var(--success); font-size: 1.05rem; }
.dcv-creds { display: grid; gap: 8px; }
.cred-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.88rem;
}
.cred-row .cred-label { color: var(--text-muted); min-width: 78px; font-size: 0.8rem; }
.cred-row code { background: transparent; padding: 0; flex: 1; word-break: break-all; }
.icon-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 9px;
    font-size: 0.78rem;
    font-family: inherit;
    transition: all 0.15s;
    white-space: nowrap;
}
.icon-btn:hover { color: var(--text); border-color: var(--primary); }
.dcv-note { margin-top: 14px; font-size: 0.78rem; color: var(--text-dim); }
.dcv-note a { color: var(--text-dim); }

/* Auto-login badge + collapsible credentials */
.dcv-autologin-note {
    margin: 12px 0 8px;
    padding: 10px 14px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}
.autologin-badge {
    display: inline-block;
    background: var(--success);
    color: #fff;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.dcv-creds-details {
    margin-top: 8px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.dcv-creds-details summary {
    padding: 8px 14px;
    font-size: 0.8rem;
    color: var(--text-dim);
    cursor: pointer;
    background: var(--bg-elevated);
    user-select: none;
}
.dcv-creds-details summary:hover {
    color: var(--text-muted);
}
.dcv-creds-details[open] summary {
    border-bottom: 1px solid var(--border-subtle);
}
.dcv-creds-details .dcv-creds {
    padding: 12px 14px;
}

/* Low-credit warning banner */
.low-credit-banner {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.low-credit-banner.critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
}
.low-credit-banner .lcb-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--warning);
    font-weight: 500;
}
.low-credit-banner.critical .lcb-text {
    color: var(--danger);
}
.low-credit-banner .btn {
    flex-shrink: 0;
}

/* ---- Launch progress ---- */
.launch-progress { margin-top: 20px; }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 0.85rem; }
.progress-header .p-label { color: var(--text-muted); }
.progress-header .p-pct { color: var(--primary); font-weight: 600; }
.progress-track { background: var(--bg-input); border-radius: 8px; height: 8px; overflow: hidden; }
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 8px;
    transition: width 0.5s ease;
}
.progress-note { font-size: 0.75rem; color: var(--text-dim); margin-top: 8px; }

/* ---- Session timer ---- */
.session-bar {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
}
.session-bar .timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--success); font-size: 1.05rem; }
.session-bar .sep { color: var(--border); }

/* ---- Terminate zone ---- */
.danger-zone { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border-subtle); }
.confirm-box {
    margin-top: 12px;
    padding: 14px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: var(--radius-sm);
}
.confirm-box p { font-size: 0.85rem; color: var(--danger); margin-bottom: 12px; }

/* ---- Usage / History ---- */
.usage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 14px;
    margin: 6px 0 20px;
}
.table-wrap { overflow-x: auto; }
table.sessions {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
table.sessions th {
    text-align: left;
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
}
table.sessions td { padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); color: var(--text-muted); white-space: nowrap; }
table.sessions tr:last-child td { border-bottom: none; }
table.sessions td:first-child { color: var(--text); }
.empty-state { text-align: center; color: var(--text-dim); padding: 24px 0; font-size: 0.9rem; }

/* ---- Settings ---- */
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 0;
}
.setting-row .setting-info { flex: 1; min-width: 220px; }
.setting-row .setting-info strong { display: block; font-size: 0.95rem; }
.setting-row .setting-info span { color: var(--text-muted); font-size: 0.82rem; }
.slider-group { display: flex; align-items: center; gap: 12px; }
.slider-group input[type='range'] { width: 160px; accent-color: var(--primary); }
.slider-value { font-weight: 700; color: var(--primary); min-width: 62px; text-align: right; font-size: 0.9rem; }

/* ---- Subscription mini tier picker ---- */
.tier-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 8px; }
.sub-active-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.sub-active-row .sub-tier { font-size: 1.05rem; font-weight: 700; color: var(--success); }
.sub-active-row .sub-desc { color: var(--text-muted); font-size: 0.85rem; }

/* ============ Loading / Skeleton ============ */
.spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-elevated) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 6px;
    color: transparent !important;
    user-select: none;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============ Snackbar ============ */
.snackbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    max-width: 90vw;
    word-break: break-word;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: all 0.3s ease;
    user-select: text;
    cursor: text;
}
.snackbar.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.snackbar.error { background: var(--danger); color: #fff; }
.snackbar.success { background: var(--success); color: #fff; }
.snackbar.info { background: var(--primary); color: #fff; }

/* ============ Hero Visual (mock stream window) ============ */
.hero-visual {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}
.mock-window {
    width: 100%;
    max-width: 640px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 16px 64px rgba(99, 102, 241, 0.12), var(--shadow);
}
.mock-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.72rem;
    color: var(--text-dim);
}
.mock-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.mock-dot.red { background: #ef4444; }
.mock-dot.yellow { background: #f59e0b; }
.mock-dot.green { background: #10b981; }
.mock-title { margin-left: 6px; flex: 1; }
.mock-live { color: var(--success); font-weight: 700; animation: liveBlink 1.5s ease-in-out infinite; }
@keyframes liveBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.mock-screen {
    background: linear-gradient(135deg, #16213e 0%, #0f0f23 50%, #1a1a2e 100%);
    padding: 32px 24px 48px;
    position: relative;
    min-height: 180px;
}
.mock-hud {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.mock-chip {
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}
.mock-scene {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 40px,
        rgba(99, 102, 241, 0.02) 40px,
        rgba(99, 102, 241, 0.02) 80px
    );
    pointer-events: none;
}

/* ============ Onboarding Checklist ============ */
.onboarding {
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), var(--bg-card));
}
.onboard-steps {
    list-style: none;
    margin-top: 16px;
    display: grid;
    gap: 10px;
}
.onboard-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    transition: all 0.2s;
}
.onboard-steps li.done {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.ob-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    background: var(--bg-input);
    color: var(--text-dim);
    border: 1px solid var(--border);
}
.onboard-steps li.done .ob-check {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}
.onboard-steps li div span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 2px;
}
.onboard-steps li div a {
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
}

/* ============ Modal (Help) ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 580px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 14px;
    border-bottom: 1px solid var(--border-subtle);
}
.modal-header h3 { font-size: 1.1rem; }
.modal-body { padding: 20px 24px 28px; }
.help-steps {
    margin: 0 0 20px 0;
    padding-left: 20px;
}
.help-steps li {
    margin-bottom: 14px;
    line-height: 1.5;
    color: var(--text-muted);
}
.help-steps li strong { color: var(--text); }
.help-tips {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    border: 1px solid var(--border-subtle);
}
.help-tips p { margin-bottom: 8px; color: var(--text); }
.help-tips ul { padding-left: 18px; }
.help-tips li {
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============ Connect Now — pulse when ready ============ */
.btn-connect-pulse {
    animation: connectPulse 2s ease-in-out infinite;
    font-size: 1.05rem;
    padding: 14px 28px;
    letter-spacing: 0.3px;
}
@keyframes connectPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}
.dcv-card.ready {
    border: 1px solid var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), var(--bg-card));
}

/* ============ Session cost display ============ */
.session-bar .cost {
    color: var(--warning);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ============ Status badge animations ============ */
.status-badge {
    transition: all 0.3s ease;
}
.status-badge.running {
    animation: badgePulse 2.5s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}
.status-badge.pending, .status-badge.starting {
    animation: badgePulsePending 1.5s ease-in-out infinite;
}
@keyframes badgePulsePending {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}


/* ============ Playtime left emphasis ============ */
.stat-item.highlight .value {
    font-size: 1.4rem;
    color: var(--success);
}
.stat-item.highlight.low .value {
    color: var(--warning);
}
.stat-item.highlight.critical .value {
    color: var(--danger);
    animation: badgePulse 1.5s ease-in-out infinite;
}


/* ============ Micro-interactions ============ */
.card {
    transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
    border-color: var(--border);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.06);
}
.price-card {
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.price-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
    border-color: var(--primary);
}
.feature-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}
.btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
}

/* ============ Utility ============ */
.hidden { display: none !important; }
.text-center { text-align: center; }

/* ===== Nav Credits Chip ===== */
.nav-credits {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.nav-credits:hover { background: rgba(99, 102, 241, 0.25); }
.nav-credits-low { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.nav-credits-low:hover { background: rgba(239, 68, 68, 0.25); }

/* ===== Rig Picker (Dashboard) ===== */
.rig-picker { margin: 16px 0 12px; }
.rig-picker.hidden { display: none; }
.rig-picker-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-dim); margin-bottom: 8px; }
.rig-picker-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.rig-option {
    display: flex; flex-direction: column; gap: 4px; padding: 12px 14px;
    border-radius: 10px; border: 2px solid var(--border); background: var(--bg-card);
    cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.15s;
    text-align: left; font-family: inherit; color: var(--text);
}
.rig-option:hover { border-color: var(--accent); background: rgba(99, 102, 241, 0.05); transform: translateY(-1px); }
.rig-option.selected { border-color: var(--accent); background: rgba(99, 102, 241, 0.1); box-shadow: 0 0 0 1px var(--accent); }
.rig-option .rig-name { font-weight: 700; font-size: 0.95rem; }
.rig-option .rig-pop { display: inline-block; background: var(--accent); color: #fff; font-size: 0.65rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; text-transform: uppercase; }
.rig-option .rig-detail { font-size: 0.78rem; color: var(--text-dim); }
.rig-option .rig-rate { font-size: 0.8rem; color: var(--accent); font-weight: 600; }

/* ============ Responsive ============ */

@media (max-width: 900px) {
    .lp-hero-content { grid-template-columns: 1fr; gap: 36px; }
    .lp-hero-left { text-align: center; }
    .lp-subhead { margin-left: auto; margin-right: auto; }
    .lp-hero-cta { justify-content: center; }
    .lp-trust-micro { justify-content: center; }
    .lp-compare { grid-template-columns: 1fr; max-width: 400px; }
}

@media (max-width: 680px) {
    /* Landing */
    .lp-hero { padding: 48px 0 32px; }
    .lp-headline { font-size: 2rem; letter-spacing: -1px; }
    .lp-subhead { font-size: 1rem; }
    .lp-section { padding: 40px 0; }
    .lp-section-title { font-size: 1.5rem; }
    .lp-terminal-body { font-size: 0.72rem; padding: 14px 12px 10px; }
    .lp-timeline { padding-left: 64px; }
    .lp-tl-time { left: -64px; width: 48px; font-size: 0.7rem; }
    .lp-tl-step::before { left: -33px; }
    .lp-timeline::before { left: 27px; }
    .lp-cta-band { padding: 40px 16px; margin: 24px -20px 0; }
    .lp-cta-band h2 { font-size: 1.5rem; }
    .lp-compare-card { padding: 24px 20px; }
    .lp-compare-price { font-size: 1.8rem; }
    .lp-trust-logos { gap: 14px; }
    .lp-trust-item { font-size: 0.8rem; }
    .btn-lg { padding: 14px 28px; font-size: 1rem; }

    /* Shared/Dashboard */
    .section { padding: 36px 0; }
    .section-title { font-size: 1.5rem; }
    .auth-container { margin: 24px auto; padding: 26px 20px; }
    .card { padding: 20px 16px; }
    .nav-links .nav-link { padding: 8px 10px; font-size: 0.85rem; }
    .actions .btn { flex: 1; min-height: 48px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .modal { max-height: 92vh; margin: 10px; }
    .modal-header { padding: 16px 18px 12px; }
    .modal-body { padding: 16px 18px 22px; }
    .onboard-steps li { padding: 8px 10px; }
    .session-bar { flex-direction: column; gap: 8px; align-items: flex-start; }
    .session-bar .sep { display: none; }
    .dcv-card .dcv-connect { flex-direction: column; align-items: stretch; text-align: center; }
    .dcv-card .dcv-connect .btn { width: 100%; }
    .btn-connect-pulse { font-size: 1.1rem; padding: 16px; }
    .setting-row { flex-direction: column; align-items: stretch; }
    .slider-group { width: 100%; }
    .slider-group input[type='range'] { flex: 1; width: 100%; }
}
