/* CSS Reset & Global Settings */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-page: #ffffff;
    --text-primary: #111111;
    --text-secondary: #52525b;
    --text-placeholder: #a1a1aa;
    --border-dark: #18181b;
    --border-light: #e4e4e7;
    --border-header: #f0f0f0;
    --btn-black: #000000;
    --btn-hover: #1f1f1f;
    --secure-green: #108457;
    --price-orange: #e23e1d;
    --error-red: #dc2626;
    --font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --radius-box: 8px;

    /* Promo Colors */
    --promo-title-red: #8f2316;
    --promo-orange: #e1401f;
    --promo-ticket-bg: #fff9f5;
    --promo-ticket-border: #f8ded0;
    --promo-ticket-dashed: #f3c7b2;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: var(--font-family);
    background-color: var(--bg-page);
    color: var(--text-primary);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page Visibility */
.page-hidden {
    display: none !important;
}

/* Main Full-Page Container */
.page-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    position: relative;
}

/* ==========================================
   HEADER BARS
   ========================================== */
.card-header {
    width: 100%;
    height: 66px;
    padding: 0 clamp(16px, 4vw, 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-header);
    background-color: #ffffff;
    flex-shrink: 0;
}

.header-title {
    font-size: clamp(20px, 2.5vw, 24px);
    font-weight: 800;
    color: var(--text-primary);
}

/* Secure Header for Checkout (Step 2) */
.checkout-header {
    justify-content: center;
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secure-green);
    font-weight: 800;
    font-size: clamp(17px, 2.2vw, 19px);
}

.secure-text {
    letter-spacing: -0.2px;
}

/* Close 'X' Button on Header */
.close-btn {
    position: absolute;
    right: clamp(16px, 4vw, 40px);
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background-color: #f4f4f5;
}

/* ==========================================
   PAGE 1 FORM STYLES
   ========================================== */
.payment-card {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: clamp(24px, 5vh, 48px) clamp(16px, 4vw, 36px);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background-color: #ffffff;
}

.payment-form {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: clamp(20px, 3.5vh, 28px);
}

.form-label {
    display: block;
    font-size: clamp(16px, 2vw, 18px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-align: right;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.form-input {
    width: 100%;
    height: 54px;
    padding: 12px 18px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-primary);
    background-color: #ffffff;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-box);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.link-input-wrapper .form-input {
    border: 1.5px solid var(--border-dark);
    padding-left: 18px;
    padding-right: 50px;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15.5px;
}

.link-input-wrapper .form-input::placeholder {
    color: var(--text-placeholder);
    text-align: left;
    direction: ltr;
}

.input-icon-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
}

.link-icon {
    stroke: var(--text-primary);
}

.amount-wrapper .form-input {
    border: 1.5px solid var(--border-light);
    text-align: right;
    font-weight: 600;
    font-size: 17px;
    color: var(--text-primary);
    direction: ltr;
}

.amount-wrapper .form-input::placeholder {
    color: var(--text-placeholder);
    font-weight: 500;
}

.form-input:focus {
    border-color: var(--border-dark);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.btn-confirm {
    width: 100%;
    height: 54px;
    background-color: var(--btn-black);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-box);
    font-size: 18px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: clamp(16px, 2.5vh, 24px);
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-confirm:hover {
    background-color: var(--btn-hover);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-confirm:active {
    transform: scale(0.99);
}

/* ==========================================
   PAGE 2: CHECKOUT SCREEN (image copy 2.png)
   ========================================== */

/* Payment Logos Strip with image.png */
.payment-logos-strip {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 18px clamp(16px, 4vw, 36px) 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-brands-image {
    max-width: 280px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    mix-blend-mode: multiply;
}

.checkout-card-body {
    padding-top: 18px;
    padding-bottom: 40px;
}

.checkout-label-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 24px;
    margin-bottom: 8px;
}

.cvv-label-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.checkout-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.checkout-input {
    height: 52px;
    border-radius: 6px;
    font-size: 16px;
}

/* Card Number Input Specifics */
.card-number-wrapper .form-input {
    border-color: #18181b; /* Dark border as in reference */
    padding-right: 50px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 1px;
}

.card-number-wrapper .form-input.input-error {
    border-color: var(--error-red) !important;
}

.card-type-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.field-error-msg {
    color: var(--error-red);
    font-size: 13.5px;
    font-weight: 600;
    margin-top: 6px;
}

/* Split Columns (Expiry Date & CVV) */
.checkout-split-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}

.split-col {
    flex: 1;
    margin-bottom: 0;
}

.select-like-wrapper .form-input {
    padding-right: 36px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.chevron-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
}

.cvv-wrapper .form-input {
    padding-right: 36px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 2px;
}

.cvv-shield-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
}

.help-question-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1px solid #a1a1aa;
    border-radius: 50%;
    font-size: 11px;
    color: #71717a;
    font-weight: bold;
    cursor: help;
}

/* Remember Card Switch */
.remember-card-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e4e4e7;
    border-radius: 34px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #000000;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.remember-text-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.remember-text {
    font-size: 14.5px;
    font-weight: 600;
    color: #27272a;
}

/* Action Row (Price & Confirm Button) Directly Under Toggle */
.checkout-action-row {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

.price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.price-top-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.arrow-up-icon {
    display: flex;
    align-items: center;
    margin-left: 2px;
}

.currency-label {
    font-size: 15px;
    font-weight: 800;
    color: var(--price-orange);
}

.discounted-price {
    font-size: clamp(22px, 3vw, 26px);
    font-weight: 900;
    color: var(--price-orange);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.original-price {
    font-size: 14px;
    font-weight: 500;
    color: #a1a1aa;
    text-decoration: line-through;
    margin-right: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.discount-badge {
    background-color: var(--price-orange);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
    margin-top: 2px;
}

.btn-confirm-order {
    flex: 1;
    max-width: 260px;
    height: 52px;
    background-color: var(--btn-black);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-box);
    font-size: 18px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-confirm-order:hover {
    background-color: var(--btn-hover);
}

.btn-confirm-order:active {
    transform: scale(0.98);
}

/* ==========================================
   8-SECOND LOADING SCREEN WITH BLUR & LOCK
   ========================================== */
.loading-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 24px;
}

.loading-modal-card {
    width: 100%;
    max-width: 380px;
    background-color: #ffffff;
    border-radius: 20px;
    padding: 36px 24px 30px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: popupScale 0.35s ease-out;
}

/* Spinner with Lock in Center */
.spinner-lock-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.outer-spinning-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3.5px solid #f3f4f6;
    border-top-color: #111111;
    border-right-color: #111111;
    border-radius: 50%;
    animation: rotateRing 1s linear infinite;
}

.center-lock-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111111;
    animation: pulseLock 2s ease-in-out infinite;
}

@keyframes rotateRing {
    to { transform: rotate(360deg); }
}

@keyframes pulseLock {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Status Text */
.loading-status-text {
    font-size: 19px;
    font-weight: 800;
    color: #111111;
    margin-bottom: 8px;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    transition: opacity 0.3s ease;
}

/* Animated Loading Dots */
.loading-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 22px;
}

.loading-dots span {
    width: 7px;
    height: 7px;
    background-color: #18181b;
    border-radius: 50%;
    animation: bounceDots 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounceDots {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

/* Payment Cards Strip in Loading */
.loading-cards-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.loading-cards-image {
    max-width: 220px;
    width: 100%;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* Progress Track */
.loading-progress-track {
    width: 100%;
    height: 5px;
    background-color: #f4f4f5;
    border-radius: 10px;
    overflow: hidden;
}

.loading-progress-fill {
    width: 0%;
    height: 100%;
    background-color: #18181b;
    border-radius: 10px;
    transition: width 0.1s linear;
}

/* ==========================================
   PROMO POPUP MODAL (image copy.png)
   ========================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.modal-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-wrapper {
    position: relative;
    width: 100%;
    max-width: 410px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    animation: popupScale 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popupScale {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(15px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-circle-close {
    position: absolute;
    top: -46px;
    left: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(40, 40, 40, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.modal-circle-close:hover {
    background: rgba(20, 20, 20, 0.85);
    transform: scale(1.08);
}

.promo-card {
    width: 100%;
    background: linear-gradient(180deg, #fff2eb 0%, #ffffff 28%, #ffffff 100%);
    border-radius: 22px;
    padding: 30px 24px 26px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.promo-title {
    font-size: clamp(21px, 2.5vw, 24px);
    font-weight: 900;
    color: var(--promo-title-red);
    margin-bottom: 22px;
}

.coupon-ticket {
    width: 100%;
    background-color: var(--promo-ticket-bg);
    border: 1px solid var(--promo-ticket-border);
    border-radius: 14px;
    display: flex;
    align-items: stretch;
    position: relative;
    padding: 18px 16px;
    margin-bottom: 22px;
    overflow: hidden;
}

.ticket-notch {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.notch-left {
    left: -9px;
    box-shadow: inset -1px 0 0 var(--promo-ticket-border);
}

.notch-right {
    right: -9px;
    box-shadow: inset 1px 0 0 var(--promo-ticket-border);
}

.ticket-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    padding-right: 4px;
}

.discount-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.discount-percent {
    font-size: 38px;
    font-weight: 900;
    color: var(--promo-orange);
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.discount-word {
    font-size: 20px;
    font-weight: 800;
    color: var(--promo-orange);
}

.ticket-type {
    font-size: 16px;
    font-weight: 800;
    color: #222222;
    margin-bottom: 12px;
}

.ticket-free-shipping {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: #333333;
}

.shipping-truck-icon {
    stroke: var(--promo-orange);
    flex-shrink: 0;
}

.ticket-divider {
    width: 0;
    border-left: 1.5px dashed var(--promo-ticket-dashed);
    margin: -18px 12px;
}

.ticket-stub {
    width: 75px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.coupon-icon-badge {
    width: 48px;
    height: 36px;
    border: 2px dashed var(--promo-orange);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-10deg);
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(225, 64, 31, 0.1);
}

.percent-symbol {
    font-size: 20px;
    font-weight: 900;
    color: var(--promo-orange);
}

.sparkle {
    position: absolute;
    color: var(--promo-orange);
    font-size: 14px;
    opacity: 0.8;
}

.sparkle-top {
    top: 6px;
    right: 4px;
}

.sparkle-bottom {
    bottom: 6px;
    left: 8px;
}

.btn-shop-now {
    width: 100%;
    height: 52px;
    background-color: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 16px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-shop-now:hover {
    background-color: #000000;
}

.coupon-details-link {
    font-size: 14px;
    font-weight: 600;
    color: #71717a;
    text-decoration: underline;
}

/* Toast Message */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(9, 9, 11, 0.95);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100000;
    animation: fadeInToast 0.25s ease-out;
    backdrop-filter: blur(8px);
}

.hidden {
    display: none !important;
}

@keyframes fadeInToast {
    from {
        opacity: 0;
        transform: translate(-50%, 15px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ==========================================
   PAGE 3: OTP VERIFICATION SCREEN (image copy.png)
   ========================================== */
.otp-page-container {
    background-color: #ffffff;
    min-height: 100vh;
}

.otp-header {
    justify-content: center;
    border-bottom: 1px solid #f4f4f5;
}

.otp-header-title {
    font-size: clamp(19px, 2.2vw, 22px);
    font-weight: 800;
    color: var(--text-primary);
}

.otp-main-card {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: clamp(20px, 4vh, 36px) 20px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.otp-illustration {
    margin-top: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: subtleFloat 3s ease-in-out infinite;
}

@keyframes subtleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

.otp-title {
    font-size: clamp(22px, 3vw, 26px);
    font-weight: 800;
    color: #111111;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.otp-subtitle {
    font-size: 15.5px;
    color: #71717a;
    margin-bottom: 6px;
    font-weight: 500;
}

.otp-phone-wrapper {
    margin-bottom: 28px;
}

.otp-phone-number,
.otp-card-number {
    font-size: 17px;
    font-weight: 700;
    color: #27272a;
    direction: ltr;
    display: inline-block;
    letter-spacing: 1.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.otp-form {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.otp-inputs-grid {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 24px;
    direction: ltr;
}

.otp-box {
    width: 48px;
    height: 58px;
    border: 1.5px solid #e4e4e7;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    color: #18181b;
    background-color: #ffffff;
    outline: none;
    caret-color: #f97316;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    -moz-appearance: textfield;
}

.otp-box::-webkit-outer-spin-button,
.otp-box::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.otp-box:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3.5px rgba(249, 115, 22, 0.15);
    background-color: #ffffff;
}

.otp-box.filled {
    border-color: #27272a;
    background-color: #fafafa;
}

.otp-timer-row {
    margin-bottom: 28px;
    font-size: 14.5px;
    color: #52525b;
    font-weight: 500;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.timer-countdown {
    color: #e23e1d;
    font-weight: 700;
    direction: ltr;
}

.btn-resend-link {
    background: transparent;
    border: none;
    color: #e23e1d;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 2px 6px;
    transition: opacity 0.2s ease;
}

.btn-resend-link:hover {
    opacity: 0.85;
}

.btn-confirm-otp {
    width: 100%;
    height: 52px;
    background-color: #111111;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-confirm-otp:hover {
    background-color: #27272a;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-confirm-otp:active {
    transform: scale(0.99);
}

.btn-confirm-otp:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.otp-change-phone-container {
    margin-top: 20px;
}

.otp-change-phone-btn {
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #71717a;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s ease;
}

.otp-change-phone-btn:hover {
    color: #111111;
}

/* ==========================================
   MODAL DIALOGS (Change Phone & Success)
   ========================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    animation: fadeInModal 0.2s ease-out;
}

.modal-card {
    background-color: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
    position: relative;
    animation: scaleInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f4f4f5;
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #111;
}

.modal-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #71717a;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close-btn:hover {
    background-color: #f4f4f5;
    color: #111;
}

.modal-desc {
    font-size: 14.5px;
    color: #71717a;
    margin-bottom: 16px;
    line-height: 1.5;
}

.phone-input-wrapper {
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
}

/* Success Modal */
.modal-success-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 28px;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #ecfdf5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: #111;
    margin-bottom: 10px;
}

.success-modal-desc {
    font-size: 15px;
    color: #71717a;
    margin-bottom: 24px;
    line-height: 1.5;
}

.success-modal-actions {
    width: 100%;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleInModal {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================
   PAGE 4: INTERMEDIATE LOADING SCREEN (5s)
   ========================================== */
.loading-body {
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-page-container {
    width: 100%;
    max-width: 500px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeInModal 0.3s ease-out;
}

.loading-visual-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.loading-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #ecfdf5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 24px rgba(16, 132, 87, 0.12);
}

.shield-check-svg {
    animation: shieldPulse 2s ease-in-out infinite;
}

@keyframes shieldPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

.loading-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(16, 132, 87, 0.2);
    transform: translate(-50%, -50%);
    animation: pulseWave 2.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    z-index: 1;
}

.loading-pulse-ring.delay {
    animation-delay: 1.1s;
}

@keyframes pulseWave {
    0% {
        width: 80px;
        height: 80px;
        opacity: 0.8;
    }
    100% {
        width: 140px;
        height: 140px;
        opacity: 0;
    }
}

.loading-title {
    font-size: clamp(20px, 2.5vw, 23px);
    font-weight: 800;
    color: #111111;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
    transition: all 0.3s ease;
}

.loading-subtitle {
    font-size: 14.5px;
    color: #71717a;
    margin-bottom: 32px;
    font-weight: 500;
    line-height: 1.5;
}

.progress-bar-track {
    width: 100%;
    max-width: 380px;
    height: 8px;
    background-color: #f4f4f5;
    border-radius: 50px;
    overflow: hidden;
    position: relative;
    margin-bottom: 32px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #108457, #16a34a);
    border-radius: 50px;
    transition: width 0.05s linear;
}

.loading-steps-list {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 36px;
    text-align: right;
}

.loading-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #a1a1aa;
    transition: all 0.3s ease;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #d4d4d8;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.loading-step-item.active {
    color: #18181b;
}

.loading-step-item.active .step-dot {
    background-color: #108457;
    box-shadow: 0 0 0 3px rgba(16, 132, 87, 0.2);
}

.loading-step-item.completed {
    color: #108457;
}

.loading-step-item.completed .step-dot {
    background-color: #108457;
}

.loading-footer-secure {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: #108457;
    background-color: #f0fdf4;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid #dcfce7;
}


