:root {
    --bg-dark: #0f172a; --card-bg: #ffffff; --primary-green: #007f30; --cta-green: #00b853; --progress-green: #2ecc71; --ad-green: #3bc45e; --btn-red: #d62238; --error-red: #ff3b30; --border-gray: #eee; --badge-yellow: #fff3cd; --badge-text: #856404;
    --rim-color: #d62238; --bg-center: #b83b16; --bg-edge: #690808; --neon-gold: #ffcc00; --bulb-off: #b38f00; --bulb-on: #ffff00; --bulb-glow: #ffcc00;
}
* { box-sizing: border-box; outline: none; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-dark); margin: 0; padding: 20px 10px; min-height: 100vh; display: flex; justify-content: center; align-items: center; font-family: 'Vazirmatn FD NL', sans-serif; }
.mini-app-card { background-color: var(--card-bg); width: 100%; max-width: 400px; border-radius: 35px; padding: 0 0 0 0; box-shadow: 0 20px 50px rgba(0,0,0,0.5); position: relative; display: flex; flex-direction: column; align-items: center; overflow: hidden; min-height: 520px; transition: all 0.3s ease; }

.hero-header {
    position: relative; width: 100%; height: 180px;
    background: radial-gradient(120% 150% at 50% 10%, #3a3275 0%, #201b40 40%, #0d0b1a 100%);
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    overflow: hidden; border-radius:35px; box-shadow: 0 10px 30px rgba(10, 5, 30, 0.4); margin-bottom: 20px; margin-top:20px; isolation: isolate;
}
.hero-header::after {
    content: ""; position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.3'/%3E%3C/svg%3E");
    opacity: 0.5; pointer-events: none; z-index: 1; mix-blend-mode: overlay;
}
.glow-overlay { position: absolute; top: -50%; left: 50%; transform: translateX(-50%); width: 80%; height: 100%; background: radial-gradient(ellipse at center, rgba(120, 120, 255, 0.15) 0%, transparent 70%); z-index: 0; filter: blur(80px); pointer-events: none; }
.content-wrapper { position: relative; z-index: 10; padding: 10px; display: flex; flex-direction: column; align-items: center; width: 100%; }

h1.main-title {
    font-family: 'Vazirmatn FD NL', sans-serif; font-weight: 900; font-size: 26px; margin: 0; line-height: 1.2;
    color: #ffffff; position: relative; white-space: nowrap; letter-spacing: -1px;
    text-shadow: 0 0 2px rgba(255, 255, 255, 1), 0 0 15px rgba(255, 255, 255, 0.6);
}
h1.main-title::before {
    content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    color: rgba(255,255,255,0); background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.9) 45%, rgba(255,255,255,0.9) 55%, transparent 70%);
    background-size: 200% 100%; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: shine-pass 6s infinite linear; pointer-events: none; mix-blend-mode: overlay;
}
@keyframes shine-pass { 0%, 80% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.subtitle {
    font-family: 'Vazirmatn FD NL', sans-serif; font-weight: 900; font-size: 13px; margin-top: 15px;
    color: #ffd700; background: rgba(255, 255, 255, 0.03); padding: 8px 20px; border-radius: 50px;
    border: 1px solid rgba(255, 215, 0, 0.3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2); width: auto; max-width: 90%;
    animation: fade-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.3s;
}
@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.confetti-container { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; perspective: 800px; }
.confetti { position: absolute; top: -20px; width: 10px; height: 10px; background-color: #fff; opacity: 0; animation: fall var(--duration) linear infinite; animation-delay: var(--delay); left: var(--pos-x); border-radius: var(--radius); background-color: var(--color); transform-style: preserve-3d; }
@keyframes fall { 0% { opacity: 0; transform: translate3d(0, -10px, 0) rotateX(0) rotateY(0) scale(var(--scale)); } 10% { opacity: 1; } 100% { opacity: 0; transform: translate3d(var(--sway), 400px, 0) rotateX(360deg) rotateY(720deg) scale(var(--scale)); } }

#login-stage { width: 100%; display: flex; flex-direction: column; align-items: center; padding: 0 20px; }
.label { color: #444; font-weight: 700; font-size: 0.95rem; margin-bottom: 15px; display: block; text-align: center; margin-top: 20px; }
.input-box { position: relative; margin-bottom: 5px; width: 100%; }
input { width: 100%; padding: 14px; border: 2px solid #eee; background: #fafafa; border-radius: 12px; font-family: 'Vazirmatn FD NL', sans-serif; font-size: 1.2rem; text-align: center; color: #333; transition: 0.3s; }
input:focus { border-color: var(--primary-green); background: #fff; }

.input-error input { border-color: var(--error-red) !important; background-color: #fff5f5 !important; animation: shake 0.5s; }
.error-message { color: var(--error-red); font-size: 0.8rem; margin-top: 5px; margin-bottom: 5px; min-height: 20px; font-weight: bold; text-align: center; width: 100%; display: block; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }

.otp-wrapper { display: none; justify-content: space-between; direction: ltr; gap: 8px; margin-bottom: 10px; width: 100%; }
.otp-cell { width: 100%; height: 50px; font-weight: bold; color: var(--primary-green); }

#timer-box { display: none; margin-bottom: 20px; text-align: center; color: #666; font-size: 0.9rem; }
#btn-resend { display: none; color: var(--primary-green); cursor: pointer; text-decoration: underline; font-size: 0.9rem; margin-bottom: 20px; text-align: center; width: 100%; }

.btn-main { width: 100%; background-color: var(--btn-red); color: white; border: none; padding: 14px; border-radius: 12px; font-size: 1.1rem; font-weight: 800; cursor: pointer; box-shadow: 0 8px 20px rgba(214, 34, 56, 0.25); display: flex; align-items: center; justify-content: center; gap: 10px; font-family: 'Vazirmatn FD NL'; margin-bottom: 20px; }

#msg-welcome { display: none; color: var(--primary-green); font-weight: 800; font-size: 1.1rem; margin-bottom: 20px; opacity: 0; text-align: center; margin-top: 20px; }
#box-name { display: none; margin-bottom: 20px; margin-top: 20px; }

.accordion { margin-top: 10px; border-top: 1px solid #f0f0f0; padding-top: 5px; width: 100%; }
.acc-btn { background: none; border: none; width: 100%; display: flex; justify-content: space-between; align-items: center; color: #888; cursor: pointer; padding: 10px 0; font-family: 'Vazirmatn FD NL'; font-size: 0.9rem; font-weight: bold; }
.acc-body { height: 0; overflow: hidden; text-align: right; font-size: 0.8rem; color: #555; line-height: 1.8; }

.sign-container {
    position: relative; width: 100%; padding: 16px; 
    background-color: var(--rim-color); border-radius: 40px; 
    box-shadow: 0 0 20px rgba(214, 34, 56, 0.4), inset 0 0 10px rgba(0,0,0,0.3); 
    display: flex; justify-content: center; align-items: center; 
    margin-top: 20px; margin-bottom: 20px; z-index: 10;
}
.screen {
    background: radial-gradient(circle at center, var(--bg-center) 10%, var(--bg-edge) 90%);
    width: 100%; height: 100%; min-height: 110px; border-radius: 28px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    position: relative; border: 1px solid rgba(0,0,0,0.2); overflow: hidden;
    background-image: radial-gradient(circle at center, var(--bg-center) 0%, var(--bg-edge) 100%), repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(0,0,0,0.1) 20px, rgba(0,0,0,0.1) 40px); background-blend-mode: multiply;
}
.price-wrapper { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 5px; }
@keyframes neon-flicker-gold { 0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; text-shadow: 0 0 10px var(--neon-gold), 0 0 20px var(--neon-gold); } 20%, 24%, 55% { opacity: 0.5; text-shadow: none; } }
.neon-base { font-family: 'Vazirmatn FD NL', sans-serif; font-weight: 900; line-height: 1; z-index: 1; white-space: nowrap; }
.neon-gold { color: var(--neon-gold); animation: neon-flicker-gold 3s infinite alternate; }
.static-3d { font-family: 'Vazirmatn FD NL', sans-serif; font-weight: 900; color: #e0e0e0; z-index: 2; white-space: nowrap; text-shadow: 1px 1px 0 #555, 2px 2px 0 #444, 3px 3px 0 #333; }
.amount { font-size: 45px; letter-spacing: -1px; margin: 0 5px; }
.currency { font-size: 18px; transform: rotate(-10deg) translateY(3px); margin-right: 5px; }
.sub-text { font-size: 20px; margin-top: 0px; z-index: 2; }
.bulb { position: absolute; width: 10px; height: 10px; background-color: var(--bulb-off); border-radius: 50%; box-shadow: inset 1px 1px 2px rgba(0,0,0,0.5); z-index: 10; transform: translate(-50%, -50%); }
.bulb.on { background-color: var(--bulb-on); box-shadow: 0 0 10px #fff, 0 0 20px var(--bulb-glow), 0 0 40px var(--bulb-glow), 0 0 80px var(--bulb-glow); z-index: 11; }

#quiz-stage { display: none; padding: 20px; width: 100%; }
.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; width: 100%; }
.step-badge { background-color: #f0f0f0; color: #555; font-size: 0.8rem; font-weight: 700; padding: 5px 12px; border-radius: 20px; }
.back-icon { color: #aaa; cursor: pointer; padding: 5px; }
.progress-container { width: 100%; height: 6px; background-color: #f0f0f0; border-radius: 10px; margin-bottom: 30px; overflow: hidden; direction: rtl; }
.progress-bar { height: 100%; background-color: var(--progress-green); width: 0%; border-radius: 10px; transition: width 0.5s ease-out; }
.question-text { color: #111; font-size: 1.2rem; font-weight: 900; text-align: right; line-height: 1.6; margin-bottom: 25px; min-height: 60px; width: 100%; }
.options-list { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.option-card { display: flex; align-items: center; justify-content: flex-start; background: #fff; border: 2px solid var(--border-gray); border-radius: 18px; padding: 15px; cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden; }
.option-card:active { transform: scale(0.98); background-color: #f9f9f9; }
.option-card.selected { border-color: var(--primary-green); background-color: #f0fff4; }
.radio-circle { width: 24px; height: 24px; border: 2px solid #ccc; border-radius: 50%; margin-left: 12px; flex-shrink: 0; position: relative; }
.option-card.selected .radio-circle { border-color: var(--primary-green); }
.option-card.selected .radio-circle::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 12px; height: 12px; background-color: var(--primary-green); border-radius: 50%; animation: popIn 0.3s; }
.option-text { font-size: 0.95rem; color: #444; font-weight: 700; text-align: right; width: 100%; }
.fade-element { opacity: 0; transform: translateY(20px); }

#result-stage { display: none; width: 100%; flex-direction: column; align-items: center; background: #f5f5f7; }
.result-image-header { width: 100%; height: 280px; background-size: cover; background-position: center top; position: relative; transform-origin: center top; opacity: 0; transform: scale(1.1); overflow: hidden; }
.result-image-header video { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.result-image-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 80px; background: linear-gradient(to top, rgba(0,0,0,0.1), transparent); pointer-events: none; }

.result-content-body { 
    background-color: #fff; width: 100%; 
    border-radius: 35px 35px 0 0; 
    margin-top: -40px; position: relative; z-index: 5; 
    padding: 30px 25px 0 25px; 
    display: flex; flex-direction: column; align-items: center; text-align: center; 
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05); 
}
.skeleton-wrapper { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 15px; margin-bottom: 25px; }
.skeleton-text { background: #eee; border-radius: 8px; width: 150px; height: 35px; position: relative; overflow: hidden; }
.skeleton-badges { display: flex; gap: 10px; }
.skeleton-badge { background: #eee; border-radius: 20px; width: 80px; height: 25px; position: relative; overflow: hidden; }
.skeleton-text::after, .skeleton-badge::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent); transform: translateX(-100%); animation: shimmer 1.5s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.real-result-header { display: none; flex-direction: column; align-items: center; width: 100%; opacity: 0; }
.result-title { color: #1a1a2e; font-size: 2rem; font-weight: 900; margin: 0; }
.badges-container { display: flex; gap: 10px; margin: 15px 0 25px 0; }
.badge { background-color: var(--badge-yellow); color: var(--badge-text); font-size: 0.85rem; font-weight: 700; padding: 6px 15px; border-radius: 20px; }
.result-desc { font-size: 0.95rem; color: #444; line-height: 1.8; text-align: justify; margin-bottom: 25px; background-color: #f9f9f9; padding: 20px; border-radius: 20px; min-height: 150px; position: relative; }
.typing-cursor::after { content: '|'; animation: blink 1s infinite; color: var(--primary-green); font-weight: bold;animation: softPulse 1.4s ease-in-out infinite;}
@keyframes softPulse {
    0%   { opacity: 0.2; }
    50%  { opacity: 1; }
    100% { opacity: 0.2; }
}
.btn-buy { width: 100%; background-color: var(--cta-green); color: white; border: none; padding: 16px; border-radius: 15px; font-family: 'Vazirmatn FD NL', sans-serif; font-size: 1.1rem; font-weight: 800; cursor: pointer; box-shadow: 0 10px 25px rgba(0, 184, 83, 0.3); display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; text-decoration: none; }
.btn-share { background: none; border: none; color: #888; font-family: 'Vazirmatn FD NL', sans-serif; font-size: 0.9rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px; margin-bottom: 20px; }
.btn-restart { color: #ccc; font-size: 0.8rem; text-decoration: none; margin-bottom: 20px; cursor: pointer; }
.banner-ad-container { width: 100%; margin-top: 0; overflow: hidden; border-radius: 0; background-color: #fff; }
.banner-ad-container img { width: 100%; height: auto; display: block; border-radius: 0 0 35px 35px; } 
.static-prize-banner {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 0 10px; 
}

.static-prize-banner img {
    width: 100%;
    height: auto;
    border-radius: 35px; 
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.static-prize-banner img:hover {
    transform: scale(1.02);
}