* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    background: #050b18;
    color: #fff;
}

.greatusa-page {
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px;
    background:
        radial-gradient(circle at top left, rgba(179,25,66,.45), transparent 35%),
        radial-gradient(circle at bottom right, rgba(10,49,97,.7), transparent 38%),
        linear-gradient(135deg, #050b18, #081a39 55%, #050b18);
}

.flag-layer {
    position: absolute;
    inset: 0;
    opacity: .12;
    background:
        repeating-linear-gradient(
            180deg,
            #b31942 0,
            #b31942 32px,
            #ffffff 32px,
            #ffffff 64px
        );
}

.flag-layer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 44%;
    height: 48%;
    background-color: #0a3161;
    background-image: radial-gradient(circle, #fff 1.6px, transparent 2px);
    background-size: 30px 30px;
}

.glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(85px);
    opacity: .5;
}

.glow-red {
    background: #b31942;
    top: -100px;
    right: 10%;
}

.glow-blue {
    background: #1d4ed8;
    bottom: -120px;
    left: 8%;
}

.auth-shell {
    position: relative;
    z-index: 5;
    width: 1050px;
    max-width: 100%;
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    border-radius: 34px;
    overflow: hidden;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 40px 120px rgba(0,0,0,.55);
    backdrop-filter: blur(24px);
}

.auth-hero {
    padding: 58px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(10,49,97,.88), rgba(179,25,66,.72)),
        radial-gradient(circle at top, rgba(255,255,255,.2), transparent 45%);
}

.auth-hero::after {
    content: "";
    position: absolute;
    inset: 28px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 28px;
    pointer-events: none;
}

.hero-badge {
    width: fit-content;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.5px;
    margin-bottom: 28px;
}

.auth-hero h1 {
    margin: 0;
    font-size: 82px;
    line-height: .9;
    letter-spacing: 4px;
    font-weight: 1000;
    text-shadow: 0 16px 40px rgba(0,0,0,.32);
}

.auth-hero p {
    max-width: 430px;
    margin: 28px 0 0;
    color: rgba(255,255,255,.88);
    font-size: 16px;
    line-height: 1.8;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 42px;
    max-width: 430px;
}

.hero-stats div {
    padding: 18px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    text-align: center;
}

.hero-stats strong {
    display: block;
    font-size: 20px;
    font-weight: 900;
}

.hero-stats span {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,.75);
    font-size: 12px;
}

.auth-panel {
    padding: 50px 46px;
    background: rgba(6, 13, 30, .88);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-brand {
    display: none;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 17px;
    margin-bottom: 30px;
}

.logo-circle {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    border-radius: 22px;
    background: linear-gradient(145deg, #ffffff, #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 35px rgba(0,0,0,.32);
}

.logo-circle img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.logo-box h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 900;
}

.logo-box p {
    margin: 6px 0 0;
    color: #94a3b8;
    font-size: 14px;
}

.alert-box {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.alert-error {
    background: rgba(179,25,66,.22);
    color: #fecdd3;
    border: 1px solid rgba(251,113,133,.32);
}

.alert-success {
    background: rgba(22,163,74,.18);
    color: #bbf7d0;
    border: 1px solid rgba(74,222,128,.3);
}

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 9px;
    color: #e5e7eb;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .4px;
}

.input-wrap {
    position: relative;
}

.input-wrap span {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #bfdbfe;
    font-size: 13px;
}

.input-wrap input {
    width: 100%;
    height: 54px;
    padding: 0 16px 0 44px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: .2s;
}

.input-wrap input::placeholder {
    color: #64748b;
}

.input-wrap input:focus {
    border-color: rgba(147,197,253,.85);
    background: rgba(255,255,255,.12);
    box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}

.primary-btn {
    width: 100%;
    height: 55px;
    margin-top: 8px;
    border: none;
    border-radius: 17px;
    cursor: pointer;
    color: #fff;
    font-size: 15px;
    font-weight: 1000;
    letter-spacing: .8px;
    background:
        linear-gradient(135deg, #b31942, #0a3161);
    box-shadow: 0 18px 35px rgba(179,25,66,.25);
    transition: .2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 45px rgba(10,49,97,.42);
}

.auth-links {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    font-size: 14px;
}

.auth-links a {
    color: #bfdbfe;
    text-decoration: none;
    font-weight: 800;
}

.auth-links a:hover {
    color: #fff;
}

.auth-links span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #64748b;
}

.security-note {
    margin-top: 26px;
    padding: 16px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
    border: 1px solid rgba(255,255,255,.12);
}

.security-note strong {
    display: block;
    font-size: 14px;
    color: #fff;
}

.security-note p {
    margin: 5px 0 0;
    color: #94a3b8;
    font-size: 13px;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2,6,23,.78);
    backdrop-filter: blur(16px);
}

.modal-card {
    width: 430px;
    max-width: 100%;
    padding: 34px;
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(8,18,39,.98), rgba(15,23,42,.98));
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 35px 100px rgba(0,0,0,.65);
    text-align: center;
}

.modal-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #b31942, #0a3161);
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 18px 36px rgba(0,0,0,.35);
}

.modal-card h3 {
    margin: 0;
    font-size: 26px;
    font-weight: 900;
}

.modal-card p {
    margin: 12px 0 18px;
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 15px;
}

.captcha-question {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1px;
}

.modal-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    color: #fff;
    text-align: center;
    font-size: 16px;
    outline: none;
}

.modal-input::placeholder {
    color: #64748b;
}

.modal-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}

.modal-primary,
.modal-secondary {
    height: 48px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 900;
    font-size: 14px;
}

.modal-primary {
    color: #fff;
    background: linear-gradient(135deg, #b31942, #0a3161);
}

.modal-secondary {
    color: #0f172a;
    background: #e5e7eb;
}

.modal-primary.full {
    width: 100%;
    margin-top: 18px;
}

.admin-box {
    margin-top: 18px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: #fff;
    font-weight: 900;
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
        width: 520px;
    }

    .auth-hero {
        display: none;
    }

    .auth-panel {
        padding: 42px 34px;
    }

    .mobile-brand {
        display: block;
        text-align: center;
        margin-bottom: 26px;
    }

    .mobile-brand h1 {
        margin: 0;
        font-size: 34px;
        letter-spacing: 3px;
        font-weight: 1000;
    }

    .mobile-brand span {
        display: block;
        margin-top: 8px;
        color: #94a3b8;
        font-size: 14px;
    }
}

@media (max-width: 520px) {
    .greatusa-page {
        padding: 18px;
    }

    .auth-shell {
        min-height: auto;
        border-radius: 26px;
    }

    .auth-panel {
        padding: 30px 22px;
    }

    .logo-box {
        flex-direction: column;
        text-align: center;
    }

    .logo-box h2 {
        font-size: 26px;
    }

    .auth-links {
        flex-direction: column;
        gap: 9px;
    }

    .auth-links span {
        display: none;
    }

    .modal-actions {
        grid-template-columns: 1fr;
    }
}