* {
    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-register-page {
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow-x: 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%;
}

.register-shell {
    position: relative;
    z-index: 5;
    width: 1120px;
    max-width: 100%;
    min-height: 660px;
    display: grid;
    grid-template-columns: .9fr 1.15fr;
    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);
}

.register-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%);
}

.register-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;
}

.register-hero h1 {
    margin: 0;
    font-size: 70px;
    line-height: .9;
    letter-spacing: 3px;
    font-weight: 1000;
    text-shadow: 0 16px 40px rgba(0,0,0,.32);
}

.register-hero p {
    max-width: 420px;
    margin: 28px 0 0;
    color: rgba(255,255,255,.88);
    font-size: 16px;
    line-height: 1.8;
}

.hero-points {
    margin-top: 36px;
    display: grid;
    gap: 12px;
}

.hero-points div {
    padding: 15px 17px;
    border-radius: 16px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
}

.register-panel {
    padding: 46px;
    background: rgba(6, 13, 30, .88);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-brand {
    display: none;
}

.register-header {
    display: flex;
    align-items: center;
    gap: 17px;
    margin-bottom: 28px;
}

.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;
}

.register-header h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 900;
}

.register-header p {
    margin: 6px 0 0;
    color: #94a3b8;
    font-size: 14px;
}

.register-header a {
    color: #bfdbfe;
    font-weight: 800;
    text-decoration: none;
}

.register-header a:hover {
    color: #fff;
}

.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);
}

.register-form {
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.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: 52px;
    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);
}

.terms-line {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 11px;
    color: #cbd5e1;
    font-size: 14px;
}

.terms-line input {
    width: 18px;
    height: 18px;
    accent-color: #b31942;
}

.terms-line a {
    color: #bfdbfe;
    font-weight: 800;
    text-decoration: none;
}

.terms-line a:hover {
    color: #fff;
}

.primary-btn {
    width: 100%;
    height: 55px;
    margin-top: 24px;
    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);
}

.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;
}

.terms-card {
    width: 780px;
    max-width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    overflow: hidden;
    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);
}

.terms-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #b31942, #0a3161);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.terms-header span {
    margin-right: 8px;
}

.terms-header button {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
}

.terms-content {
    padding: 26px;
    overflow-y: auto;
    color: #dbeafe;
    line-height: 1.8;
    font-size: 15px;
}

.terms-content h1,
.terms-content h2,
.terms-content h3 {
    color: #fff;
}

.terms-content a {
    color: #bfdbfe;
}

.terms-footer {
    padding: 18px 24px;
    border-top: 1px solid rgba(255,255,255,.12);
    text-align: right;
}

.terms-footer button {
    min-width: 130px;
    height: 46px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #b31942, #0a3161);
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}

@media (max-width: 980px) {
    .register-shell {
        grid-template-columns: 1fr;
        width: 620px;
    }

    .register-hero {
        display: none;
    }

    .register-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: 620px) {
    .greatusa-register-page {
        padding: 18px;
    }

    .register-shell {
        min-height: auto;
        border-radius: 26px;
    }

    .register-panel {
        padding: 30px 22px;
    }

    .register-header {
        flex-direction: column;
        text-align: center;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .terms-line {
        align-items: flex-start;
    }

    .modal-actions {
        grid-template-columns: 1fr;
    }

    .terms-header {
        font-size: 16px;
    }
}