/* auth.css - Full Split Screen Layout */

/* Ensure the layout flows naturally under the existing global header */
body.site-body.theme-auth {
    margin: 0;
    padding: 0;
}

body.site-body.theme-auth .site-header,
body.site-body.theme-auth .site-footer {
    display: none !important;
}

body.site-body.theme-auth .site-main {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.auth-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

.auth-container {
    width: 100%;
    max-width: none;
    background: transparent;
    display: flex;
    align-items: stretch;
}

/* ── Visual Hook (Left Side) ── */
.auth-visual-panel {
    flex: 1.1;
    background: #050505;
    border-radius: 0;
    position: relative;
    display: none;
    overflow: hidden;
    padding: 4rem 4rem 0 4rem;
}

@media (min-width: 900px) {
    .auth-visual-panel {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
}

.auth-back-btn {
    position: absolute;
    top: 2rem;
    left: 4rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 20;
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.auth-back-btn:hover {
    color: #fff;
}

/* The subtle abstract terracotta node graph visual */
.auth-visual-sphere {
    display: none;
}

.auth-visual-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.4;
    z-index: 2;
}

#asteroids-game {
    position: absolute;
    top: 17rem; /* Starts just below the visual subtext */
    bottom: 0; /* Expanded to fill panel bottom */
    left: 0;
    width: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
}

/* Elegant Text Overlay */
.auth-visual-content {
    position: relative;
    z-index: 10;
    margin-top: 0;
    margin-bottom: 2rem;
}
.auth-visual-content h2 {
    color: #ffffff;
    font-size: 2.2rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 1rem;
    text-wrap: balance;
}
.auth-visual-content p {
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

/* ── Form Panel (Right Side) ── */
.auth-form-panel {
    flex: 1.1;
    background: var(--bg);
    border-radius: 0;
    padding: 3rem 6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: none;
    box-shadow: none;
}

.auth-title {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}
.auth-subtitle {
    margin: 0 0 1.25rem;
    font-size: 0.85rem;
    color: var(--text-soft);
    line-height: 1.4;
}
.auth-subtitle a {
    color: var(--accent-strong);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}
.auth-subtitle a:hover { color: var(--accent); }

/* Form fields */
.auth-group { margin-bottom: 0.9rem; position: relative; }
.auth-label {
    display: block;
    margin-bottom: 0.25rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}
.auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.8rem;
    background: var(--bg);
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.auth-input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}
.auth-input::placeholder { color: var(--text-muted); opacity: 0.5; }

.auth-submit-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem;
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.auth-submit-btn:hover { background: var(--accent-strong); }
.auth-submit-btn:active { transform: scale(0.98); }

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    margin: 1.25rem 0;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--line);
}
.auth-divider span { padding: 0 0.8rem; }

/* Strength bar (signup) */
.auth-strength-meter {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    margin-top: 0.3rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.auth-strength-meter.is-visible { opacity: 1; }

.auth-flashes { margin-bottom: 1rem; }
.auth-flash {
    font-size: 0.8rem;
    padding: 0.6rem;
    border-radius: 4px;
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
    margin-bottom: 0.5rem;
}

.auth-turnstile { margin-top: 1rem; }

/* OAuth Button */
.auth-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.auth-oauth-btn:hover { background: var(--bg-alt); border-color: rgba(var(--accent-rgb), 0.3); }
.auth-oauth-btn svg { width: 1.25rem; height: 1.25rem; }

@media (max-width: 899px) {
    .auth-wrapper { align-items: flex-start; min-height: auto; }
    .auth-container { flex-direction: column; min-height: auto; }
    .auth-visual-panel { display: none; }
    .auth-form-panel {
        padding: 1.75rem 1.25rem;
        border-radius: 0;
        background: transparent;
        margin: 0;
        border: none;
        box-shadow: none;
        justify-content: flex-start;
    }
}
