/* ── Star Fox 64–inspired login (fan theme; original art) ─────────── */

:root {
    --sf-bg: #050814;
    --sf-deep: #0a1230;
    --sf-panel: rgba(12, 22, 48, 0.82);
    --sf-panel-edge: rgba(0, 200, 255, 0.45);
    --sf-red: #e31c3d;
    --sf-red-glow: rgba(227, 28, 61, 0.55);
    --sf-cyan: #3de7ff;
    --sf-cyan-dim: #1a8a9e;
    --sf-gold: #f0c14a;
    --sf-text: #e8f4ff;
    --sf-muted: #8aa4c4;
    --sf-ok: #4dff9a;
    --sf-danger: #ff6b7a;
}

.sf-body {
    margin: 0;
    min-height: 100vh;
    color: var(--sf-text);
    font-family: "Segoe UI", system-ui, sans-serif;
    background: var(--sf-bg);
    overflow-x: hidden;
    position: relative;
}

/* Starfield */
.sf-stars,
.sf-stars-2 {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.sf-stars {
    background-image:
        radial-gradient(1px 1px at 8% 12%, #fff, transparent),
        radial-gradient(1px 1px at 22% 40%, #bdf, transparent),
        radial-gradient(1.5px 1.5px at 40% 18%, #fff, transparent),
        radial-gradient(1px 1px at 55% 70%, #9cf, transparent),
        radial-gradient(1px 1px at 70% 25%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 85% 55%, #cef, transparent),
        radial-gradient(1px 1px at 15% 80%, #fff, transparent),
        radial-gradient(1px 1px at 92% 10%, #fff, transparent),
        radial-gradient(1px 1px at 48% 90%, #adf, transparent),
        radial-gradient(1px 1px at 33% 55%, #fff, transparent);
    opacity: 0.85;
    animation: sf-drift 80s linear infinite;
}
.sf-stars-2 {
    background-image:
        radial-gradient(1px 1px at 12% 30%, #fff, transparent),
        radial-gradient(1px 1px at 60% 15%, #cef, transparent),
        radial-gradient(1px 1px at 78% 78%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 28% 65%, #9df, transparent),
        radial-gradient(1px 1px at 95% 40%, #fff, transparent);
    opacity: 0.5;
    animation: sf-drift 120s linear infinite reverse;
}
@keyframes sf-drift {
    from { transform: translateY(0); }
    to { transform: translateY(-40px); }
}

/* Nebula / Lylat glow */
.sf-nebula {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 70% 10%, rgba(227, 28, 61, 0.18), transparent 55%),
        radial-gradient(ellipse 60% 45% at 15% 80%, rgba(61, 231, 255, 0.12), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(30, 60, 140, 0.35), transparent 70%);
}

/* Scanlines */
.sf-scan {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.12) 2px,
        rgba(0, 0, 0, 0.12) 4px
    );
    opacity: 0.35;
}

.sf-shell {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem 2rem;
    gap: 1.25rem;
}

/* Top HUD bar */
.sf-hud-top {
    width: min(480px, 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sf-cyan);
    font-weight: 700;
    text-shadow: 0 0 12px rgba(61, 231, 255, 0.5);
}
.sf-hud-top .blink {
    animation: sf-blink 1.4s step-end infinite;
}
@keyframes sf-blink {
    50% { opacity: 0.35; }
}

/* Card */
.sf-card {
    width: min(440px, 100%);
    background: var(--sf-panel);
    border: 1px solid var(--sf-panel-edge);
    border-radius: 4px;
    box-shadow:
        0 0 0 1px rgba(227, 28, 61, 0.25),
        0 0 40px rgba(61, 231, 255, 0.12),
        0 24px 60px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}

/* Corner brackets */
.sf-card::before,
.sf-card::after {
    content: "";
    position: absolute;
    width: 28px;
    height: 28px;
    border: 2px solid var(--sf-red);
    pointer-events: none;
}
.sf-card::before {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
    box-shadow: -2px -2px 12px var(--sf-red-glow);
}
.sf-card::after {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
    box-shadow: 2px 2px 12px var(--sf-red-glow);
}

.sf-card-inner {
    padding: 1.6rem 1.5rem 1.35rem;
}

/* Brand row */
.sf-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.15rem;
    gap: 0.35rem;
}

.sf-arwing {
    width: 120px;
    height: 72px;
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 0 14px rgba(61, 231, 255, 0.45));
    animation: sf-fly 3.5s ease-in-out infinite;
}
@keyframes sf-fly {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-6px) rotate(2deg); }
}

.sf-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #fff 0%, var(--sf-gold) 45%, #c48a1a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.5));
}

.sf-subtitle {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--sf-cyan);
    font-weight: 700;
}

.sf-tagline {
    margin: 0.35rem 0 0;
    font-size: 0.88rem;
    color: var(--sf-muted);
    line-height: 1.4;
    max-width: 32ch;
}

/* Form */
.sf-form label {
    display: block;
    margin-bottom: 0.85rem;
    color: var(--sf-muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.sf-form input[type="text"],
.sf-form input[type="password"] {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.7rem 0.85rem;
    border-radius: 2px;
    border: 1px solid rgba(61, 231, 255, 0.35);
    background: rgba(5, 10, 24, 0.85);
    color: var(--sf-text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.sf-form input:focus {
    border-color: var(--sf-cyan);
    box-shadow: 0 0 0 2px rgba(61, 231, 255, 0.2), 0 0 20px rgba(61, 231, 255, 0.15);
}

.sf-btn {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(180deg, #ff3b55 0%, var(--sf-red) 50%, #9b1028 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12) inset,
        0 4px 0 #6b0a1a,
        0 8px 24px var(--sf-red-glow);
    transition: transform 0.1s, filter 0.15s;
}
.sf-btn:hover {
    filter: brightness(1.08);
}
.sf-btn:active {
    transform: translateY(2px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12) inset,
        0 2px 0 #6b0a1a,
        0 4px 12px var(--sf-red-glow);
}

.sf-banner {
    padding: 0.7rem 0.85rem;
    border-radius: 2px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.35;
}
.sf-banner.err {
    background: rgba(255, 80, 90, 0.12);
    color: var(--sf-danger);
    border: 1px solid rgba(255, 80, 90, 0.4);
}
.sf-banner.ok {
    background: rgba(77, 255, 154, 0.1);
    color: var(--sf-ok);
    border: 1px solid rgba(77, 255, 154, 0.35);
}

.sf-meta {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    color: var(--sf-muted);
    line-height: 1.45;
    text-align: center;
}
.sf-meta code {
    color: var(--sf-cyan);
    font-size: 0.85em;
    background: rgba(61, 231, 255, 0.08);
    padding: 0.1em 0.35em;
    border-radius: 2px;
}

/* Visitor counter HUD */
.sf-stats {
    width: min(440px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}
.sf-stat {
    background: rgba(8, 16, 36, 0.75);
    border: 1px solid rgba(61, 231, 255, 0.28);
    border-radius: 2px;
    padding: 0.65rem 0.75rem;
    text-align: center;
    box-shadow: 0 0 20px rgba(61, 231, 255, 0.06);
}
.sf-stat .label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sf-cyan-dim);
    font-weight: 700;
    margin-bottom: 0.2rem;
}
.sf-stat .value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--sf-gold);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 16px rgba(240, 193, 74, 0.35);
}

/* Disclaimer */
.sf-disclaimer {
    width: min(440px, 100%);
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--sf-muted);
    text-align: center;
    border-top: 1px solid rgba(61, 231, 255, 0.15);
    padding-top: 0.9rem;
}
.sf-disclaimer strong {
    color: var(--sf-cyan);
    font-weight: 700;
}
.sf-disclaimer a {
    color: var(--sf-cyan);
}

.sf-footer {
    width: min(440px, 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(138, 164, 196, 0.7);
    font-weight: 600;
}

/* Boosters / side decoration on wide screens */
.sf-wing-l,
.sf-wing-r {
    display: none;
}
@media (min-width: 900px) {
    .sf-shell {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-content: center;
        gap: 2rem;
    }
    .sf-main-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }
    .sf-wing-l,
    .sf-wing-r {
        display: block;
        width: 100px;
        opacity: 0.55;
        filter: drop-shadow(0 0 12px rgba(227, 28, 61, 0.4));
    }
    .sf-wing-l { transform: scaleX(-1); }
}

@media (prefers-reduced-motion: reduce) {
    .sf-stars, .sf-stars-2, .sf-arwing, .sf-hud-top .blink {
        animation: none;
    }
}
