/* =============================================================
   VybeSpace — Auth pages (login + signup) — vybe_landing.css
   Scope: login.html and signup.html only.
   ============================================================= */

:root {
    --landing-bg:          #060916;
    --landing-card:        rgba(14, 18, 36, 0.78);
    --landing-card-strong: rgba(10, 14, 28, 0.9);
    --landing-border:      rgba(255, 255, 255, 0.14);
    --landing-radius-lg:   1.4rem;
    --landing-radius-md:   1rem;
    --landing-copy:        #f0f5ff;
    --landing-muted:       rgba(195, 218, 255, 0.72);
    --landing-soft:        rgba(195, 218, 255, 0.65);
    --landing-font-display: "Segoe UI Variable", "Avenir Next", "Helvetica Neue", system-ui, sans-serif;
    --landing-font-body:    "Segoe UI Variable", "Avenir Next", "Helvetica Neue", system-ui, sans-serif;
}

/* ── Page base ──────────────────────────────────────────────── */
body.entrance-auth-page {
    background:
        radial-gradient(ellipse 70% 55% at 10% 10%, rgba(100, 30, 180, 0.32), transparent),
        radial-gradient(ellipse 60% 45% at 90% 8%,  rgba(20, 70, 200, 0.26), transparent),
        radial-gradient(ellipse 55% 40% at 50% 96%, rgba(70, 15, 150, 0.2),  transparent),
        linear-gradient(180deg, #05091a 0%, #09122a 55%, #060c1a 100%);
    color: var(--landing-copy);
    font-family: var(--landing-font-body);
}

body.entrance-auth-page .site-shell {
    width: min(1100px, calc(100% - 1rem));
    padding-top: 0.5rem;
    padding-bottom: 3rem;
}

.entrance-auth-page .site-header {
    margin-bottom: 0.75rem;
}

.entrance-auth-page .brand__tagline {
    color: rgba(200, 218, 255, 0.68) !important;
}

/* ── Outer wrap: ambient background container ───────────────── */
.entrance-wrap {
    position: relative;
    overflow: hidden;
}

/* CSS star field layer */
.entrance-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 18%, rgba(255,255,255,0.09), transparent 1.5px),
        radial-gradient(circle at 8% 28%,  rgba(255,255,255,0.08), transparent 1.4px),
        radial-gradient(circle at 78% 22%, rgba(255,255,255,0.08), transparent 1.6px),
        radial-gradient(circle at 62% 65%, rgba(255,255,255,0.06), transparent 1.3px),
        radial-gradient(circle at 48% 6%,  rgba(255,255,255,0.08), transparent 1.2px),
        radial-gradient(circle at 88% 80%, rgba(255,255,255,0.06), transparent 1.4px);
    background-size: 160px 160px, 210px 210px, 250px 250px, 180px 180px, 230px 230px, 200px 200px;
    opacity: 0.85;
    animation: driftStars 28s linear infinite;
    pointer-events: none;
}

/* Ambient gradient overlay */
.entrance-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(128deg, rgba(255, 110, 175, 0.1), transparent 28%, transparent 72%, rgba(130, 200, 255, 0.08)),
        radial-gradient(circle at 50% 16%, rgba(255,255,255,0.06), transparent 36%);
    mix-blend-mode: screen;
    pointer-events: none;
}

/* Canvas particle layer */
.entrance-particle-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* ── Shell ──────────────────────────────────────────────────── */
.entrance-shell {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

/* ── 2-column auth layout ───────────────────────────────────── */
.entrance-signup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
    gap: 1.25rem;
    align-items: start;
}

/* ── Left column: visual / copy ─────────────────────────────── */
.entrance-signup-copy {
    padding: 0.25rem 0.25rem 0;
    display: flex;
    flex-direction: column;
}

.entrance-badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    padding: 0.36rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 160, 210, 0.35);
    background: rgba(255, 110, 175, 0.12);
    color: #f0d5ec;
    font: 700 0.7rem/1 var(--landing-font-body);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}

.entrance-title {
    margin: 0 0 0.65rem;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: #faf8ff;
}

.entrance-title .accent {
    background: linear-gradient(130deg, #ff8ac4, #c0a0ff, #8fd4ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.entrance-copy-text {
    margin: 0 0 0.75rem;
    color: var(--landing-muted);
    font: 400 0.96rem/1.65 var(--landing-font-body);
    max-width: 44ch;
}

.entrance-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.entrance-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(220, 235, 255, 0.18);
    background: rgba(10, 14, 30, 0.55);
    color: rgba(240, 248, 255, 0.88);
    font: 600 0.78rem/1 var(--landing-font-body);
    white-space: nowrap;
}

/* Signup preview row (generic container) */
.entrance-signup-preview-row {
    margin-top: 1.5rem;
}

/* ── Login: profile preview card ────────────────────────────── */
.auth-prev {
    margin-top: 1.75rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(180, 130, 255, 0.22);
    background: var(--landing-card-strong);
    overflow: hidden;
    box-shadow: 0 18px 54px rgba(2, 4, 14, 0.55), inset 0 1px 0 rgba(255,255,255,0.1);
}

.auth-prev__room {
    position: relative;
    height: 7rem;
    background: linear-gradient(135deg, #120640 0%, #1e0860 40%, #081848 100%);
    overflow: hidden;
}

/* Slowly morphing room interior light */
.auth-prev__room-glow {
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(ellipse 60% 60% at 30% 40%, rgba(140, 60, 255, 0.5), transparent 60%),
        radial-gradient(ellipse 50% 50% at 70% 60%, rgba(40, 120, 255, 0.35), transparent 60%);
    mix-blend-mode: screen;
    animation: authRoomGlow 8s ease-in-out infinite;
}

.auth-prev__sticker {
    position: absolute;
    font-size: 1.3rem;
    animation: floatTiny 6s ease-in-out infinite;
    user-select: none;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.auth-prev__theme-label {
    position: absolute;
    bottom: 0.55rem;
    left: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(8, 5, 22, 0.78);
    border: 1px solid rgba(190, 150, 255, 0.3);
    color: rgba(200, 170, 255, 0.9);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.auth-prev__body {
    padding: 0.55rem 0.85rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-prev__avatar-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: -1.5rem;
}

.auth-prev__avatar {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #6c3dff, #ff6ec4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.auth-prev__info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding-top: 1.25rem;
}

.auth-prev__info strong {
    color: #eef4ff;
    font-size: 0.9rem;
    font-weight: 700;
}

.auth-prev__status {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #7fffc4;
    font-size: 0.72rem;
    font-weight: 600;
}

.auth-prev__dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: #39ff88;
    flex-shrink: 0;
    animation: authDotPulse 2.2s ease-in-out infinite;
}

.auth-prev__note {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.7rem;
    background: rgba(255, 136, 194, 0.1);
    border: 1px solid rgba(255, 160, 210, 0.22);
    font-size: 0.76rem;
}

.auth-prev__note p { margin: 0; color: #f0d8ea; line-height: 1.4; }
.auth-prev__note em { font-style: normal; color: #ffd8f0; }

/* ── Signup: customization theme tiles ──────────────────────── */
.auth-theme-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.auth-theme-tile {
    border-radius: 1.1rem;
    border: 1px solid rgba(200, 180, 255, 0.18);
    padding: 1.1rem 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    overflow: hidden;
    min-height: 88px;
    text-align: center;
    position: relative;
}

.auth-theme-tile--galaxy {
    background: linear-gradient(135deg, #120640 0%, #1e0860 45%, #081848 100%);
}

.auth-theme-tile--cozy {
    background: linear-gradient(135deg, #1a0828 0%, #2a0c48 45%, #120630 100%);
}

.auth-theme-tile__emojis {
    font-size: 1.3rem;
    display: flex;
    gap: 0.35rem;
    line-height: 1;
}

.auth-theme-tile__name {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(200, 175, 255, 0.82);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Right column: auth form card ───────────────────────────── */
.entrance-signup-card {
    border-radius: var(--landing-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background:
        linear-gradient(175deg, rgba(22, 28, 52, 0.94), rgba(14, 18, 34, 0.88)),
        radial-gradient(circle at 85% 10%, rgba(130, 200, 255, 0.16), transparent 38%),
        radial-gradient(circle at 10% 2%,  rgba(255, 110, 175, 0.14), transparent 38%);
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.08);
    padding: 1.25rem;
    min-width: 0;
}

.entrance-signup-title {
    margin: 0 0 0.35rem;
    font: 700 clamp(1.55rem, 2.2vw, 2rem)/1.05 var(--landing-font-display);
    color: #f4f8ff;
    letter-spacing: -0.02em;
}

.entrance-signup-subtitle {
    margin: 0 0 1rem;
    color: var(--landing-soft);
    font: 400 0.88rem/1.45 var(--landing-font-body);
}

.entrance-signup-alert {
    margin-bottom: 0.9rem;
    padding: 0.65rem 0.8rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(255, 120, 160, 0.4);
    background: rgba(255, 100, 145, 0.13);
    color: #ffd0e0;
    font: 600 0.83rem/1.38 var(--landing-font-body);
    role: alert;
}

/* ── Form layout ────────────────────────────────────────────── */
.entrance-signup-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

/* Signup field groups with labeled sections */
.entrance-signup-form-section {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.entrance-signup-form-section-label {
    font: 600 0.7rem/1 var(--landing-font-body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(190, 210, 255, 0.5);
    padding-bottom: 0.1rem;
}

.entrance-signup-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.entrance-signup-field {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
}

.entrance-signup-field > span {
    color: #dce8ff;
    font: 600 0.78rem/1 var(--landing-font-body);
    letter-spacing: 0.01em;
}

/* iOS-safe font-size (≥16px prevents auto-zoom) */
.entrance-signup-field input {
    min-height: 2.75rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(220, 235, 255, 0.2);
    background: rgba(8, 12, 28, 0.72);
    color: #f4f8ff;
    padding: 0.6rem 0.75rem;
    font: 500 1rem/1.2 var(--landing-font-body);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
    -webkit-appearance: none;
    appearance: none;
}

.entrance-signup-field input:focus {
    border-color: rgba(130, 200, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(130, 200, 255, 0.16);
}

.entrance-signup-field input::placeholder {
    color: rgba(220, 235, 255, 0.38);
    font-size: 0.88rem;
}

/* ── Password show/hide toggle ──────────────────────────────── */
.auth-pw-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.auth-pw-wrap .entrance-signup-field__input {
    flex: 1;
}

.auth-pw-wrap input {
    flex: 1;
    padding-right: 3rem !important;
    width: 100%;
}

.auth-pw-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: rgba(200, 218, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    transition: color 150ms ease;
    padding: 0;
}

.auth-pw-toggle:hover {
    color: rgba(200, 218, 255, 0.9);
}

.auth-pw-toggle:focus-visible {
    outline: 2px solid rgba(130, 200, 255, 0.6);
    outline-offset: 2px;
    color: rgba(200, 218, 255, 0.9);
}

/* ── Submit / CTA button ────────────────────────────────────── */
.entrance-signup-submit {
    width: 100%;
    margin-top: 0.3rem;
}

.entrance-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.8rem 1.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font: 700 0.95rem/1 var(--landing-font-body);
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease, opacity 180ms ease;
    letter-spacing: -0.01em;
}

.entrance-btn:focus-visible {
    outline: 3px solid rgba(130, 200, 255, 0.65);
    outline-offset: 3px;
}

.entrance-btn:hover {
    transform: translateY(-2px);
}

.entrance-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.entrance-btn--primary {
    background: linear-gradient(130deg, #ff75bb 0%, #9b82ff 50%, #72d4ff 100%);
    color: #fff;
    box-shadow: 0 8px 26px rgba(100, 80, 200, 0.38);
}

.entrance-btn--primary:hover {
    box-shadow: 0 12px 34px rgba(120, 90, 240, 0.5);
    filter: brightness(1.07);
}

.entrance-btn--secondary {
    background: rgba(10, 14, 32, 0.55);
    border-color: rgba(200, 220, 255, 0.36);
    color: #cce0ff;
}

.entrance-btn--secondary:hover {
    background: rgba(16, 22, 44, 0.7);
    border-color: rgba(200, 220, 255, 0.52);
}

/* ── Help links below form ──────────────────────────────────── */
.entrance-signup-help {
    margin: 0.8rem 0 0;
    color: var(--landing-soft);
    font: 500 0.84rem/1.35 var(--landing-font-body);
}

.entrance-signup-help a {
    color: #bde2ff;
    text-decoration: underline;
    text-decoration-color: rgba(189, 226, 255, 0.4);
    text-underline-offset: 2px;
    transition: color 140ms ease;
}

.entrance-signup-help a:hover {
    color: #d8eeff;
}

/* ── Glow orbs ──────────────────────────────────────────────── */
.entrance-subtle-glow {
    position: absolute;
    width: 14rem;
    height: 14rem;
    border-radius: 999px;
    filter: blur(36px);
    opacity: 0.22;
    pointer-events: none;
    z-index: 0;
}

.entrance-subtle-glow--one {
    left: -4rem;
    top: 8%;
    background: rgba(255, 100, 175, 0.55);
    animation: glowPulse 16s ease-in-out infinite;
}

.entrance-subtle-glow--two {
    right: -5rem;
    top: 14%;
    background: rgba(130, 200, 255, 0.5);
    animation: glowPulse 19s ease-in-out infinite reverse;
}

.entrance-subtle-glow--three {
    left: 30%;
    bottom: 8%;
    background: rgba(170, 140, 255, 0.38);
    animation: glowPulse 22s ease-in-out infinite;
}

/* ── Ambient lift ───────────────────────────────────────────── */
.entrance-ambient-lift {
    position: absolute;
    inset: auto 0 0 0;
    height: 160px;
    background: linear-gradient(180deg, transparent, rgba(5, 7, 18, 0.32));
    pointer-events: none;
    z-index: 0;
}

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes glowPulse {
    0%, 100% { transform: scale(0.94); opacity: 0.18; }
    50%       { transform: scale(1.08); opacity: 0.28; }
}

@keyframes driftStars {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-52px, 40px, 0); }
}

@keyframes floatTiny {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-7px) rotate(5deg); }
}

@keyframes authRoomGlow {
    0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.85; }
    50%       { transform: scale(1.06) translate(3%, 2%); opacity: 1; }
}

@keyframes authDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── Responsive — tablet ≤900px ─────────────────────────────── */
@media (max-width: 900px) {
    .entrance-signup-grid {
        grid-template-columns: 1fr;
    }

    .entrance-signup-copy {
        padding-bottom: 0;
    }

    .auth-prev {
        max-width: 420px;
        margin-top: 1.25rem;
    }

    .auth-theme-preview {
        max-width: 420px;
    }
}

/* ── Responsive — mobile ≤640px ─────────────────────────────── */
@media (max-width: 640px) {
    body.entrance-auth-page .site-shell {
        width: calc(100% - 0.75rem);
    }

    .entrance-shell {
        padding: 0.75rem;
    }

    .entrance-signup-card {
        padding: 1.1rem;
    }

    .entrance-signup-field-grid {
        grid-template-columns: 1fr;
    }

    .entrance-title {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .auth-theme-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Compact visual panel on mobile */
    .auth-prev {
        margin-top: 0.75rem;
    }

    .auth-prev__room {
        height: 5.5rem;
    }
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .entrance-wrap::before,
    .entrance-subtle-glow--one,
    .entrance-subtle-glow--two,
    .entrance-subtle-glow--three,
    .auth-prev__room-glow,
    .auth-prev__sticker,
    .auth-prev__dot {
        animation: none !important;
    }

    .entrance-btn,
    .auth-pw-toggle,
    .entrance-signup-field input,
    .entrance-signup-help a {
        transition: none !important;
    }

    body.entrance-auth-page {
        background:
            radial-gradient(ellipse 60% 50% at 15% 20%, rgba(80, 20, 140, 0.22), transparent),
            radial-gradient(ellipse 55% 45% at 85% 15%, rgba(15, 55, 160, 0.2), transparent),
            linear-gradient(180deg, #05091a 0%, #09122a 55%, #060c1a 100%);
    }
}
