/* ==============================================================
   NAV FK — style.css
   Téma: sötét (fekete/szürke) alap, kék/cián neon kiemelésekkel
   Fontok: Orbitron (logó/cím), Rajdhani (feliratok), Inter (szöveg)
   ============================================================== */

:root {
    --bg-0: #06070a;
    --bg-1: #0c0f16;
    --bg-2: #12161f;
    --panel-bg: rgba(14, 18, 27, 0.72);
    --panel-border: rgba(58, 158, 255, 0.28);
    --accent: #2f9bff;
    --accent-cyan: #17e5ff;
    --accent-soft: rgba(47, 155, 255, 0.15);
    --text-hi: #eaf2ff;
    --text-mid: #9fb0c8;
    --text-low: #5f7089;
    --danger: #ff4d6d;
    --danger-soft: rgba(255, 77, 109, 0.12);
    --success: #2be3a3;
    --success-soft: rgba(43, 227, 163, 0.12);
    --radius-lg: 22px;
    --radius-md: 12px;
    --font-display: 'Orbitron', sans-serif;
    --font-head: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-hi);
    background: var(--bg-0);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* ---------- Ambient háttér ---------- */
.bg-grid {
    position: fixed;
    top: -84px; left: -84px; right: -84px; bottom: -84px;
    z-index: 0;
    background-image:
        linear-gradient(rgba(47, 155, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47, 155, 255, 0.06) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 90%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 90%);
    will-change: transform;
    animation: gridDrift 40s linear infinite;
}

/* FONTOS: transform-mal animálunk (nem background-position-nel) — a transform
   tisztán GPU-compositor művelet, nem igényel repaint-et minden frame-nél.
   A background-position animálása a teljes (position:fixed, egész képernyőt
   kitöltő) elemet minden frame-ben újrafestette volna, ami lassította /
   késleltette a hover-animációkat az oldal MINDEN gombján, mert a fő szál
   folyamatosan ezzel volt elfoglalva. A -84px overscan (top/left/right/bottom)
   azért kell, hogy a 84px-es elmozdulás közben ne látszódjon üres szél. */
@keyframes gridDrift {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(84px, 84px, 0); }
}

.bg-glow {
    position: fixed;
    z-index: 0;
    width: 60vw;
    height: 60vw;
    max-width: 900px;
    max-height: 900px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    pointer-events: none;
    will-change: transform;
}
.bg-glow.g1 {
    top: -20%; left: -10%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    animation: floatSlow 16s ease-in-out infinite;
}
.bg-glow.g2 {
    bottom: -25%; right: -15%;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    animation: floatSlow 20s ease-in-out infinite reverse;
}

@keyframes floatSlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.08); }
}

/* ---------- Wrapper / logó ---------- */
.page-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 24px;
    width: 100%;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.brand-mark {
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: 6px;
    color: var(--text-hi);
    text-shadow: 0 0 18px rgba(47, 155, 255, 0.55), 0 0 40px rgba(23, 229, 255, 0.25);
}

.brand-sub {
    font-family: var(--font-head);
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-mid);
}

/* ---------- Panel (üveg / neon körvonal) ---------- */
.auth-panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--panel-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 38px 34px 30px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,
        0 20px 60px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(47, 155, 255, 0.08);
    overflow: hidden;
}

/* fade-es kék körvonal - pulzáló glow keret */
.auth-panel::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(
        from var(--angle, 0deg),
        transparent 0%,
        rgba(23, 229, 255, 0.65) 15%,
        transparent 35%,
        transparent 65%,
        rgba(47, 155, 255, 0.55) 85%,
        transparent 100%
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotateGlow 6s linear infinite;
    pointer-events: none;
}

@property --angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

@keyframes rotateGlow {
    to { --angle: 360deg; }
}

.panel-head {
    text-align: center;
    margin-bottom: 26px;
}

.panel-head h1 {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 0 0 4px;
    color: var(--text-hi);
}

.panel-head p {
    margin: 0;
    font-size: 13px;
    color: var(--text-mid);
}

/* ---------- Form elemek ---------- */
.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-family: var(--font-head);
    font-size: 12.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-mid);
    margin-bottom: 7px;
}

.field input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-hi);
    font-family: var(--font-body);
    font-size: 14.5px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.field input::placeholder { color: var(--text-low); }

.field input:focus {
    border-color: var(--accent);
    background: rgba(47, 155, 255, 0.05);
    box-shadow: 0 0 0 3px var(--accent-soft), 0 0 18px rgba(47, 155, 255, 0.25);
}

.field textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-hi);
    font-family: var(--font-body);
    font-size: 14.5px;
    outline: none;
    resize: vertical;
    min-height: 90px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.field textarea::placeholder { color: var(--text-low); }

.field textarea:focus {
    border-color: var(--accent);
    background: rgba(47, 155, 255, 0.05);
    box-shadow: 0 0 0 3px var(--accent-soft), 0 0 18px rgba(47, 155, 255, 0.25);
}

.field small.hint {
    display: block;
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--text-low);
}

/* ---------- Gombok ---------- */
.btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12.5px 16px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
    color: #041018;
    box-shadow: 0 8px 24px rgba(47, 155, 255, 0.35);
    margin-top: 6px;
}
.btn-primary:hover {
    box-shadow: 0 10px 30px rgba(47, 155, 255, 0.5), 0 0 20px rgba(23, 229, 255, 0.35);
}
.btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-mid);
    margin-top: 10px;
}
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--text-hi);
    box-shadow: 0 0 16px rgba(47, 155, 255, 0.15);
}

/* ---------- Infobox / üzenetek ---------- */
.infobox {
    display: none;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    line-height: 1.4;
    margin-bottom: 18px;
    border: 1px solid transparent;
}
.infobox.show { display: flex; }
.infobox.error   { background: var(--danger-soft);  border-color: rgba(255,77,109,.35); color: #ffb3c1; }
.infobox.success { background: var(--success-soft); border-color: rgba(43,227,163,.35); color: #9df3d9; }
.infobox.info    { background: var(--accent-soft);  border-color: rgba(47,155,255,.35); color: #bfe0ff; }
.infobox .ic { flex-shrink: 0; font-weight: 700; }

/* ---------- Panel váltás (login <-> regisztráció) ---------- */
.panel-switch-note {
    text-align: center;
    font-size: 13px;
    color: var(--text-mid);
    margin-top: 4px;
}
.panel-switch-note a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}
.panel-switch-note a:hover { text-decoration: underline; }

.form-view { animation: fadeSlideIn .35s ease; }
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* ---------- Pending / státusz képernyők ---------- */
.status-screen {
    text-align: center;
    padding: 12px 4px 4px;
}
.status-screen .status-icon {
    font-size: 44px;
    margin-bottom: 14px;
    display: inline-block;
    animation: pulseIcon 2.2s ease-in-out infinite;
}
@keyframes pulseIcon {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(47,155,255,.5)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 18px rgba(23,229,255,.7)); }
}
.status-screen h2 {
    font-family: var(--font-head);
    font-size: 22px;
    letter-spacing: 1px;
    color: var(--text-hi);
    margin: 0 0 10px;
    line-height: 1.35;
}
.status-screen p {
    font-size: 13.5px;
    color: var(--text-mid);
    margin: 0 0 22px;
    line-height: 1.6;
}

/* ---------- Loading spinner gombon belül ---------- */
.spinner {
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(4,16,24,.35);
    border-top-color: #041018;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Reszponzív ---------- */
@media (max-width: 480px) {
    .auth-panel { padding: 30px 22px 24px; border-radius: 18px; }
    .brand-mark { font-size: 22px; letter-spacing: 4px; }
}

/* ---------- Focus - billentyűzet hozzáférhetőség ---------- */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* ---------- Csökkentett mozgás preferencia ---------- */
@media (prefers-reduced-motion: reduce) {
    .bg-grid, .bg-glow, .auth-panel::before, .status-screen .status-icon {
        animation: none !important;
    }
}