* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

body {
    background: #f5f5f5;
    color: #1a1a1a;
    line-height: 1.5;
    min-height: 100vh;
}

.header {
    background: #ee0808;
    color: #fff;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(232, 23, 23, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 60px;
}

.header__logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-left: -4px;
}

.header__logo-img {
    height: 54px;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

.header__menu {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

.promo {
    background: linear-gradient(90deg, #b80d0d, #e81717);
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
}

.hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #ffeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.hero__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.card {
    background: #fff;
    border-radius: 20px;
    padding: 28px 22px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.card__title {
    font-size: 22px;
    font-weight: 800;
    color: #e81717;
    text-align: center;
    margin-bottom: 6px;
}

.card__subtitle {
    font-size: 14px;
    color: #6b6b6b;
    text-align: center;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #e81717;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.label-icon {
    display: inline-block;
    vertical-align: middle;
    color: #e81717;
    flex-shrink: 0;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    background: #fafafa;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: #e81717;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(232, 23, 23, 0.1);
}

.form-input::placeholder {
    color: #b0b0b0;
    font-weight: 400;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 16px;
    font-size: 16px;
    font-weight: 800;
    color: #e81717;
    z-index: 2;
    pointer-events: none;
}

.input-with-prefix {
    padding-left: 36px !important;
}

.phone-wrapper {
    display: flex;
    align-items: center;
    background: #fafafa;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.phone-wrapper:focus-within {
    border-color: #e81717;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(232, 23, 23, 0.1);
}

.phone-prefix {
    padding: 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: #e81717;
    background: #ffeaea;
    height: 48px;
    display: flex;
    align-items: center;
    border-right: 1.5px solid #e0e0e0;
}

.phone-input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    flex: 1;
    border-radius: 0 !important;
}

.phone-input:focus {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.form-select {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    background: #fafafa;
    transition: all 0.2s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.form-select:focus {
    border-color: #e81717;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(232, 23, 23, 0.1);
}

.form-select:invalid {
    color: #b0b0b0;
}

.form-select option {
    color: #1a1a1a;
    background: #fff;
    font-weight: 500;
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #e81717;
    font-size: 12px;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.select-wrapper:focus-within .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.currency {
    display: flex;
    gap: 8px;
}

.currency__btn {
    flex: 1;
    height: 42px;
    background: #e81717;
    border: 1.5px solid #e81717;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.currency__flag {
    font-size: 18px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-item:hover {
    border-color: #e81717;
    background: #ffeaea;
}

.radio-item input[type="radio"] {
    accent-color: #e81717;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-item span {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    cursor: pointer;
    flex: 1;
}

.radio-item small {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

.radio-icon {
    width: 42px;
    height: 42px;
    background: #ffeaea;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e81717;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.radio-item:hover .radio-icon {
    background: #ffd6d6;
    transform: scale(1.05);
}

.radio-item input[type="radio"]:checked ~ .radio-icon {
    background: #e81717;
    color: #fff;
}

.radio-icon--img {
    background: transparent !important;
    padding: 0;
    overflow: hidden;
}

.radio-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 6px;
}

.radio-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.radio-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.radio-desc {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

.radio-group--grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.radio-item--grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 10px;
    gap: 8px;
}

.radio-icon--grid {
    width: 52px;
    height: 52px;
    background: #ffeaea;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e81717;
    transition: all 0.2s ease;
}

.radio-item--grid:hover .radio-icon--grid {
    background: #ffd6d6;
    transform: scale(1.05);
}

.radio-item--grid input[type="radio"]:checked ~ .radio-icon--grid {
    background: #e81717;
    color: #fff;
}

.radio-item--grid span {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
}

.radio-group--income {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-item--income-no-icon {
    padding: 16px 18px;
    gap: 14px;
    align-items: center;
}

.radio-item--income-no-icon .radio-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.radio-item--income-no-icon .radio-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.radio-item--income-no-icon .radio-desc {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}

.radio-item--income-no-icon input[type="radio"]:checked ~ .radio-content .radio-title {
    color: #e81717;
}

.radio-item--income-no-icon input[type="radio"]:checked {
    accent-color: #e81717;
}

.radio-group--photo {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-item--photo {
    padding: 14px;
    align-items: center;
}

.radio-photo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ffeaea, #ffd6d6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e81717;
    flex-shrink: 0;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.radio-item--photo:hover .radio-photo {
    background: linear-gradient(135deg, #ffd6d6, #ffb3b3);
    transform: scale(1.05);
}

.radio-item--photo input[type="radio"]:checked ~ .radio-photo {
    background: linear-gradient(135deg, #e81717, #b80d0d);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(232, 23, 23, 0.35);
}

.btn-primary {
    width: 100%;
    height: 50px;
    background: #e81717;
    border: none;
    border-radius: 50px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 16px rgba(232, 23, 23, 0.3);
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    background: #b80d0d;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(232, 23, 23, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.otp-inputs {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 24px 0;
    flex-wrap: nowrap;
}

.otp-input {
    width: 38px;
    height: 52px;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: #b80d0d;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    outline: none;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.otp-input:focus {
    border-color: #e81717;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(232, 23, 23, 0.1);
}

.otp-resend {
    text-align: center;
    font-size: 13px;
    color: #6b6b6b;
    margin-top: 16px;
}

.otp-resend a {
    color: #e81717;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.card-visual {
    background: linear-gradient(135deg, #e81717, #b80d0d);
    border-radius: 16px;
    padding: 24px;
    color: #fff;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(232, 23, 23, 0.3);
}

.card-visual::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.card-visual__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-visual__chip {
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #FFD700, #FFA000);
    border-radius: 6px;
}

.card-visual__logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.95;
    z-index: 2;
    position: relative;
}

.card-visual__number {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 16px;
    font-family: 'Courier New', monospace;
}

.card-visual__label {
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.8;
    letter-spacing: 1px;
}

.keyboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
    padding: 16px;
    background: #fafafa;
    border-radius: 16px;
}

.keyboard__key {
    height: 54px;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.keyboard__key:hover {
    background: #ffeaea;
    border-color: #e81717;
    color: #e81717;
}

.keyboard__key:active {
    background: #e81717;
    color: #fff;
    transform: scale(0.95);
}

.keyboard__key--special {
    font-size: 16px;
    background: #f0f0f0;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal__box {
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal__box {
    transform: scale(1);
}

.modal__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.modal__title {
    font-size: 20px;
    font-weight: 800;
    color: #b80d0d;
    margin-bottom: 8px;
}

.modal__text {
    font-size: 14px;
    color: #6b6b6b;
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal__btn {
    width: 100%;
    height: 46px;
    background: #e81717;
    border: none;
    border-radius: 50px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal__btn:hover {
    background: #b80d0d;
}

.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.footer {
    background: #fffcfc;
    color: #999;
    text-align: center;
    padding: 24px 16px;
    font-size: 12px;
    line-height: 1.6;
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.footer__links a {
    color: #e81717;
    text-decoration: none;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-16 {
    margin-top: 16px;
}

.mb-16 {
    margin-bottom: 16px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

@media (max-width: 380px) {
    .radio-group--grid {
        grid-template-columns: 1fr;
    }

    .header__logo-img {
        height: 46px;
    }

    .otp-inputs {
        gap: 4px;
    }

    .otp-input {
        width: 32px;
        height: 46px;
        font-size: 16px;
    }
}

.input-error-msg {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #e81717;
    margin-top: 6px;
    padding-left: 4px;
    animation: fadeInError 0.3s ease;
}

.input-error-msg.show {
    display: flex;
}

.input-error-msg::before {
    content: "⚠";
    font-size: 13px;
    color: #e81717;
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-input.input-error {
    border-color: #e81717 !important;
    background: #fff5f5 !important;
    box-shadow: 0 0 0 4px rgba(232, 23, 23, 0.1) !important;
    animation: shakeInput 0.4s ease;
}

@keyframes shakeInput {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.select-wrapper.input-error .form-select {
    border-color: #e81717 !important;
    background: #fff5f5 !important;
    box-shadow: 0 0 0 4px rgba(232, 23, 23, 0.1) !important;
}

.phone-wrapper.input-error {
    border-color: #e81717 !important;
    background: #fff5f5 !important;
    box-shadow: 0 0 0 4px rgba(232, 23, 23, 0.1) !important;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .form-input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.2s ease;
    border-radius: 50%;
    z-index: 2;
}

.toggle-password:hover {
    color: #e81717;
    background: rgba(232, 23, 23, 0.08);
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.9);
}

.eye-icon {
    width: 22px;
    height: 22px;
    transition: all 0.2s ease;
}

.toggle-password:hover .eye-icon {
    transform: scale(1.1);
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    text-align: center;
    padding: 20px;
}

.loading-logo {
    width: 180px;
    height: auto;
}

.loading-spinner {
    width: 65px;
    height: 65px;
    border: 5px solid #f0f0f0;
    border-top-color: #ec0000;
    border-bottom-color: #ec0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-message {
    color: #333333;
    font-size: 19px;
    font-weight: 500;
}