/* =====================================================================
   MakeBOF — auth pages (login, register)
   Tokens mirror landing.css so the hand-off from the landing page is seamless.
   ===================================================================== */

:root {
    --bg: #050505;
    --surface: #111114;
    --input-bg: #0c0c0f;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #f0f0f8;
    --text-secondary: rgba(240, 240, 248, 0.62);
    --text-muted: rgba(240, 240, 248, 0.38);
    --accent: #fe2c55;
    --accent-2: #ff6b81;
    --gradient-accent: linear-gradient(135deg, #fe2c55 0%, #ff6b81 100%);
    --error: #ff8da0;
    --success: #4ade80;
}

[data-theme="light"] {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --input-bg: #ffffff;
    --border: rgba(0, 0, 0, 0.12);
    --border-strong: rgba(0, 0, 0, 0.22);
    --text: #111118;
    --text-secondary: #555560;
    --text-muted: #8a8a94;
    --error: #d6123f;
    --success: #15803d;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ── Showcase panel ─────────────────────────────────────────────────── */
.auth-showcase {
    width: 46%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 48px;
    background: #050505;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    color: #f0f0f8;
}

.auth-showcase::before,
.auth-showcase::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.auth-showcase::before {
    width: 420px; height: 420px;
    background: rgba(254, 44, 85, 0.16);
    top: 18%; left: -12%;
}

.auth-showcase::after {
    width: 360px; height: 360px;
    background: rgba(123, 47, 247, 0.14);
    bottom: 4%; right: -10%;
}

.auth-showcase > * { position: relative; z-index: 1; }

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.3px;
}

.auth-logo img { height: 30px; width: auto; }

.auth-reel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 40px 0;
}

.auth-reel-clip {
    width: 150px;
    aspect-ratio: 9 / 16;
    border-radius: 18px;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
}

.auth-reel-clip:nth-child(1) { transform: translateY(28px) rotate(-4deg); opacity: 0.85; }
.auth-reel-clip:nth-child(2) { width: 186px; border-color: rgba(254, 44, 85, 0.35); box-shadow: 0 24px 70px rgba(254, 44, 85, 0.18), 0 20px 50px rgba(0, 0, 0, 0.6); }
.auth-reel-clip:nth-child(3) { transform: translateY(28px) rotate(4deg); opacity: 0.85; }

.auth-reel-clip video { width: 100%; height: 100%; object-fit: cover; display: block; }

.auth-pitch h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.15;
    max-width: 420px;
}

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

.auth-pitch p {
    margin-top: 12px;
    font-size: 15px;
    color: rgba(240, 240, 248, 0.6);
    max-width: 400px;
}

/* ── Form panel ─────────────────────────────────────────────────────── */
.auth-main {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.auth-form-wrap {
    width: 100%;
    max-width: 380px;
}

.auth-mobile-logo { display: none; margin-bottom: 32px; }

.auth-form-wrap h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 28px;
}

.auth-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -14px 0 24px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(254, 44, 85, 0.3);
    background: rgba(254, 44, 85, 0.06);
    font-size: 13px;
}

.auth-plan strong { font-weight: 600; }

.auth-plan a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-plan a:hover { text-decoration: underline; }

/* ── Google button + divider ── */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.btn-google:hover { border-color: var(--text-muted); }
.btn-google svg { width: 18px; height: 18px; flex-shrink: 0; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Fields ── */
.field { margin-bottom: 16px; }

.field-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.field-label-row a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
}

.field-label-row a:hover { color: var(--text); }

input[type="text"],
input[type="email"],
input[type="password"],
.field select {
    width: 100%;
    height: 44px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    padding: 0 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input::placeholder { color: var(--text-muted); }

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.14);
}

input.invalid { border-color: var(--error); }

.field select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.14);
}

.field-optional { font-weight: 400; color: var(--text-muted); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }

.password-toggle {
    position: absolute;
    top: 0; right: 0;
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.password-toggle:hover { color: var(--text); }
.password-toggle svg { width: 18px; height: 18px; }

.field-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
    min-height: 18px;
    transition: color 0.2s;
}

.field-hint:empty { min-height: 0; margin: 0; }

.field-error {
    font-size: 12px;
    color: var(--error);
    margin-top: 5px;
    display: none;
}

/* ── Terms checkbox ── */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 4px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
}

.terms-check input {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 18px; height: 18px;
    margin-top: 1px;
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    background: var(--input-bg);
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: background 0.15s, border-color 0.15s;
}

.terms-check input::after {
    content: '';
    width: 9px; height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translateY(-1px) rotate(-45deg) scale(0);
    transition: transform 0.12s;
}

.terms-check input:checked { background: var(--accent); border-color: var(--accent); }
.terms-check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.terms-check input:focus-visible { box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.25); }
.terms-check input.invalid { border-color: var(--error); }

.terms-check a,
.auth-legal a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--text-muted);
    text-underline-offset: 2px;
}

.auth-legal {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* ── Primary button ── */
.btn {
    position: relative;
    width: 100%;
    height: 44px;
    background: var(--gradient-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 16px rgba(254, 44, 85, 0.28);
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(254, 44, 85, 0.38); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Messages ── */
.error-box,
.success-box {
    border-radius: 10px;
    font-size: 13px;
    padding: 10px 14px;
    margin-bottom: 18px;
}

.error-box {
    background: rgba(254, 44, 85, 0.08);
    border: 1px solid rgba(254, 44, 85, 0.25);
    color: var(--error);
}

.success-box {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: var(--success);
}

.auth-switch {
    margin-top: 28px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover { text-decoration: underline; }

.auth-footer {
    margin-top: 40px;
    display: flex;
    gap: 18px;
    font-size: 12px;
    color: var(--text-muted);
}

.auth-footer a { text-decoration: none; }
.auth-footer a:hover { color: var(--text); }

.honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.cf-turnstile { margin-top: 12px; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .auth-reel-clip { width: 120px; }
    .auth-reel-clip:nth-child(2) { width: 150px; }
}

@media (max-width: 860px) {
    .auth-showcase { display: none; }
    .auth-mobile-logo { display: inline-flex; }
    .auth-main { padding: 40px 20px; justify-content: flex-start; padding-top: 12vh; }
}

@media (max-width: 380px) {
    .auth-main { padding: 28px 16px; }
}

[hidden] { display: none !important; }
