:root {
    --hud-cyan: #37c9ff;
    --hud-cyan-strong: #57e6ff;
    --hud-blue: #0a3d66;
    --hud-dark: #05070a;
    --hud-glow: rgba(55, 201, 255, 0.45);
    --hud-soft: rgba(55, 201, 255, 0.16);
}

* { box-sizing: border-box; }

body.hud-login {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 30% 20%, #0a0f17 0%, #05070a 35%, #030407 100%);
    color: #dff7ff;
    font-family: 'Space Grotesk', sans-serif;
    overflow: hidden;
}

#stars, #stars2 {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

#stars {
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(120,190,255,.5), transparent),
        radial-gradient(1px 1px at 120px 80px, rgba(180,240,255,.4), transparent),
        radial-gradient(1px 1px at 200px 120px, rgba(60,140,220,.35), transparent);
    background-size: 240px 200px;
    opacity: 0.6;
    animation: star-drift 28s linear infinite;
}

#stars2 {
    background-image:
        radial-gradient(1px 1px at 40px 60px, rgba(120,190,255,.35), transparent),
        radial-gradient(2px 2px at 160px 40px, rgba(90,180,255,.35), transparent),
        radial-gradient(1px 1px at 220px 140px, rgba(200,255,255,.4), transparent);
    background-size: 280px 240px;
    opacity: 0.35;
    animation: star-drift 40s linear infinite reverse;
}

@keyframes star-drift {
    from { transform: translate3d(0,0,0); }
    to { transform: translate3d(-120px, 60px, 0); }
}

.login-stage {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    z-index: 2;
    padding: 48px 16px;
}

.float-wrap {
    position: relative;
    width: min(520px, 92vw);
    height: min(520px, 92vw);
    display: grid;
    place-items: center;
    transform-style: preserve-3d;
}

.hud-orbit {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    filter: drop-shadow(0 0 20px rgba(55,201,255,0.35));
}

.hud-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(55,201,255,0.25);
    box-shadow: 0 0 40px rgba(55,201,255,0.08) inset;
    animation: spin 40s linear infinite;
}

.hud-ring::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px dashed rgba(55,201,255,0.3);
    opacity: 0.6;
}

.ring-1 { width: 100%; height: 100%; animation-duration: 32s; }
.ring-2 { width: 78%; height: 78%; border-color: rgba(87,230,255,0.4); animation-duration: 22s; animation-direction: reverse; }
.ring-3 { width: 58%; height: 58%; border-color: rgba(55,201,255,0.55); animation-duration: 18s; }

.hud-ticks {
    position: absolute;
    width: 92%;
    height: 92%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(55,201,255,.0), rgba(55,201,255,.0) 10deg, rgba(55,201,255,.55) 12deg, rgba(55,201,255,.0) 20deg);
    mask: radial-gradient(circle, transparent 58%, #000 59%);
    animation: spin 14s linear infinite;
}

.hud-scan {
    position: absolute;
    width: 64%;
    height: 64%;
    border-radius: 50%;
    background: conic-gradient(from 180deg, rgba(55,201,255,0) 0deg, rgba(55,201,255,0.35) 35deg, rgba(55,201,255,0) 70deg);
    filter: blur(0.2px);
    animation: sweep 6s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes sweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hud-panel {
    position: relative;
    width: min(420px, 90vw);
    padding: 28px 26px 24px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(7,12,18,0.8), rgba(6,10,16,0.65));
    border: 1px solid rgba(55,201,255,0.35);
    box-shadow:
        0 18px 40px rgba(0,0,0,0.6),
        inset 0 0 40px rgba(55,201,255,0.08);
    backdrop-filter: blur(6px);
    z-index: 3;
}

.hud-panel::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 12px;
    border: 1px solid rgba(55,201,255,0.15);
    pointer-events: none;
}

.hud-header {
    text-align: center;
    margin-bottom: 18px;
}

.hud-title {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.25em;
    font-size: 1.1rem;
    color: var(--hud-cyan-strong);
}

.hud-sub {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(223,247,255,0.6);
    margin-top: 6px;
}

.user-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(6,14,22,0.7);
    border: 1px solid rgba(55,201,255,0.2);
    margin-bottom: 14px;
}

.user-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e8fbff;
    font-size: 1rem;
    font-family: 'Space Grotesk', sans-serif;
}

.user-box input::placeholder {
    color: rgba(223,247,255,0.5);
}

.input-icon {
    font-size: 0.95rem;
    color: var(--hud-cyan-strong);
    opacity: 0.9;
}

.hud-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 6px;
}

.hud-btn {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    padding: 12px 10px;
    border-radius: 10px;
    border: 1px solid var(--hud-cyan-strong);
    color: #021018;
    background: linear-gradient(135deg, rgba(87,230,255,0.9), rgba(55,201,255,0.7));
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    text-decoration: none;
}

.hud-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(55,201,255,0.6);
}

.hud-btn-ghost {
    background: transparent;
    color: var(--hud-cyan-strong);
    border: 1px solid rgba(55,201,255,0.5);
}

.hud-links {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.85rem;
}

.google-btn, .create-link {
    color: rgba(223,247,255,0.75);
    text-decoration: none;
    border-bottom: 1px dashed rgba(55,201,255,0.4);
    padding-bottom: 2px;
}

.google-btn:hover, .create-link:hover {
    color: var(--hud-cyan-strong);
}

.error-message {
    background: rgba(255, 70, 70, 0.12);
    border: 1px solid rgba(255, 70, 70, 0.4);
    color: #ffb6b6;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-align: center;
}

.success-message {
    background: rgba(40, 200, 140, 0.12);
    border: 1px solid rgba(40, 200, 140, 0.5);
    color: #aef6d8;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-align: center;
}

.register-hint {
    margin-top: 8px;
    font-size: 0.8rem;
    color: rgba(223,247,255,0.65);
}

.suggested-ids {
    margin: 10px 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px dashed rgba(55,201,255,0.35);
    background: rgba(6,14,22,0.45);
}

.suggested-ids__label {
    font-size: 0.75rem;
    color: rgba(223,247,255,0.6);
    margin-bottom: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.suggested-ids__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-btn {
    background: transparent;
    color: rgba(223,247,255,0.75);
    border: 1px solid rgba(55,201,255,0.35);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: none;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.suggestion-btn:hover {
    color: var(--hud-cyan-strong);
    border-color: var(--hud-cyan-strong);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

@media (max-width: 600px) {
    .float-wrap { height: auto; }
    .hud-orbit { display: none; }
    .hud-panel { width: min(420px, 94vw); }
    .hud-actions { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .login-stage { padding: 32px 12px; }
    .hud-panel { padding: 22px 18px 20px; }
    .hud-title { font-size: 0.95rem; letter-spacing: 0.2em; }
    .hud-sub { font-size: 0.72rem; letter-spacing: 0.16em; }
    .user-box { padding: 8px 10px; }
    .user-box input { font-size: 0.95rem; }
    .hud-actions { gap: 8px; }
    .hud-btn { padding: 10px 8px; font-size: 0.78rem; }
    .hud-links { flex-direction: column; align-items: center; text-align: center; }
}

@media (min-width: 601px) and (max-width: 820px) {
    .float-wrap { width: min(560px, 90vw); height: min(560px, 90vw); }
    .hud-panel { width: min(440px, 86vw); }
    .hud-title { font-size: 1rem; }
}

@media (min-width: 1024px) {
    .float-wrap { width: 600px; height: 600px; }
    .hud-panel { width: 440px; }
    .hud-title { font-size: 1.15rem; }
    .hud-sub { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    #stars, #stars2, .hud-ring, .hud-ticks, .hud-scan {
        animation: none !important;
    }
}
