/* Standalone Sign In page styling - cyberpunk, clean, responsive */
:root {
    --bg: #050b13;
    --panel: #0b1626;
    --panel-2: #06101a;
    --cyan: #00f5ff;
    --magenta: #ff0080;
    --green: #00ff41;
    --text: #e6f5ff;
    --muted: #8aa0b3;
    --border: rgba(0, 245, 255, 0.2);
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: radial-gradient(1000px 800px at 20% -10%, rgba(0, 245, 255, 0.08), transparent),
                            radial-gradient(800px 600px at 120% 20%, rgba(255, 0, 128, 0.08), transparent),
                            var(--bg);
    color: var(--text);
    font-family: 'Rajdhani', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    display: grid;
    place-items: center;
    overflow-x: hidden;
}

/* Overlay repurposed as full-page center container */
.auth-overlay {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid !important;
    place-items: center;
    backdrop-filter: none;
}

.auth-panel {
    width: min(920px, 92vw);
    background: linear-gradient(145deg, var(--panel), var(--panel-2));
    border: 2px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 70px rgba(0,0,0,.6), 0 0 30px rgba(0,245,255,.12);
    overflow: hidden;
}

.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}
.auth-logo .glitch {
    font-family: 'Orbitron', monospace;
    letter-spacing: 1px;
    font-weight: 900;
    color: var(--cyan);
    text-shadow: 0 0 16px rgba(0,245,255,.4);
}

#close-modal {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 8px;
    padding: 6px 10px;
}

.auth-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    padding: 26px 22px 24px;
}

/* Left column: forms */
.auth-form-container {
    background: rgba(0,0,0,.25);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 16px;
    display: none;
}
.auth-form-container.active { display: block; }

.form-title .glitch-small {
    color: var(--cyan);
    text-shadow: 0 0 12px rgba(0,245,255,.35);
}

.neural-form .input-container { margin-bottom: 14px; }
.input-label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.neural-input {
    width: 100%;
    background: #070e17;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 10px 12px;
}
.neural-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0,245,255,.12);
}
.input-line { display: none; }

.neural-button.primary,
.social-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,.25);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.neural-button.primary:hover,
.social-button:hover {
    transform: translateY(-1px);
    border-color: var(--cyan);
    box-shadow: 0 8px 22px rgba(0, 245, 255, .12);
}
.neural-button.primary .button-glow,
.social-glow { display: none; }

.forgot-link { margin-left: 8px; color: var(--muted); }
.forgot-link:hover { color: var(--cyan); }

/* Right column: social + terms */
.social-auth {
    display: grid;
    gap: 10px;
    align-content: start;
}
.social-button.google { border-color: rgba(66, 133, 244, .25); }
.social-button.github { border-color: rgba(255, 255, 255, .18); }
.social-button.guest { border-color: rgba(0, 255, 65, .25); }

.terms-agreement { font-size: 12px; color: var(--muted); margin-top: 14px; }
.terms-agreement a { color: var(--cyan); }

.auth-tabs {
    display: inline-flex;
    gap: 8px;
    padding: 10px 12px;
}
.auth-tab {
    border: 1px solid var(--border);
    background: rgba(0,0,0,.25);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}
.auth-tab.active { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,245,255,.1); }

.auth-message { margin: 10px 22px 0; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.auth-message.info { background: rgba(0,245,255,.08); color: var(--cyan); border: 1px solid var(--border); }
.auth-message.success { background: rgba(0,255,65,.08); color: var(--green); border: 1px solid rgba(0,255,65,.25); }
.auth-message.error { background: rgba(255,0,128,.08); color: var(--magenta); border: 1px solid rgba(255,0,128,.25); }
.auth-message.hidden { display: none; }

/* Responsive */
@media (max-width: 860px) {
    .auth-content { grid-template-columns: 1fr; }
}

/* Ambient scanlines */
.auth-scanlines::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,.02) 0px,
        rgba(255,255,255,.02) 1px,
        transparent 3px,
        transparent 4px
    );
    pointer-events: none;
}
:root {
    --bg: #0c0f14;
    --card: #11151c;
    --ink: #e8f8ff;
    --muted: #a9c0cf;
    --accent1: #16e1ff;
    --accent2: #ff2ea6;
    --gray-700: #374151;
    --white: #ffffff;
    --primary-cyan: #16e1ff;
    --primary-magenta: #ff2ea6;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #000;
    color: var(--ink);
    font-family: 'Rajdhani', system-ui, -apple-system, sans-serif;
}

/* Backdrop overlay to mimic popup */
.page {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 12px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.65), rgba(0,0,0,0.8))
                , linear-gradient(135deg, #0a0f1a 0%, #1a0f2e 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
}

.auth-container {
    width: 100%;
    max-width: 520px;
    max-height: min(90vh, 720px);
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(26,26,46,0.98), rgba(22,33,62,0.98));
    border: 2px solid var(--primary-cyan);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 30px rgba(0,255,249,0.2);
    padding: 28px 22px 26px;
    backdrop-filter: blur(10px);
    overflow: auto;
    position: relative;
    animation: modal-in 200ms ease-out;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-header {
    text-align: left;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

/* Close (X) button */
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(0,255,249,0.35);
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.08s ease;
}
.modal-close:hover {
    background: rgba(0,0,0,0.5);
    box-shadow: 0 0 14px rgba(0,255,249,0.25);
}
.modal-close:active { transform: translateY(1px); }

.glitch-large {
    line-height: 1.05;
    font-size: clamp(2.2rem, 5.5vw, 3rem);
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    color: var(--primary-cyan);
    text-shadow: 0 0 10px rgba(0,255,249,0.5);
}

.auth-header p {
    margin-top: 6px;
    opacity: 0.85;
    font-family: 'Rajdhani', sans-serif;
    max-width: 56ch;
    color: var(--muted);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--primary-cyan);
    border-radius: 12px;
    overflow: hidden;
    margin: 16px 0 22px;
}

.auth-tab {
    background: transparent;
    color: var(--white);
    padding: 14px 10px;
    border: 0;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.auth-tab.active {
    background: linear-gradient(90deg, rgba(0,255,249,0.15) 0%, rgba(255,0,128,0.15) 100%);
    box-shadow: inset 0 0 20px rgba(0,255,249,0.15);
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.form-group { margin-bottom: 14px; }

.auth-form input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(5,5,5,0.75);
    border: 2px solid var(--gray-700);
    border-radius: 10px;
    color: var(--white);
    font-family: 'Rajdhani', sans-serif;
    transition: 0.2s border, 0.2s box-shadow;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 18px rgba(0,255,249,0.22), inset 0 0 8px rgba(0,255,249,0.08);
}

.auth-button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    font-family: 'Orbitron', monospace;
    font-weight: 800;
    letter-spacing: 0.8px;
    border: 0;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.2s ease, background 0.2s ease;
    margin-top: 10px;
}

.auth-button:active { transform: translateY(1px); }

.auth-button.primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-magenta));
    box-shadow: 0 10px 25px rgba(0,255,249,0.15);
}
.auth-button.primary:hover { box-shadow: 0 14px 30px rgba(0,255,249,0.25); }

.auth-button.secondary {
    background: transparent;
    color: var(--primary-cyan);
    border: 1px solid rgba(0,255,249,0.35);
}
.auth-button.secondary:hover { background: rgba(0,255,249,0.08); }

.auth-button.google {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(0,255,249,0.25);
    color: var(--white);
}
.auth-button.google:hover {
    background: rgba(0,0,0,0.45);
    box-shadow: 0 0 16px rgba(0,255,249,0.18);
}

.auth-button.github {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,0,128,0.25);
    color: var(--white);
}
.auth-button.github:hover {
    background: rgba(0,0,0,0.45);
    box-shadow: 0 0 16px rgba(255,0,128,0.18);
}

.google-icon, .github-icon {
    filter: drop-shadow(0 0 6px rgba(0,0,0,0.35));
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.github-icon svg { width: 20px; height: 20px; fill: currentColor; }
.google-icon svg { width: 20px; height: 20px; }

.auth-divider { position: relative; text-align: center; margin: 18px 0; }
.auth-divider span {
    position: relative;
    z-index: 1;
    padding: 0 10px;
    color: var(--muted);
    font-family: 'Rajdhani', sans-serif;
}
.auth-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.auth-footer { text-align: center; margin-top: 8px; }
.guest-note { margin: 8px 0 6px; opacity: 0.85; font-family: 'Rajdhani', sans-serif; }

.auth-button.guest {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--gray-700);
}
.auth-button.guest:hover { border-color: var(--primary-cyan); box-shadow: 0 0 14px rgba(0,255,249,0.2); }

.auth-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}
.auth-message.success {
    background: rgba(0, 255, 65, 0.2);
    border: 2px solid #00ff41;
    color: #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}
.auth-message.error {
    background: rgba(255, 7, 58, 0.2);
    border: 2px solid #ff073a;
    color: #ff073a;
    box-shadow: 0 0 20px rgba(255, 7, 58, 0.3);
}
.auth-message.info {
    background: rgba(255, 184, 0, 0.2);
    border: 2px solid #ffb800;
    color: #ffb800;
    box-shadow: 0 0 20px rgba(255, 184, 0, 0.3);
}

.hidden { display: none; }

@media (max-width: 520px) {
    .auth-container { margin: 16px 8px; }
}
@media (max-height: 700px) {
    .auth-container { margin: 12px auto; }
}
