:root {
    --bg-card: #0e0f16;
    --bg-input: rgba(255,255,255,0.04);
    --bg-pill: rgba(255,255,255,0.04);
    --blue-main: #FFFC00;
    --blue-bright: #FFFC00;
    --blue-glow: rgba(255, 252, 0, 0.25);
    --text-main: #FFFFFF;
    --text-muted: #A1A1AA;
    --text-sub: rgba(255,255,255,0.55);
    --radius-pill: 9999px;
    --radius-input: 12px;
    --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
}

body {
    background: #07070A;
    background-image: radial-gradient(circle at 50% 25%, rgba(255, 252, 0, 0.06) 0%, rgba(7, 7, 10, 0.96) 80%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.main-content { width: 100%; max-width: 480px; }

.screen {
    display: none;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.3s, transform 0.3s;
}
.screen.active { display: block; opacity: 1; transform: translateY(0) scale(1); }

.glass-card {
    background: linear-gradient(165deg, rgba(16,18,27,0.94) 0%, rgba(10,11,16,0.97) 100%);
    border: 1px solid rgba(255, 252, 0, 0.22);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 24px 60px -15px rgba(0,0,0,0.9), 0 0 35px rgba(255,252,0,0.15);
    overflow: hidden;
    position: relative;
}
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,252,0,0.8), transparent);
    pointer-events: none;
}
.glow {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(120px);
    opacity: 0.45;
    z-index: 0;
    animation: floatGlow 14s ease-in-out infinite alternate;
}
@keyframes floatGlow {
    0% { transform: translate(-50%, 0) scale(1); }
    50% { transform: translate(-45%, -20px) scale(1.08); }
    100% { transform: translate(-55%, 15px) scale(1); }
}
.glow-top {
    top: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(255,252,0,0.22) 0%, rgba(255,252,0,0.05) 50%, rgba(0,0,0,0) 70%);
}
.glow-bottom {
    bottom: -140px;
    right: -80px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,252,0,0.15) 0%, rgba(255,252,0,0) 70%);
    filter: blur(100px);
}

.card-header { padding: 28px 24px 16px; text-align: center; }
.snap-main-title { font-family: 'Outfit', sans-serif; font-size: 2.2rem; font-weight: 900; letter-spacing: -0.02em; background: linear-gradient(135deg, #FFFFFF 0%, #FFFDE6 45%, #FFFC00 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 24px rgba(255,252,0,0.35)); }
.blue-plus { color: #FFFC00; -webkit-text-fill-color: #FFFC00; }
.snap-subtitle { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }

.ticker-pill {
    display: inline-flex;
    background: rgba(255, 252, 0, 0.08);
    border: 1px solid rgba(255, 252, 0, 0.25);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    margin-top: 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #FFFC00;
    box-shadow: 0 0 15px rgba(255,252,0,0.12);
}

.feature-badges-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}
.f-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.card-form-body { padding: 0 24px 28px; }

.warning-notice-banner {
    background: rgba(255, 252, 0, 0.06);
    border: 1px solid rgba(255, 252, 0, 0.25);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.w-text { font-size: 0.8rem; line-height: 1.35; color: #FFFDE6; font-weight: 500; }

.form-group { margin-bottom: 18px; }
.field-label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; color: var(--text-main); }

.pill-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.pill-btn {
    background: var(--bg-pill);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.pill-btn:hover { border-color: rgba(255, 255, 255, 0.35); color: var(--text-main); }
.pill-btn.active { border: 1.5px solid var(--blue-bright); color: var(--blue-bright); background: rgba(255, 252, 0, 0.08); box-shadow: 0 0 12px var(--blue-glow); }

.country-pill-grid { grid-template-columns: repeat(3,1fr); gap: 10px; }
.country-pill.active { border: 1.5px solid #FFFC00 !important; background: linear-gradient(135deg, rgba(255,252,0,0.14) 0%, rgba(255,215,0,0.06) 100%) !important; color: #ffffff !important; box-shadow: 0 0 20px rgba(255,252,0,0.2) !important; }

.operator-pill-grid { grid-template-columns: repeat(2,1fr); }
.op-pill-orange.active, .op-pill-sfr.active, .op-pill-bouygues.active,
.op-pill-base.active, .op-pill-proximus.active, .op-pill-telenet.active,
.op-pill-swisscom.active, .op-pill-sunrise.active, .op-pill-salt.active {
    border-color: #FFFC00 !important;
    color: #FFFC00 !important;
}

.phone-input-row { display: flex; gap: 8px; }
.country-prefix-badge {
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-input);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    flex-shrink: 0;
}
.badge-flag { font-size: 0.75rem; font-weight: 800; color: var(--blue-bright); }
.badge-dial { font-size: 0.82rem; color: var(--text-muted); }

.field-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-input);
    padding: 12px 14px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    transition: all 0.2s;
}
.field-input:focus { border-color: var(--blue-main); box-shadow: 0 0 10px var(--blue-glow); }

.input-with-icon { position: relative; display: flex; align-items: center; }
.input-prefix-icon { position: absolute; left: 14px; font-weight: 700; color: var(--text-muted); }
.input-with-icon .field-input { padding-left: 32px; }

.field-hint { font-size: 0.75rem; color: var(--text-sub); margin-top: 6px; }

.btn-blue-submit {
    width: 100%;
    background: linear-gradient(135deg, #FFFC00 0%, #FFD700 50%, #FFB700 100%);
    color: #000000;
    border: none;
    border-radius: 14px;
    padding: 15px 20px;
    font-size: 1.02rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    box-shadow: 0 12px 32px -5px rgba(255,252,0,0.4), 0 0 20px rgba(255,252,0,0.25);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.btn-blue-submit:hover { transform: translateY(-1.5px); box-shadow: 0 16px 36px -5px rgba(255,252,0,0.55), 0 0 35px rgba(255,252,0,0.4); }
.btn-blue-submit::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 60%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: rotate(25deg);
    animation: ctaShimmer 3.5s infinite ease-in-out;
    pointer-events: none;
}
@keyframes ctaShimmer {
    0% { left: -100%; }
    25%, 100% { left: 200%; }
}
.btn-arrow-icon { font-size: 1.3rem; }

.card-footer-disclaimer { font-size: 0.72rem; color: var(--text-sub); text-align: center; line-height: 1.4; margin-top: 16px; }

.form-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #f87171;
    font-size: 0.8rem;
    padding: 10px 12px;
    border-radius: 8px;
    margin-top: 14px;
    text-align: center;
}
.hidden { display: none !important; }

.waiting-card-body { text-align: center; padding: 10px 20px 24px; }
.paper-plane-wrapper { display: flex; justify-content: center; margin: 10px 0 18px; }
.paper-plane-box {
    position: relative;
    width: 64px;
    height: 64px;
    background: rgba(255, 252, 0, 0.06);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,252,0,0.08);
}
.paper-plane-icon { width: 28px; height: 28px; color: #ffffff; transform: rotate(15deg); }
.plane-spinner-ring {
    position: absolute;
    bottom: -4px; right: -4px;
    width: 22px; height: 22px;
    border: 2.5px solid rgba(255,252,0,0.2);
    border-top-color: var(--blue-main);
    border-radius: 50%;
    animation: spinRing 1s linear infinite;
    background: linear-gradient(165deg, rgba(16,18,27,0.94) 0%, rgba(10,11,16,0.97) 100%);
}
@keyframes spinRing { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.validation-title { font-size: 1.45rem; font-weight: 800; margin-bottom: 6px; color: var(--text-main); }
.validation-subtitle { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.45; }

.danger-warning-box {
    background: rgba(220,38,38,0.12);
    border: 1px solid rgba(239,68,68,0.35);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 18px 0;
}
.danger-warning-title { color: #ef4444; font-size: 0.95rem; font-weight: 800; }
.danger-warning-sub { color: #fca5a5; font-size: 0.85rem; font-weight: 500; }

.loading-dots-row { display: flex; justify-content: center; gap: 8px; margin: 20px 0 10px; }
.loading-dots-row .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    animation: dotPulse 1.4s infinite ease-in-out both;
}
.loading-dots-row .d-1 { animation-delay: -0.32s; }
.loading-dots-row .d-2 { animation-delay: -0.16s; }

@keyframes dotPulse {
    0%,80%,100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.2); opacity: 1; background: #FFFC00; }
}

.waiting-step-status { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 18px; }
.estimated-time-box {
    background: rgba(255, 252, 0, 0.06);
    border: 1px solid rgba(255,252,0,0.08);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #e5e7eb;
    font-weight: 600;
    margin-bottom: 16px;
}
.blue-text { color: var(--blue-bright); font-weight: 800; }
.support-contact-hint { font-size: 0.82rem; color: #6b7280; text-align: center; margin-bottom: 24px; line-height: 1.45; }
.security-badge-row { font-size: 0.78rem; color: #6b7280; text-align: center; margin-bottom: 16px; }

.otp-header { margin-bottom: 20px; }
.otp-icon { font-size: 2.5rem; margin-bottom: 8px; }

.otp-inputs-row { display: flex; justify-content: center; gap: 8px; margin: 20px 0; }
.otp-digit {
    width: 46px; height: 54px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,252,0,0.3);
    border-radius: 12px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #FFFFFF;
    outline: none;
    transition: transform 0.12s ease, border-color 0.2s, box-shadow 0.2s;
}
.otp-digit:focus {
    border-color: #FFFC00;
    box-shadow: 0 0 0 3px rgba(255,252,0,0.16), 0 0 16px rgba(255,252,0,0.4);
    transform: translateY(-2px);
}

.otp-timer-box { margin-top: 18px; font-size: 0.8rem; color: var(--text-muted); }
.btn-resend-otp {
    background: transparent;
    border: none;
    color: var(--blue-bright);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    text-decoration: underline;
}
.btn-resend-otp.disabled { opacity: 0.5; cursor: not-allowed; text-decoration: none; }

.success-badge-icon { font-size: 3rem; margin-bottom: 10px; }
.vault-title { font-size: 1.5rem; font-weight: 900; color: var(--text-main); }
.vault-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

.vault-rewards-list { margin: 20px 0; display: flex; flex-direction: column; gap: 10px; }
.reward-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,252,0,0.08);
    padding: 12px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}
.reward-icon { font-size: 1.4rem; }
.reward-info strong { display: block; font-size: 0.85rem; color: var(--text-main); }
.reward-info small { font-size: 0.75rem; color: var(--text-muted); }

.geo-block-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(18,19,26,0.92);
    border: 1px solid rgba(239,68,68,0.35);
    border-left: 3px solid #ef4444;
    border-radius: 12px;
    padding: 14px 20px;
    min-width: 280px;
    max-width: 400px;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}
.geo-block-toast.hidden { display: none; }
.geo-block-icon { font-size: 1.3rem; flex-shrink: 0; }
.geo-block-text strong { font-size: 0.88rem; color: #f87171; font-weight: 600; }
.geo-block-text span { font-size: 0.78rem; color: #9ca3af; line-height: 1.4; }
.geo-block-ip-row { font-size: 0.76rem; color: #6b7280; margin-top: 2px; }
.geo-block-ip {
    font-family: monospace;
    font-size: 0.76rem;
    color: #FFFDE6;
    background: rgba(255,252,0,0.08);
    border: 1px solid rgba(255,252,0,0.25);
    border-radius: 4px;
    padding: 1px 6px;
    cursor: pointer;
    }

.btn-blue-submit.loading {
    opacity: 0.75;
    pointer-events: none;
    position: relative;
}
.btn-blue-submit.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    vertical-align: -3px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.otp-digit.filled {
    border-color: #FFFC00;
    color: #FFFFFF;
    box-shadow: 0 0 14px rgba(255,252,0,0.35);
}
#otp-countdown.urgent {
    color: #ff5c5c;
    font-weight: bold;
}
#otp-error {
    color: #ff5c5c;
    font-weight: bold;
}

/* ============================================================
   POLISH LAYER
   Safe visual upgrades only. No class/ID renames — every hook
   used by app.js (.hidden/.active/.fade-out/.pill-btn/
   .country-pill/.otp-digit/.filled/.loading, op-pill-*) is kept.
   ============================================================ */

::selection { background: rgba(255,252,0,0.85); color: #07070A; }

/* Slim, on-brand scrollbar */
* { scrollbar-width: thin; scrollbar-color: rgba(255,252,0,0.35) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255,252,0,0.55), rgba(255,252,0,0.25));
    border-radius: 9999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Animated hairline that traces the card edge */
.glass-card { position: relative; overflow: hidden; }
.glass-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from 0deg,
        rgba(255,252,0,0) 0deg,
        rgba(255,252,0,0.55) 70deg,
        rgba(255,252,0,0) 150deg,
        rgba(255,252,0,0) 210deg,
        rgba(255,252,0,0.35) 290deg,
        rgba(255,252,0,0) 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask-composite: exclude;
    pointer-events: none;
    opacity: 0.7;
    animation: cardTrace 7s linear infinite;
}
@keyframes cardTrace { to { transform: rotate(360deg); } }

/* Living gradient on the headline */
.snap-main-title { background-size: 200% 200%; animation: titleFlow 6s ease-in-out infinite; }
@keyframes titleFlow {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* Chips & pills: tactile lift + press */
.f-badge, .pill-btn, .country-pill { will-change: transform; }
.f-badge:hover { transform: translateY(-2px); border-color: rgba(255,252,0,0.4); }
.pill-btn:active, .country-pill:active, .btn-blue-submit:active { transform: scale(0.96); }

/* Reward rows breathe + hover */
.reward-item { transition: transform 0.2s ease, border-color 0.2s, background 0.2s; }
.reward-item:hover {
    transform: translateX(3px);
    border-color: rgba(255,252,0,0.35);
    background: rgba(255,252,0,0.05);
}

/* Gentle attention pulse on the live ticker */
.ticker-pill { animation: tickerPulse 3.2s ease-in-out infinite; }
@keyframes tickerPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,252,0,0.0); }
    50%      { box-shadow: 0 0 18px 0 rgba(255,252,0,0.22); }
}

/* Screen enter */
.screen.active { animation: screenIn 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes screenIn {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* Inputs: consistent focus ring */
input:not(.otp-digit):focus, textarea:focus, select:focus {
    outline: none;
    border-color: rgba(255,252,0,0.55) !important;
    box-shadow: 0 0 0 3px rgba(255,252,0,0.14);
}

/* Mobile tightening */
@media (max-width: 420px) {
    body { padding: 10px; }
    .card-header { padding: 22px 18px 12px; }
    .snap-main-title { font-size: 1.85rem; }
    .otp-digit { width: 40px; height: 48px; font-size: 1.2rem; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

.otp-resend-note {
    color: #fbbf24;
    font-weight: bold;
    font-size: 0.85rem;
    margin: 10px 0 0;
}
