:root {
    --nv-green: #7CFC00;
    --nv-green-soft: rgba(124, 252, 0, 0.3);
    --amber: #ffbf3b;
    --danger: #ff4b4b;
    --bg-deep: #020304;
    --bg-panel: #050b09;
    --panel-edge: #2b3d2d;
    --text-main: #e9f9e0;
    --text-muted: #73856b;
    --accent-grid: rgba(124, 252, 0, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

/* CHANGED: Allow page to scroll naturally */
body {
    font-family: 'Rajdhani', sans-serif;
    background: radial-gradient(circle at 10% 0, #07140c 0, #000 60%, #000 100%);
    color: var(--text-main);
    min-height: 100vh;  /* Changed from height: 100% */
    overflow-x: hidden; /* Prevent horizontal scroll only */
    overflow-y: auto;   /* ALLOW vertical scroll */
    position: relative;
    /* Removed display:flex centering that conflicts with scrolling */
    padding: 60px 24px; /* Add padding for centering effect instead */
}

/* Night-vision noise - stays fixed during scroll */
.nv-noise {
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 0 0, rgba(124, 252, 0, 0.14) 0, transparent 55%),
        radial-gradient(circle at 100% 0, rgba(124, 252, 0, 0.14) 0, transparent 55%);
    mix-blend-mode: screen;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

/* Tactical grid - stays fixed during scroll */
.grid {
    position: fixed;
    inset: -80px;
    background-image:
        linear-gradient(var(--accent-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--accent-grid) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.22;
    pointer-events: none;
    z-index: 0;
}

/* HUD overlays - stay fixed at viewport edges */
.hud-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent);
    pointer-events: none;
    z-index: 1;
}

.hud-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(0, 0, 0, .95), transparent);
    pointer-events: none;
    z-index: 1;
}

/* Crosshair - stays centered in viewport */
.reticle {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 1px solid rgba(124, 252, 0, 0.4);
    transform: translate(-50%, -50%);
    opacity: 0.25;
    z-index: 0;
}

.reticle::before,
.reticle::after {
    content: "";
    position: absolute;
    inset: 24%;
    border-radius: 50%;
    border: 1px solid rgba(124, 252, 0, 0.25);
}

.reticle::after {
    inset: 44%;
    border-style: dashed;
    border-color: rgba(124, 252, 0, 0.3);
}

.reticle-line {
    position: absolute;
    background: rgba(124, 252, 0, 0.4);
}

.reticle-line.v {
    width: 1px;
    height: 110%;
    left: 50%;
    top: -5%;
}

.reticle-line.h {
    height: 1px;
    width: 110%;
    top: 50%;
    left: -5%;
}

/* CHANGED: Container no longer traps scroll */
.wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;     /* Center horizontally */
    /* Removed: max-height: 100vh and overflow-y: auto */
}

.panel {
    background: linear-gradient(145deg, #050b09, #050806);
    border-radius: 8px;
    border: 1px solid var(--panel-edge);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, .85),
        0 26px 70px rgba(0, 0, 0, .95),
        0 0 45px rgba(0, 0, 0, .9);
    padding: 24px 26px 22px;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px; /* Add space at bottom when scrolling */
}

/* Armor plates */
.panel::before,
.panel::after {
    content: "";
    position: absolute;
    width: 58px;
    height: 10px;
    background: linear-gradient(to right, #101b13, #354836, #101b13);
    border-radius: 0 0 4px 4px;
    border: 1px solid #445b42;
    top: -1px;
    box-shadow: 0 0 12px rgba(0, 0, 0, .9);
}

.panel::before {
    left: 22px;
}

.panel::after {
    right: 22px;
}

/* Status strip */
.top-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--text-muted);
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 6px;
}

.top-strip .tag {
    padding: 3px 9px;
    border-radius: 3px;
    border: 1px solid rgba(124, 252, 0, .6);
    color: var(--nv-green);
    background: rgba(0, 0, 0, .75);
}

.top-strip span.code {
    color: var(--nv-green);
}

/* Logo / title */
.logo-box {
    text-align: center;
    margin-bottom: 18px;
}

.logo-main {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .32em;
    text-indent: .32em;
    color: #f7fff1;
    text-shadow:
        0 0 4px rgba(0, 0, 0, .8),
        0 0 26px rgba(124, 252, 0, .85);
}

.logo-ribbon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    padding: 4px 14px;
    border-radius: 999px;
    border: 1px solid rgba(124, 252, 0, .4);
    background: radial-gradient(circle at top, rgba(16, 40, 18, .8), rgba(2, 5, 3, .9));
    font-family: 'Share Tech Mono', monospace;
    font-size: .75rem;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.logo-ribbon span.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--nv-green);
    box-shadow: 0 0 16px rgba(124, 252, 0, 1);
    animation: blink 1.6s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: .35;
        transform: scale(.6);
    }
}

.logo-sub {
    margin-top: 7px;
    font-family: 'Share Tech Mono', monospace;
    font-size: .72rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Divider line with labels */
.divider {
    margin: 16px 0 20px;
    border-top: 1px solid rgba(90, 125, 88, .75);
    border-bottom: 1px solid rgba(0, 0, 0, .85);
    padding: 7px 2px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 8px;
}

.divider .left span.badge {
    padding: 2px 7px;
    border-radius: 3px;
    border: 1px solid rgba(124, 252, 0, .5);
    color: var(--nv-green);
    background: rgba(0, 0, 0, .8);
    margin-left: 8px;
}

/* Fields */
form {
    margin-top: 2px;
}

.field {
    margin-bottom: 16px;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Share Tech Mono', monospace;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.field-label i {
    font-size: .7rem;
    color: var(--nv-green);
}

.field-shell {
    position: relative;
    background: radial-gradient(circle at top left, rgba(26, 49, 28, .9), rgba(3, 7, 4, 1));
    border-radius: 3px;
    border: 1px solid var(--panel-edge);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, .85),
        0 0 0 1px rgba(0, 0, 0, .85);
    overflow: hidden;
}

.field-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(transparent 80%, rgba(0, 0, 0, .7) 100%);
    opacity: .55;
    pointer-events: none;
}

.field-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(124, 252, 0, .12) 1px, transparent 1px),
        linear-gradient(rgba(124, 252, 0, .06) 1px, transparent 1px);
    background-size: 90px 90px;
    mix-blend-mode: soft-light;
    opacity: .45;
    pointer-events: none;
}

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--nv-green);
    text-shadow: 0 0 12px rgba(124, 252, 0, 1);
    z-index: 2;
}

.field-eye {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--amber);
    cursor: pointer;
    z-index: 2;
    font-size: 1rem;
    transition: color .2s ease, transform .2s ease;
}

.field-eye:hover {
    color: #fff7b3;
    transform: translateY(-50%) scale(1.15);
}

.field-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Share Tech Mono', monospace;
    font-size: .95rem;
    color: var(--text-main);
    padding: 14px 44px 13px 44px;
    position: relative;
    z-index: 1;
}

.field-input::placeholder {
    color: rgba(206, 229, 199, .65);
}

.field-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(124, 252, 0, .9), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease-out;
    z-index: 3;
}

.field-shell:focus-within .field-bar {
    transform: scaleX(1);
}

/* Status row */
.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    font-family: 'Share Tech Mono', monospace;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 8px;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nv-green);
    box-shadow: 0 0 16px rgba(124, 252, 0, 1);
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: .9;
    }
    50% {
        transform: scale(1.7);
        opacity: 1;
    }
}

.status-badge {
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid rgba(124, 252, 0, .5);
    background: rgba(0, 0, 0, .8);
    color: var(--nv-green);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badge i {
    color: var(--nv-green);
}

/* Buttons */
.btn-main {
    width: 100%;
    border-radius: 3px;
    border: 1px solid rgba(124, 252, 0, .9);
    background: radial-gradient(circle at top, rgba(124, 252, 0, .4), rgba(3, 8, 4, 1));
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: .32em;
    text-transform: uppercase;
    text-indent: .32em;
    padding: 13px 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 1);
    transition: transform .14s ease, box-shadow .2s ease, background .2s ease;
}

.btn-main::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 0, rgba(255, 255, 255, .32) 44%, transparent 60%);
    opacity: 0;
    transform: translateX(-40%);
    transition: transform .45s ease, opacity .45s ease;
}

.btn-main:hover::before {
    opacity: 1;
    transform: translateX(40%);
}

.btn-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 34px rgba(124, 252, 0, .7), 0 20px 50px rgba(0, 0, 0, 1);
}

.btn-main:active {
    transform: translateY(0);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 1);
}

.btn-ghost {
    width: 100%;
    border-radius: 3px;
    border: 1px solid rgba(255, 191, 59, .9);
    background: radial-gradient(circle at top, rgba(255, 191, 59, .22), rgba(12, 9, 3, 1));
    color: #ffe7a8;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: .92rem;
    letter-spacing: .22em;
    text-indent: .22em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 12px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: transform .14s ease, box-shadow .2s ease, color .2s ease;
    text-align: center;
}

.btn-ghost i {
    font-size: 1rem;
}

.btn-ghost:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(255, 191, 59, .7), 0 18px 40px rgba(0, 0, 0, 1);
    color: #fffadd;
}

.btn-ghost:active {
    transform: translateY(0);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 1);
}

/* Button loader */
.btn-loader {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: rgba(0, 0, 0, .7);
    overflow: hidden;
    display: none;
}

.btn-loader-bar {
    position: absolute;
    height: 100%;
    width: 34%;
    background: linear-gradient(90deg, transparent, rgba(124, 252, 0, 1), transparent);
    animation: run 1.2s linear infinite;
}

@keyframes run {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(260%);
    }
}

.btn-main.loading .btn-loader {
    display: block;
}

/* Footer */
.foot {
    margin-top: 18px;
    padding-top: 9px;
    border-top: 1px solid rgba(82, 112, 80, .8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 8px;
}

.foot i {
    margin-right: 6px;
    color: var(--nv-green);
}

.signup {
    margin-top: 10px;
    text-align: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--text-muted);
}

.signup a {
    color: var(--amber);
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 191, 59, .8);
    padding-bottom: 1px;
    transition: color .2s ease, border-color .2s ease;
}

.signup a:hover {
    color: #fff5c1;
    border-color: #fff5c1;
}

/* Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, .5), rgba(0, 0, 0, .97));
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 8;
}

.overlay-main {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2.6rem;
    text-transform: uppercase;
    letter-spacing: .45em;
    text-indent: .45em;
    color: var(--nv-green);
    text-align: center;
    text-shadow:
        0 0 12px rgba(124, 252, 0, 1),
        0 0 30px rgba(124, 252, 0, .8);
    animation: ovpulse 1.4s ease-in-out infinite;
}

.overlay-main.danger {
    color: var(--danger);
    text-shadow:
        0 0 12px rgba(255, 75, 75, 1),
        0 0 32px rgba(255, 75, 75, .9);
}

.overlay-sub {
    margin-top: 14px;
    font-family: 'Share Tech Mono', monospace;
    font-size: .9rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--text-muted);
}

@keyframes ovpulse {
    0%, 100% {
        opacity: .9;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.07);
    }
}

/* Small screens */
@media (max-width: 640px) {
    body {
        padding: 20px 14px; /* Reduced padding for mobile */
    }
    
    .wrap {
        padding: 0;
    }
    
    .panel {
        padding: 18px 16px 18px;
        margin-bottom: 20px;
    }

    .logo-main {
        font-size: 1.7rem;
        letter-spacing: .24em;
    }

    .logo-ribbon {
        font-size: .7rem;
        padding: 4px 10px;
    }

    .divider,
    .top-strip {
        font-size: .65rem;
    }

    .field {
        margin-bottom: 14px;
    }

    .field-label {
        font-size: .75rem;
    }

    .field-input {
        padding: 12px 40px 11px 40px;
        font-size: .9rem;
    }

    .btn-main {
        font-size: .9rem;
        padding: 12px 8px;
    }

    .btn-ghost {
        font-size: .84rem;
        padding: 11px 8px;
    }

    .reticle {
        width: 190px;
        height: 190px;
    }

    .status-row {
        font-size: .65rem;
        margin-bottom: 14px;
    }

    .overlay-main {
        font-size: 1.8rem;
        letter-spacing: .3em;
    }
}