/* =============================================================
   Seaz — dark space login
   Black background, blue primary, turquoise accent.
   Anton headings, Condiment cursive, mono body.
   ============================================================= */

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

/* HTML `hidden` attribute beats our class display rules */
[hidden] { display: none !important; }

:root {
    /* Palette */
    --bg:        #000000;
    --cream:     #FFFFFF;
    --blue:      #0A2472;
    --turquoise: #2FE6D0;

    /* Supporting */
    --text-70:   rgba(255, 255, 255, 0.70);
    --text-40:   rgba(255, 255, 255, 0.40);

    /* Fonts */
    --font-grotesk:   'Anton', 'Impact', system-ui, sans-serif;
    --font-condiment: 'Condiment', 'Brush Script MT', cursive;
    --font-mono:      ui-monospace, 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
    --font-sans:      'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Hide the login-page Seaz robot whenever we're in the chat scene */
body.in-chat .seaz-robot { display: none; }

html, body { height: 100%; width: 100%; }

body {
    background: var(--bg);
    color: var(--cream);
    font-family: var(--font-mono);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.1px;
}

/* =============================================================
   Background layers (order from bottom to top):
     1. body background (#000)
     2. #universe canvas  — starfield
     3. .hero-video        — video element (if src provided)
     4. page content
     5. .texture-overlay   — grain on top
   ============================================================= */

#universe {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

/* Expanding white flash — grows from the burst origin to cover everything.
   JS sets --flash-x / --flash-y (viewport coords of the clicked button) on
   the #flash-overlay element right before the .burst class triggers. */
.flash-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    overflow: hidden;
}

.flash-wave {
    position: absolute;
    left: var(--flash-x, 50%);
    top: var(--flash-y, 50%);
    width: 200vmax;
    height: 200vmax;
    margin-left: -100vmax;
    margin-top: -100vmax;
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 1)    0%,
        rgba(255, 255, 255, 0.88) 22%,
        rgba(255, 255, 255, 0.55) 45%,
        rgba(255, 255, 255, 0)    75%
    );
    transform: scale(0);
    opacity: 0;
    will-change: transform, opacity;
}

.flash-overlay.burst .flash-wave {
    /* Longer + smoother ease — removes the snap-to-peak feel */
    animation: flash-wave 1.4s cubic-bezier(0.25, 0.1, 0.3, 1) both;
}

@keyframes flash-wave {
    0%   { transform: scale(0);    opacity: 0;    }
    15%  { transform: scale(0.22); opacity: 0.25; }
    40%  { transform: scale(0.55); opacity: 0.22; }
    65%  { transform: scale(0.9);  opacity: 0.12; }
    85%  { transform: scale(1.15); opacity: 0.04; }
    100% { transform: scale(1.35); opacity: 0;    }
}

/* =============================================================
   Seaz — small animated robot on the left of the viewport
   ============================================================= */

.seaz-robot {
    position: fixed;
    right: 25%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    animation: seaz-breathe 5s ease-in-out infinite;
}

@keyframes seaz-breathe {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50%      { transform: translateY(calc(-50% - 6px)) scale(1.01); }
}

/* --- Head --- */
.seaz-robot .head {
    width: 320px;
    height: 270px;
    background: radial-gradient(ellipse at 50% 40%, #FAFAFA 0%, #F0F0F0 60%, #E6E6E6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 28px 60px rgba(0, 0, 0, 0.55),
        inset 0 -5px 14px rgba(0, 0, 0, 0.05),
        inset 0 6px 12px rgba(255, 255, 255, 1);
    position: relative;
}

/* --- Eye band --- */
.seaz-robot .eye-band {
    display: flex;
    align-items: center;
    gap: 34px;
    padding: 14px 32px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 100px;
}

.seaz-robot .eye {
    width: 84px;
    height: 100px;
    border-radius: 50%;
    background: #14172a;
    position: relative;
    overflow: hidden;
    transition: transform 0.12s ease;
}

.seaz-robot .pupil {
    width: 44%;
    height: 44%;
    background: radial-gradient(circle, #3b3d5e 0%, #272944 100%);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.seaz-robot .highlight {
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: -2px;
    right: -3px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

/* JS-driven blink — flatten the eye briefly */
.seaz-robot .eye.blink {
    transform: scaleY(0.08);
}

/* --- Body --- */
.seaz-robot .body {
    width: 210px;
    height: 115px;
    background: radial-gradient(ellipse at 50% 30%, #FAFAFA 0%, #F0F0F0 60%, #E8E8E8 100%);
    border-radius: 0 0 130px 130px;
    margin-top: -12px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.45),
        inset 0 4px 10px rgba(255, 255, 255, 0.9);
    position: relative;
}

/* Hide on narrow screens — robot is now huge, needs at least ~1280px to breathe */
@media (max-width: 1280px) {
    .seaz-robot { display: none; }
}

/* =============================================================
   Liquid glass surface treatment
   ============================================================= */

.liquid-glass {
    background: rgba(255, 255, 255, 0.01);
    background-blend-mode: luminosity;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.liquid-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.4px;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.45)  0%,
        rgba(255, 255, 255, 0.15) 20%,
        rgba(255, 255, 255, 0)    40%,
        rgba(255, 255, 255, 0)    60%,
        rgba(255, 255, 255, 0.15) 80%,
        rgba(255, 255, 255, 0.45) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

/* =============================================================
   Page layout: hero section, rounded bottom corners
   ============================================================= */

.page {
    position: relative;
    z-index: 20;
    min-height: 100vh;
    width: 100%;
    max-width: 1831px;
    margin: 0 auto;
    padding: 32px 24px 80px;
    border-radius: 0 0 32px 32px;
    overflow: hidden;
}

/* =============================================================
   Hero heading
   ============================================================= */

.hero-content {
    max-width: 780px;
    margin: 120px 0 48px;
    position: relative;
}

@media (min-width: 1024px) {
    .hero-content { margin-left: 128px; }
}

.hero-heading {
    font-family: var(--font-grotesk);
    font-size: 40px;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cream);
    position: relative;
}

@media (min-width: 640px)  { .hero-heading { font-size: 60px;  line-height: 1; } }
@media (min-width: 768px)  { .hero-heading { font-size: 75px; } }
@media (min-width: 1024px) { .hero-heading { font-size: 90px; } }

/* Hero subtitle — Seaz's sarcastic one-liner under the name */
.hero-subtitle {
    margin-top: 18px;
    font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0.2px;
    color: var(--text-60, rgba(231, 234, 242, 0.72));
    line-height: 1.4;
    max-width: 560px;
}
@media (min-width: 640px) { .hero-subtitle { font-size: 18px; margin-top: 22px; } }
@media (min-width: 1024px) { .hero-subtitle { font-size: 20px; margin-top: 26px; } }

/* =============================================================
   Login buttons (stacked vertically)
   ============================================================= */

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 520px;
}

@media (min-width: 640px)  { .login-buttons { gap: 20px; } }
@media (min-width: 1024px) { .login-buttons { gap: 24px; margin-left: 128px; } }

.login-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 24px 32px;
    border-radius: 28px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    color: var(--cream);
    transition: background 0.2s ease, transform 0.15s ease;
    font-family: inherit;
    isolation: isolate;

    /* Spotlight glow palette — both buttons use turquoise */
    --glow-base: 173;          /* HSL hue for turquoise (#2FE6D0 family) */
    --glow-spread: 24;         /* how much hue drifts across the viewport */
    --glow-sat: 85;            /* saturation % */
    --glow-light: 60;          /* lightness % */
    --glow-size: 380px;
    --glow-opacity: 0.18;
}

/* Cursor-following spotlight — background, sits BEHIND text + circle */
.login-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(
        var(--glow-size) var(--glow-size) at
        calc(var(--x, 0) * 1px) calc(var(--y, 0) * 1px),
        hsl(
            calc(var(--glow-base) + var(--xp, 0.5) * var(--glow-spread))
            calc(var(--glow-sat) * 1%)
            calc(var(--glow-light) * 1%)
            / var(--glow-opacity)
        ),
        transparent 70%
    );
    background-attachment: fixed;
    z-index: 0;
}

.login-btn-text,
.login-btn-circle {
    position: relative;
    z-index: 1;
}

@media (min-width: 640px) {
    .login-btn { padding: 28px 28px 28px 40px; }
}

/* Primary (Sign in) — blue tint on liquid glass */
.login-btn.primary {
    background-color: rgba(10, 36, 114, 0.2);   /* --blue at 20% */
}
.login-btn.primary:hover {
    background-color: rgba(10, 36, 114, 0.3);
}

/* Secondary (Create account) — plain liquid glass */
.login-btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.login-btn-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 16px;
    min-width: 0;
}

.login-btn-title {
    font-family: var(--font-grotesk);
    font-size: 28px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cream);
}
@media (min-width: 640px)  { .login-btn-title { font-size: 36px; } }
@media (min-width: 1024px) { .login-btn-title { font-size: 44px; } }

.login-btn-subtitle {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-70);
}
@media (min-width: 640px)  { .login-btn-subtitle { font-size: 13px; } }
@media (min-width: 1024px) { .login-btn-subtitle { font-size: 14px; } }

.login-btn-circle {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.login-btn-circle svg {
    width: 20px;
    height: 20px;
}

.login-btn.primary .login-btn-circle   { background: var(--blue); color: var(--cream); }
.login-btn.secondary .login-btn-circle { background: var(--turquoise); color: #000; }

.login-btn:hover .login-btn-circle { transform: scale(1.1); }

/* =============================================================
   Page 2 — auth form (revealed after the galaxy burst)
   ============================================================= */

.hero-content,
.login-buttons,
.auth-form {
    transition: opacity 0.45s ease-out, transform 0.55s ease-out, filter 0.45s ease-out;
}

/* "Exploding" state — content scatters outward into the burst and fades */
.hero-content.exploding,
.login-buttons.exploding {
    opacity: 0;
    transform: scale(1.08);
    filter: blur(4px);
    pointer-events: none;
}

/* Form is CENTERED on the viewport (both axes) via fixed positioning. */
.auth-form {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.94);
    max-width: 520px;
    width: min(520px, calc(100% - 40px));
    opacity: 0;
    filter: blur(6px);
    pointer-events: none;
    z-index: 30;
}

.auth-form.arrived {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
    pointer-events: auto;
}

/* When the user is in the auth flow, Seaz disappears (privacy moment). */
body.in-auth .seaz-robot { display: none; }

.auth-back {
    background: transparent;
    border: none;
    color: var(--text-70);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 8px 2px;
    margin-bottom: 14px;
    transition: color 0.2s ease;
}
.auth-back:hover { color: var(--turquoise); }

.auth-form-title {
    font-family: var(--font-grotesk);
    font-size: 48px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cream);
    margin-bottom: 24px;
}
@media (min-width: 640px)  { .auth-form-title { font-size: 60px; } }
@media (min-width: 1024px) { .auth-form-title { font-size: 72px; } }

.auth-form-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    color: var(--cream);
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.2px;
    padding: 16px 18px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-input::placeholder {
    color: var(--text-40);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 12px;
}

.auth-input:focus {
    border-color: var(--turquoise);
    background: rgba(255, 255, 255, 0.06);
}

/* Language picker — shown only in register mode */
.auth-lang {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 4px 2px;
}
.auth-lang[hidden] { display: none; }
.auth-lang-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-40);
}
.auth-lang-options { display: flex; gap: 8px; }
.auth-lang-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-60);
    font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.auth-lang-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.auth-lang-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.14),
        0 1px 4px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
    display: block;
}
.auth-lang-option:hover {
    border-color: rgba(47, 230, 208, 0.35);
    color: var(--cream);
}
.auth-lang-option:has(input:checked) {
    border-color: var(--turquoise);
    color: var(--cream);
    background: rgba(47, 230, 208, 0.08);
}

/* Submit: same visual family as the choice buttons, half the size */
.auth-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 16px 24px;
    border-radius: 22px;
    color: var(--cream);
    font-family: var(--font-grotesk);
    font-size: 22px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    background: rgba(10, 36, 114, 0.22);
    transition: background 0.2s ease, transform 0.15s ease;
    isolation: isolate;
    margin-top: 6px;

    /* same spotlight vars as the choice buttons */
    --glow-base: 173;
    --glow-spread: 24;
    --glow-sat: 85;
    --glow-light: 60;
    --glow-size: 320px;
    --glow-opacity: 0.18;
}

.auth-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(
        var(--glow-size) var(--glow-size) at
        calc(var(--x, 0) * 1px) calc(var(--y, 0) * 1px),
        hsl(
            calc(var(--glow-base) + var(--xp, 0.5) * var(--glow-spread))
            calc(var(--glow-sat) * 1%)
            calc(var(--glow-light) * 1%)
            / var(--glow-opacity)
        ),
        transparent 70%
    );
    background-attachment: fixed;
    z-index: 0;
}

.auth-submit:hover { background: rgba(10, 36, 114, 0.32); }
.auth-submit[disabled] { opacity: 0.65; cursor: default; }

.auth-submit-circle {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--turquoise);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}
.auth-submit-circle svg { width: 18px; height: 18px; }
.auth-submit:hover .auth-submit-circle { transform: scale(1.1); }

#auth-submit-label {
    position: relative;
    z-index: 1;
}

.auth-error {
    color: rgba(255, 140, 140, 0.9);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.3px;
    margin-top: 8px;
    min-height: 14px;
}

/* =============================================================
   Page 3 — chat scene: big Seaz in the background, glass panel on top
   ============================================================= */

.chat-scene {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.94);
    filter: blur(10px);
    transition: opacity 0.65s ease-out,
                transform 0.7s ease-out,
                filter 0.65s ease-out;
    pointer-events: none;
}

.chat-scene.arrived {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
    pointer-events: auto;
}

/* --- Background robot — BIG, centered, breathes --- */
.chat-robot {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    pointer-events: none;
    animation: chat-robot-breathe 5s ease-in-out infinite;
    transform-origin: center;
}

@keyframes chat-robot-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-50%, calc(-50% - 6px)) scale(1.01); }
}

/* The big robot is BACKDROP — not the star. Lower opacity so the
   floating HUD pieces (messages, input) read clearly on top of him. */
.chat-robot {
    opacity: 0.6;
}

.chat-robot .head {
    width: 440px;
    height: 370px;
    background: radial-gradient(ellipse at 50% 40%, #FAFAFA 0%, #F0F0F0 60%, #E6E6E6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 26px 60px rgba(0, 0, 0, 0.5),
        inset 0 -4px 12px rgba(0, 0, 0, 0.04),
        inset 0 6px 12px rgba(255, 255, 255, 1);
    position: relative;
}

.chat-robot .eye-band {
    display: flex;
    align-items: center;
    gap: 44px;
    padding: 18px 38px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 100px;
}

.chat-robot .eye {
    width: 114px;
    height: 138px;
    border-radius: 50%;
    background: #14172a;
    position: relative;
    overflow: hidden;
    transition: transform 0.12s ease;
}

.chat-robot .pupil {
    width: 44%;
    height: 44%;
    background: radial-gradient(circle, #3b3d5e 0%, #272944 100%);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.chat-robot .highlight {
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: -3px;
    right: -4px;
    box-shadow: 0 0 13px rgba(255, 255, 255, 0.7);
}

.chat-robot .eye.blink { transform: scaleY(0.08); }

.chat-robot .body {
    width: 290px;
    height: 165px;
    background: radial-gradient(ellipse at 50% 30%, #FAFAFA 0%, #F0F0F0 60%, #E8E8E8 100%);
    border-radius: 0 0 180px 180px;
    margin-top: -15px;
    box-shadow:
        0 26px 50px rgba(0, 0, 0, 0.5),
        inset 0 5px 12px rgba(255, 255, 255, 0.9);
}

/* --- Floating glass HUD pieces over the big Seaz --- */

/* Top-left: End chat pill */
.chat-end-pill {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px 9px 10px;
    border-radius: 999px;
    color: var(--cream);
    font-family: var(--font-grotesk);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.15s ease;
}
.chat-end-pill svg { width: 15px; height: 15px; opacity: 0.85; }
.chat-end-pill:hover { color: #ff9c9c; transform: translateX(-1px); }

/* Pre-boot: hide the landing page if a session token exists, before JS runs.
   The inline script in index.html sets this class on <html>; _tryAutoResume
   reveals .chat-scene after validating the token. */
html.auto-resume-boot .page { visibility: hidden; }
html.auto-resume-boot body { background: var(--space-deep, #07090f); }

/* Beta disclaimer card — sits just under the End chat pill, dismissible */
.beta-notice {
    position: absolute;
    top: 64px;
    left: 20px;
    z-index: 3;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 320px;
    padding: 10px 12px 10px 14px;
    border-radius: 16px;
    font-family: var(--font-sans);
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-60);
    animation: beta-reveal 0.5s ease-out 0.3s both;
}
@keyframes beta-reveal {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.beta-notice[hidden] { display: none; }
.beta-badge {
    flex-shrink: 0;
    margin-top: 1px;
    padding: 2px 7px;
    font-family: var(--font-grotesk, 'Anton', sans-serif);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #05161A;
    background: var(--turquoise);
    border-radius: 6px;
}
.beta-text {
    margin: 0;
    flex: 1;
    color: var(--text-60);
}
.beta-text a {
    color: var(--turquoise);
    text-decoration: none;
    border-bottom: 1px dotted rgba(47, 230, 208, 0.4);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.beta-text a:hover {
    color: #3DF0DB;
    border-bottom-color: var(--turquoise);
}
.beta-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-40);
    cursor: pointer;
    padding: 2px;
    margin-top: -2px;
    margin-right: -4px;
    border-radius: 4px;
    transition: color 0.18s ease;
}
.beta-close svg { width: 14px; height: 14px; display: block; }
.beta-close:hover { color: var(--cream); }

@media (max-width: 640px) {
    .beta-notice { max-width: calc(100vw - 40px); font-size: 11.5px; top: 58px; }
}

/* Top-right: account strip */
.chat-account {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 4px 6px 14px;
    border-radius: 999px;
    color: var(--text-70);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.3px;
    /* Override liquid-glass's overflow:hidden so the dropdown menu can
       actually render outside the pill. */
    overflow: visible !important;
}

.chat-account-email {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-account-menu-btn {
    background: transparent;
    border: none;
    color: var(--cream);
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}
.chat-account-menu-btn svg { width: 16px; height: 16px; }
.chat-account-menu-btn:hover { background: rgba(255, 255, 255, 0.08); }

.chat-account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    padding: 6px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 4;
    /* Solid dark background so it actually reads against Seaz in the back */
    background: rgba(12, 16, 34, 0.95) !important;
    border: 1px solid rgba(47, 230, 208, 0.25);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.chat-account-menu-item {
    background: transparent;
    border: none;
    color: var(--cream);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.3px;
    padding: 9px 12px;
    text-align: left;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.chat-account-menu-item:hover {
    background: rgba(255, 255, 255, 0.07);
}
.chat-account-menu-item.danger {
    color: rgba(255, 130, 130, 0.9);
}
.chat-account-menu-item.danger:hover {
    background: rgba(255, 80, 80, 0.12);
    color: #ff9090;
}

/* Middle: floating messages — no visible container, bubbles float in open space */
.chat-messages {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 108px;
    top: 84px;
    width: min(820px, 92vw);
    display: flex;
    flex-direction: column-reverse;   /* newest at the bottom, grows upward */
    gap: 12px;
    z-index: 2;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 16px 8px;
    /* Fade the top edge so old messages blur into the sky */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 14%, black 100%);
            mask-image: linear-gradient(to bottom, transparent 0%, black 14%, black 100%);
}
.chat-messages::-webkit-scrollbar { display: none; }

/* Each bubble is its own liquid-glass pill */
.chat-msg {
    max-width: 72%;
    padding: 12px 18px;
    border-radius: 20px;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: 0.1px;
    font-weight: 400;
    word-wrap: break-word;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: chat-msg-in 0.4s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

@keyframes chat-msg-in {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-msg.user {
    align-self: flex-end;
    background: rgba(10, 36, 114, 0.5);
    border: 1px solid rgba(61, 108, 222, 0.4);
    color: var(--cream);
    border-bottom-right-radius: 6px;
}

.chat-msg.seaz {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--cream);
    border-bottom-left-radius: 6px;
}

.chat-msg .sender-label {
    display: block;
    font-family: var(--font-grotesk);
    font-size: 10px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-bottom: 4px;
    opacity: 0.75;
}
.chat-msg.seaz .sender-label { color: var(--turquoise); }
.chat-msg.user .sender-label { color: rgba(140, 180, 255, 0.9); }

/* Bottom: input pill — always floating, always visible */
.chat-input-wrap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 28px;
    z-index: 3;
    width: min(680px, 92vw);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 22px;
    border-radius: 999px;
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--cream);
    font-family: var(--font-sans);
    font-size: 15px;
    letter-spacing: 0.1px;
    padding: 10px 0;
    outline: none;
    min-width: 0;
}
.chat-input::placeholder {
    color: var(--text-40);
    font-size: 14px;
    letter-spacing: 0.2px;
    font-family: var(--font-sans);
}

.chat-send {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--turquoise);
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chat-send:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(47, 230, 208, 0.4);
}
.chat-send svg { width: 18px; height: 18px; }

/* Voice meter — floating glass chip above the input, only when near cap */
.voice-meter {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 88px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    border-radius: 999px;
    min-width: 220px;
}
.voice-meter-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-70);
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.voice-meter-track {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    overflow: hidden;
    min-width: 60px;
}
.voice-meter-fill {
    height: 100%;
    background: var(--turquoise);
    border-radius: 99px;
    transition: width 0.4s ease, background 0.4s ease;
}
.voice-meter.low .voice-meter-fill { background: #ffb43c; }
.voice-meter.critical .voice-meter-fill { background: #ff7a7a; }

/* Divider inside the account menu */
.chat-account-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 4px;
}

/* ---- User-message modal (Contact Daphné / Request upgrade) ---- */

.user-msg-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    padding: 32px 32px 28px;
    border-radius: 24px;
    width: min(520px, 92vw);
    background: rgba(12, 16, 34, 0.94);
    border: 1px solid rgba(47, 230, 208, 0.28);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
    animation: chat-msg-in 0.35s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.user-msg-title {
    font-family: var(--font-grotesk);
    font-size: 26px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--cream);
    margin-bottom: 8px;
}

.user-msg-subtitle {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-70);
    margin-bottom: 18px;
    letter-spacing: 0.2px;
}

.user-msg-textarea {
    width: 100%;
    min-height: 130px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    color: var(--cream);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0.1px;
    padding: 14px 16px;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.user-msg-textarea:focus {
    border-color: var(--turquoise);
    background: rgba(255, 255, 255, 0.07);
}

.user-msg-textarea::placeholder {
    color: var(--text-40);
}

.user-msg-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

.user-msg-cancel,
.user-msg-send {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 11px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.user-msg-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-70);
}
.user-msg-cancel:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--cream);
}

.user-msg-send {
    background: var(--turquoise);
    border: 1px solid var(--turquoise);
    color: #000;
}
.user-msg-send:hover:not([disabled]) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(47, 230, 208, 0.35);
}
.user-msg-send[disabled] { opacity: 0.55; cursor: default; }

/* Feedback backdrop — dims Seaz + the HUD so the panel reads clearly */
.feedback-backdrop {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fade-in 0.25s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Feedback panel — sits on top of the backdrop, solid enough to read */
.feedback-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    padding: 36px 36px 32px;
    border-radius: 24px;
    width: min(460px, 92vw);
    text-align: center;
    /* Solid-ish background so text reads cleanly over any backdrop */
    background: rgba(12, 16, 34, 0.92);
    border: 1px solid rgba(47, 230, 208, 0.25);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
    animation: chat-msg-in 0.35s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.feedback-prompt {
    font-family: var(--font-grotesk);
    font-size: 28px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cream);
    margin-bottom: 22px;
}
.feedback-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.feedback-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--cream);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2px;
    padding: 12px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.feedback-btn:hover {
    background: rgba(47, 230, 208, 0.14);
    border-color: rgba(47, 230, 208, 0.5);
    color: #FFFFFF;
}
.feedback-thanks {
    margin-top: 16px;
    font-size: 13px;
    color: var(--turquoise);
    font-family: var(--font-sans);
    letter-spacing: 0.3px;
}

/* Optional free-text improvement box — revealed after the user picks a rating */
.feedback-comment-wrap {
    margin-top: 22px;
    text-align: left;
    animation: feedback-reveal 0.35s ease-out;
}
.feedback-comment-wrap[hidden] { display: none; }
@keyframes feedback-reveal {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.feedback-comment-prompt {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-60);
    margin: 0 0 10px;
    letter-spacing: 0.3px;
}
.feedback-comment-textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    color: var(--cream);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    padding: 14px 16px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.feedback-comment-textarea:focus {
    border-color: var(--turquoise);
    background: rgba(255, 255, 255, 0.06);
}
.feedback-comment-textarea::placeholder {
    color: var(--text-40);
    font-size: 13px;
}
.feedback-comment-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}
.feedback-comment-skip,
.feedback-comment-send {
    font-family: var(--font-sans);
    font-size: 13px;
    padding: 9px 18px;
    border-radius: 999px;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}
.feedback-comment-skip {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-60);
}
.feedback-comment-skip:hover {
    border-color: rgba(255, 255, 255, 0.32);
    color: var(--cream);
}
.feedback-comment-send {
    background: var(--turquoise);
    border: 1px solid var(--turquoise);
    color: #05161A;
    font-weight: 600;
}
.feedback-comment-send:hover {
    background: #3DF0DB;
    border-color: #3DF0DB;
}
.feedback-comment-send[disabled] { opacity: 0.5; cursor: default; }

/* Narrow screens */
@media (max-width: 900px) {
    .chat-robot { transform: translate(-50%, -50%) scale(0.7); }
    .chat-account-email { max-width: 120px; }
    .chat-messages { width: 94vw; top: 70px; bottom: 96px; }
    .chat-msg { max-width: 82%; }
    .chat-input-wrap { width: 94vw; bottom: 18px; }
}

/* =============================================================
   Mobile adjustments
   ============================================================= */

@media (max-width: 1023px) {
    .hero-content { margin-top: 80px; margin-bottom: 32px; }
}

@media (max-width: 640px) {
    .page { padding: 20px 16px 48px; }
    .hero-header { margin-bottom: 28px; }
    .hero-content { margin-top: 56px; }
    .login-btn-title { font-size: 24px; }
    .login-btn-subtitle { font-size: 11px; }
    .login-btn-circle { width: 48px; height: 48px; }
    .login-btn-circle svg { width: 18px; height: 18px; }
}
