/* ========================================
   TEMU FUNNEL - Official Temu Design
   Clean, white, minimal, professional
   ======================================== */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --temu-orange: #F57C00;
    --temu-orange-hover: #EF6C00;
    --temu-orange-bg: #FFF8F0;
    --temu-orange-soft: #FFE0B2;
    --temu-orange-dark: #E65100;
    --temu-gold: #FFB800;
    --temu-red: #FF4444;
    --temu-green: #4CAF50;
    --bg-white: #FFFFFF;
    --bg-page: #F5F5F5;
    --text-primary: #222222;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #E0E0E0;
    --border-light: #EEEEEE;
    --transition: all 0.25s ease;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--temu-orange); text-decoration: none; }

/* ===== APP CONTAINER ===== */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-white);
    position: relative;
    overflow: hidden;
}

@media (min-width: 481px) {
    body { background: #E8E8E8; }
    .app-container { box-shadow: 0 0 20px rgba(0,0,0,0.08); }
}

/* ===== HEADER (Temu official) ===== */
.temu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon-svg { width: 22px; height: 22px; }

.header-logo { height: 22px; width: auto; }

.header-country-tag {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--border-light);
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2px;
}

.header-user-btn {
    background: var(--temu-orange) !important;
    color: white !important;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    padding: 0 !important;
}

.header-user-btn .header-icon-svg { width: 16px; height: 16px; }

/* Withdraw Header */
.withdraw-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.withdraw-header-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

/* ===== SCREENS & TRANSITIONS ===== */
.screen {
    display: none;
    padding: 0 16px 20px;
    animation-fill-mode: forwards;
}

.screen.active { display: block; }

.slide-out-left { animation: slideOutLeft 0.3s ease forwards; }
.slide-out-right { animation: slideOutRight 0.3s ease forwards; }
.slide-in-right { animation: slideInRight 0.35s ease forwards; }
.slide-in-left { animation: slideInLeft 0.35s ease forwards; }

@keyframes slideOutLeft { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-20px); opacity: 0; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(20px); opacity: 0; } }
@keyframes slideInRight { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInLeft { from { transform: translateX(-20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== SECURITY NOTICE ===== */
.security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    font-size: 0.72rem;
    color: var(--temu-green);
    font-weight: 500;
}

.security-icon { width: 12px; height: 12px; }

/* ===== LIVE BAR ===== */
.live-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-white);
    padding: 8px 14px;
    margin: 0 0 12px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--text-primary);
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--temu-red);
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.live-count {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ===== LANDING HERO ===== */
.landing-hero {
    text-align: center;
    padding: 20px 0 16px;
}

.hero-badge-row { margin-bottom: 12px; }

.hero-badge {
    display: inline-block;
    background: var(--temu-orange);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 50px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    max-width: 340px;
    margin: 0 auto;
}

.hero-subtitle strong { color: var(--temu-orange); text-decoration: underline; }

/* ===== COIN INFO BANNER ===== */
.coin-info-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #FFF8E1, #FFF3E0);
    border: 1px solid #FFE0B2;
    border-radius: 10px;
    padding: 12px 14px;
    margin: 12px 0 16px;
}

.coin-info-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coin-info-text {
    display: flex;
    flex-direction: column;
}

.coin-info-text strong {
    font-size: 0.78rem;
    color: var(--text-primary);
}

.coin-info-text span {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.coin-info-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--temu-orange);
}

/* ===== STEPS SECTION ===== */
.steps-section {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px 16px;
    margin-bottom: 14px;
    background: var(--bg-white);
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
}

.step-item:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.step-number {
    width: 24px;
    height: 24px;
    background: var(--temu-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-connector { display: none; }

.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.step-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== URGENCY SECTION ===== */
.urgency-section {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: var(--bg-white);
}

.timer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.timer-icon { width: 16px; height: 16px; color: var(--temu-red); }

.timer-label-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.timer-countdown {
    display: flex;
    align-items: center;
    gap: 3px;
}

.timer-val {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 32px;
    background: var(--temu-orange);
    color: white;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 6px;
    padding: 0 4px;
}

.timer-val.tick { animation: timerTick 0.3s ease; }
@keyframes timerTick {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.timer-sep {
    font-size: 1rem;
    font-weight: 800;
    color: var(--temu-orange);
    margin: 0 1px;
}

.spots-row { margin-top: 2px; }

.spots-bar {
    height: 3px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.spots-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--temu-orange), var(--temu-red));
    border-radius: 2px;
    transition: width 1s ease;
    width: 53%;
}

.spots-text {
    font-size: 0.75rem;
    color: var(--temu-red);
    font-weight: 500;
    text-align: center;
}

/* ===== REGISTER CARD ===== */
.register-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px 16px;
    margin-bottom: 14px;
    background: var(--bg-white);
    text-align: center;
}

.register-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.register-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.4;
}

.form-group { margin-bottom: 10px; }

.form-input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--temu-orange);
}

.form-input.input-error {
    border-color: var(--temu-red);
}

.form-input::placeholder { color: #BDBDBD; }

.withdraw-field { padding-left: 14px; }

.shake { animation: shake 0.4s ease; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ===== BUTTONS (Temu official style) ===== */
.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-cta {
    background: var(--temu-orange);
    color: white;
    margin-top: 4px;
}

.btn-cta:active { transform: scale(0.98); opacity: 0.9; }

.btn-outline {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: var(--transition);
}

.btn-outline:active { background: var(--bg-page); }

.btn-continue {
    background: var(--temu-orange);
    color: white;
    margin-top: 14px;
}

.btn-continue:disabled {
    background: #E0E0E0;
    color: #AAA;
    cursor: not-allowed;
}

.btn-withdraw-sm {
    background: var(--temu-orange);
    color: white;
    border: none;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-withdraw-main,
.btn-withdraw-proceed,
.btn-link-account,
.btn-confirm-withdraw {
    background: var(--temu-orange);
    color: white;
    margin-top: 16px;
}

.btn-success {
    background: var(--temu-green) !important;
}

.btn-loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.terms-text {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.terms-text a { color: var(--temu-orange); font-weight: 500; }

/* ===== SOCIAL PROOF ===== */
.social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px;
}

.avatars-row { display: flex; }

.avatar-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -4px;
    border: 2px solid white;
}

.avatar-circle:first-child { margin-left: 0; }

.social-proof-text {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.social-proof-text strong { color: var(--text-secondary); }

/* ===== TRUST ROW (Temu official) ===== */
.trust-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 12px 0 8px;
    border-top: 1px solid var(--border-light);
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
}

.trust-icon {
    width: 18px;
    height: 18px;
    color: var(--temu-green);
}

.trust-item span {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 80px;
    line-height: 1.3;
}

/* ===== QUIZ ===== */
.quiz-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.quiz-balance-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #FFF8E1, #FFF3E0);
    border-radius: 50px;
    padding: 5px 12px 5px 6px;
    border: 1px solid #FFE0B2;
}

.coin-icon-anim { animation: coinBounce 2s infinite; }
@keyframes coinBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.quiz-balance-info {
    display: flex;
    flex-direction: column;
}

.quiz-balance-label {
    font-size: 0.58rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-balance-value {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--temu-orange);
    transition: var(--transition);
}

.balance-updated { animation: balancePop 0.5s ease; }
@keyframes balancePop {
    0% { transform: scale(1); }
    30% { transform: scale(1.12); color: var(--temu-green); }
    100% { transform: scale(1); }
}

/* Progress */
.quiz-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.progress-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--temu-orange);
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

.progress-count {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Question */
.quiz-question-area { text-align: center; }

.question-number {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    background: var(--bg-page);
    display: inline-block;
    padding: 3px 12px;
    border-radius: 50px;
}

/* Product Card */
.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 190px;
    background: var(--bg-page);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-badge-best {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--temu-orange);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.product-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.stars {
    color: var(--temu-gold);
    font-size: 0.78rem;
    letter-spacing: 1px;
}

.rating-count {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.question-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Quiz Options */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: var(--transition);
    text-align: left;
}

.quiz-option:active { background: var(--bg-page); }

.quiz-option.selected {
    border-color: var(--temu-orange);
    background: var(--temu-orange-bg);
}

.option-icon-wrap {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-page);
    border-radius: 50%;
    flex-shrink: 0;
}

.opt-icon { width: 16px; height: 16px; }
.opt-heart { color: #FF5252; }
.opt-good { color: var(--temu-orange); }
.opt-avg { color: var(--temu-gold); }
.opt-no { color: var(--text-muted); }

.quiz-option.selected .option-icon-wrap {
    background: rgba(245,124,0,0.1);
}

.option-text { font-weight: 500; }

.quiz-footer-text {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 16px;
    padding-bottom: 8px;
}

/* ===== REWARD POPUP ===== */
.popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.popup-overlay.popup-visible { opacity: 1; }

.popup-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 28px 24px 24px;
    text-align: center;
    max-width: 300px;
    width: 85%;
    position: relative;
    overflow: hidden;
    transform: scale(0.85);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-visible .popup-card { transform: scale(1); }

.popup-confetti {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.popup-icon { margin-bottom: 8px; }

.popup-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.popup-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.popup-amount {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--temu-orange);
    margin-bottom: 2px;
    animation: popIn 0.4s ease 0.2s both;
}

@keyframes popIn {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup-coins-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.btn-popup-continue {
    background: var(--temu-orange);
    color: white;
}

/* ===== RETENTION POPUP (Temu official style) ===== */
.retention-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 28px 24px 24px;
    text-align: center;
    max-width: 340px;
    width: 88%;
    position: relative;
    transform: scale(0.85);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-visible .retention-card { transform: scale(1); }

.retention-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.retention-close:hover {
    background: var(--bg-page);
}

.retention-close svg { width: 16px; height: 16px; }

.retention-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.45;
    padding: 0 20px;
}

.retention-icon-row {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.retention-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 120px;
}

.retention-feat-icon {
    width: 32px;
    height: 32px;
    color: var(--text-primary);
    stroke-width: 1.5;
}

.retention-feat-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.retention-feat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    max-width: 120px;
    line-height: 1.35;
}

.btn-retention-stay {
    background: var(--temu-orange) !important;
    color: white !important;
    margin-bottom: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 14px;
    border-radius: 50px;
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-retention-stay:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-retention-leave {
    background: var(--bg-white) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    margin-bottom: 0;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 13px;
    border-radius: 50px;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-retention-leave:active {
    background: var(--bg-page) !important;
}

/* ===== CONFETTI ===== */
.confetti-piece {
    position: absolute;
    top: -10px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: translateY(350px) rotate(720deg) scale(0.5); opacity: 0; }
}

.confetti-container {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

/* ===== COMPLETE SCREEN (Temu faithful) ===== */
.complete-card {
    text-align: center;
    padding: 20px 0;
    position: relative;
}

.complete-icon {
    margin-bottom: 16px;
    animation: bounceIn 0.5s ease;
}

.complete-trophy { width: 52px; height: 52px; color: var(--temu-gold); }

@keyframes bounceIn {
    0% { transform: scale(0); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.complete-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.complete-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.complete-balance-box {
    background: var(--bg-white);
    border: 2px solid var(--temu-orange);
    border-radius: 14px;
    padding: 24px 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.complete-balance-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--temu-orange), var(--temu-gold), var(--temu-orange));
}

.complete-earned-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.complete-coins-value {
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--temu-orange);
    line-height: 1.15;
}

.complete-coins-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.complete-divider {
    height: 1px;
    background: var(--border-light);
    margin: 14px 0;
}

.complete-equiv-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.complete-euro-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--temu-green);
}

/* Coin badge */
.coin-equiv-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #FFF8E1, #FFE082);
    border-radius: 50px;
    padding: 6px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--temu-orange-dark);
    margin-bottom: 8px;
    border: 1px solid #FFE0B2;
}

.coin-equiv-sm { font-size: 0.65rem; padding: 4px 10px; margin-top: 6px; }

/* Complete info row */
.complete-info-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 16px 0;
    padding: 14px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.complete-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.complete-info-icon {
    width: 20px;
    height: 20px;
    color: var(--temu-green);
}

.complete-info-item span {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 80px;
    text-align: center;
    line-height: 1.3;
}

.expires-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--temu-red);
    font-weight: 500;
    margin-top: 14px;
    animation: blink 2s infinite;
}

.expires-icon { width: 12px; height: 12px; color: var(--temu-red); }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== WITHDRAW SCREENS (Temu faithful) ===== */
.withdraw-card { padding: 16px 0; }

.withdraw-balance-box {
    background: var(--bg-white);
    border: 2px solid var(--temu-orange);
    border-radius: 14px;
    padding: 20px 16px;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
}

.withdraw-balance-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--temu-orange), var(--temu-gold));
    border-radius: 14px 14px 0 0;
}

.withdraw-balance-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.withdraw-balance-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-primary);
}

.withdraw-section-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Amount Grid */
.amount-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.amount-option {
    position: relative;
    padding: 16px 12px;
    background: var(--bg-white);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.amount-option:active {
    transform: scale(0.97);
}

.amount-option.selected {
    border-color: var(--temu-orange);
    background: var(--temu-orange-bg);
    color: var(--temu-orange);
    border-width: 2px;
}

.amount-option.recommended { border-color: var(--temu-orange); }

.amount-badge {
    position: absolute;
    top: -8px;
    right: -4px;
    background: var(--temu-orange);
    color: white;
    font-size: 0.58rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    letter-spacing: 0.3px;
}

/* Methods */
.methods-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.method-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px;
    background: var(--bg-white);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    text-align: left;
}

.method-card:active { 
    background: var(--bg-page); 
    border-color: var(--temu-orange);
}

.method-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.method-lucide { width: 22px; height: 22px; color: white; }

.method-icon-phone { background: var(--temu-orange); }
.method-icon-bank { background: #1A1A1A; }
.method-icon-paypal { background: #003087; }
.method-icon-card { background: var(--temu-orange); }
.method-icon-klarna { background: #FFB3C7; }

.method-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.method-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.method-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.method-arrow {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Withdraw Details & Confirm */
.withdraw-confirm-card {
    padding: 24px 0;
    text-align: center;
}

.withdraw-amount-display {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--temu-orange);
    margin-bottom: 2px;
}

.withdraw-amount-sublabel {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.confirm-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    text-align: left;
    margin-bottom: 12px;
}

.linked-account-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1A1A1A;
    color: white;
    border-radius: 12px;
    padding: 16px;
    text-align: left;
    margin-bottom: 16px;
}

.linked-method-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.linked-method-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.linked-method-info strong { font-size: 0.88rem; }
.linked-method-info span { font-size: 0.72rem; opacity: 0.7; }

.unlink-btn {
    font-size: 0.72rem;
    color: var(--temu-orange) !important;
    text-decoration: underline !important;
}

.fee-note {
    font-size: 0.75rem;
    color: var(--temu-green);
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Withdraw security row */
.withdraw-security-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.withdraw-security-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.withdraw-security-item svg {
    width: 14px;
    height: 14px;
    color: var(--temu-green);
}

/* ===== TOAST (Temu style) ===== */
.toast-container {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
    max-width: 90%;
    width: 360px;
}

.toast-notification {
    background: var(--bg-white);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 2px 16px rgba(0,0,0,0.12);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}

.toast-notification.toast-visible {
    transform: translateY(0);
    opacity: 1;
}

.toast-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--temu-orange);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    line-height: 1.35;
}

.toast-content strong { color: var(--text-primary); }
.toast-amount { color: var(--temu-orange); font-weight: 700; }

.toast-time {
    font-size: 0.6rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ===== FLOATING COINS ===== */
.floating-coin {
    position: fixed;
    z-index: 999;
    pointer-events: none;
    animation: floatCoin 0.8s ease-out forwards;
}

.floating-coin svg { width: 20px; height: 20px; }

@keyframes floatCoin {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-60px) scale(0.5); }
}

/* ===== FOOTER ===== */
.temu-footer {
    text-align: center;
    padding: 20px 16px;
    border-top: 1px solid var(--border-light);
    margin-top: 16px;
}

.temu-footer p {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.footer-links a {
    font-size: 0.65rem;
    color: var(--temu-orange);
}

.footer-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 0.62rem;
    color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
    }
}

::-webkit-scrollbar { width: 0; height: 0; }
::selection { background: var(--temu-orange); color: white; }

/* ===== ACCOUNT CREATED POPUP ===== */
.account-created-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    animation: popupSlideUp 0.3s ease;
}

.account-created-icon {
    margin-bottom: 16px;
}

.account-created-icon svg {
    width: 56px;
    height: 56px;
}

.account-created-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.account-created-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.account-created-progress {
    width: 100%;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.account-created-bar {
    height: 100%;
    background: var(--temu-orange);
    border-radius: 2px;
    animation: progressBar 4s linear forwards;
}

@keyframes progressBar {
    from { width: 0%; }
    to { width: 100%; }
}
