
:root {
    --primary-color: #E31837;
    --secondary-color: #C41230;
    --accent-color: #FFD700;
    --bg-color: #000000;
    --font-family: 'Tajawal', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-family); -webkit-tap-highlight-color: transparent; }
body { 
    background-color: var(--bg-color); 
    min-height: 100vh; 
    overflow-x: hidden; 
}
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('assets/bg-mobile.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: -1;
    pointer-events: none;
}

.app-container { max-width: 430px; margin: 0 auto; background: transparent; min-height: 100vh; position: relative; overflow: hidden; }
.header { background: transparent; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: none; }
.lang-switch { color: white; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.globe-icon { width: 20px; height: 20px; border: 2px solid white; border-radius: 50%; }
.logo { height: 70px; width: auto; }
.menu-btn { width: 30px; height: 24px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; }
.menu-btn span { height: 3px; background: white; border-radius: 2px; width: 100%; }
.menu-btn span:nth-child(2) { width: 80%; }

.page { display: none; min-height: calc(100vh - 120px); padding-bottom: 80px; }
.page.active { display: block; animation: slideIn 0.4s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* Landing */
.landing-content { padding: 20px; text-align: center; position: relative; }
.confetti { position: fixed; width: 10px; height: 10px; border-radius: 50%; animation: confetti-fall 4s linear infinite; z-index: 1; pointer-events: none; }
@keyframes confetti-fall { 0% { transform: translateY(-100px) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } }
.campaign-badge { width: calc(100% + 40px); max-width: none; border-radius: 0; display: block; margin: -20px -20px 25px -20px; box-shadow: none; position: relative; z-index: 2; border: none; }
.slogan { color: white; font-size: 22px; font-weight: 800; margin: 20px 0; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); position: relative; z-index: 2; }

/* Prizes Marquee */
.prizes-section { margin: 30px 0; position: relative; z-index: 2; overflow: hidden; }
.prizes-container { display: flex; gap: 15px; margin: 20px 0; width: max-content; animation: marquee 20s linear infinite; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(var(--marquee-end, 50%)); } }
.prize-item { background: black; border-radius: 20px; padding: 15px; width: 140px; flex-shrink: 0; box-shadow: 0 15px 35px rgba(0,0,0,0.3); transform: rotate(-2deg); border: 2px solid var(--accent-color); }
.prize-item:nth-child(even) { transform: rotate(2deg); margin-top: 10px; }
.prize-img { width: 100%; height: 110px; background: transparent; border-radius: 15px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 5px; }
.prize-img img { width: 100%; height: 100%; object-fit: contain; }
.prize-label { background: var(--primary-color); color: white; padding: 8px 15px; border-radius: 25px; font-size: 11px; font-weight: 800; margin-top: 10px; display: inline-block; white-space: normal; line-height: 1.4; }

/* Buttons */
.cta-button { background: var(--accent-color); color: var(--secondary-color); border: 3px solid white; padding: 20px 80px; font-size: 24px; font-weight: 900; border-radius: 15px; cursor: pointer; margin: 30px 0; box-shadow: 0 10px 30px rgba(0,0,0,0.3); transition: all 0.2s; position: relative; z-index: 10; display: inline-block; text-decoration: none; }
.cta-button:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 40px rgba(0,0,0,0.4); }
.cta-button:active { transform: translateY(0) scale(0.98); }
.submit-btn { background: var(--primary-color); color: white; border: none; padding: 18px; font-size: 20px; font-weight: 900; border-radius: 15px; cursor: pointer; width: 100%; margin-top: 20px; box-shadow: 0 8px 25px rgba(227,24,55,0.4); transition: all 0.2s; position: relative; z-index: 10; }
.submit-btn:hover { background: var(--secondary-color); }
.verify-btn { background: var(--accent-color); color: var(--secondary-color); border: 2px solid white; padding: 18px 60px; font-size: 20px; font-weight: 900; border-radius: 15px; cursor: pointer; margin-top: 25px; box-shadow: 0 8px 25px rgba(0,0,0,0.3); transition: all 0.2s; }
.verify-btn:hover { background: #FFC700; }

/* Form */
.form-content { padding: 20px; }
.form-container { background: white; border-radius: 25px; padding: 30px 25px; box-shadow: 0 15px 50px rgba(0,0,0,0.3); }
.form-title { background: var(--primary-color); color: white; padding: 20px; text-align: center; font-size: 26px; font-weight: 900; margin: -30px -25px 30px -25px; border-radius: 25px 25px 0 0; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; color: var(--primary-color); font-weight: 800; margin-bottom: 8px; font-size: 15px; }
.form-group input, .form-group select { width: 100%; padding: 16px; border: 2.5px solid var(--primary-color); border-radius: 12px; font-size: 16px; background: #FFF8DC; color: #333; font-weight: 600; appearance: none; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent-color); background: white; box-shadow: 0 0 10px rgba(255,215,0,0.3); }
.phone-input { display: flex; gap: 10px; }
.phone-prefix { background: var(--primary-color); color: white; padding: 16px; border-radius: 12px; font-weight: 800; min-width: 85px; text-align: center; display: flex; align-items: center; justify-content: center; }
.checkbox-group { display: flex; align-items: flex-start; gap: 12px; margin: 18px 0; }
.checkbox-group input { width: 22px; height: 22px; accent-color: var(--primary-color); margin-top: 2px; flex-shrink: 0; }
.checkbox-group label { font-size: 14px; color: #555; line-height: 1.5; }

/* RTL/LTR Adjustments */
html[dir="rtl"] .form-group { text-align: right; }
html[dir="ltr"] .form-group { text-align: left; }
html[dir="rtl"] .checkbox-group { text-align: right; }
html[dir="ltr"] .checkbox-group { text-align: left; }
html[dir="rtl"] .form-group input, html[dir="rtl"] .form-group select { text-align: right; }
html[dir="ltr"] .form-group input, html[dir="ltr"] .form-group select { text-align: left; }

/* OTP */
.otp-content { padding: 50px 25px; text-align: center; }
.lock-icon { font-size: 90px; margin-bottom: 25px; display: block; }
.otp-title { color: white; font-size: 28px; font-weight: 900; margin-bottom: 20px; }
.otp-desc { color: rgba(255,255,255,0.8); font-size: 16px; margin-bottom: 20px; line-height: 1.7; }
.phone-display { color: var(--accent-color); font-weight: 800; font-size: 18px; margin: 15px 0; padding: 12px 25px; background: rgba(255,215,0,0.15); border-radius: 12px; display: inline-block; border: 2px solid var(--accent-color); }
.otp-inputs { display: flex; justify-content: center; gap: 15px; margin: 40px 0; }
.otp-input { width: 60px; height: 70px; border: 3px solid var(--accent-color); border-radius: 15px; text-align: center; font-size: 32px; font-weight: 900; color: var(--secondary-color); background: white; -webkit-appearance: none; }
.otp-input:focus { outline: none; border-color: white; transform: scale(1.1); box-shadow: 0 5px 20px rgba(255,255,255,0.3); }

/* Success */
.success-content { padding: 40px 25px; text-align: center; position: relative; }
.success-title { color: var(--accent-color); font-size: 50px; font-weight: 900; margin-bottom: 15px; text-shadow: 2px 2px 6px rgba(0,0,0,0.4); animation: bounce 1.5s ease infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
.success-subtitle { color: white; font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.final-prize { background: white; border-radius: 25px; padding: 30px 20px; margin: 25px 0; box-shadow: 0 15px 40px rgba(0,0,0,0.3); border: 4px solid var(--accent-color); }
.final-prize-icon { font-size: 90px; margin-bottom: 15px; }
.final-prize-text { color: var(--secondary-color); font-size: 20px; font-weight: 900; line-height: 1.6; }

/* Utilities */
.pulse { animation: pulse 2s ease infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.cone-decoration { position: absolute; font-size: 40px; opacity: 0.3; z-index: 0; animation: float 3s ease infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-20px) rotate(10deg); } }

/* Footer Powered By */
.powered-by { text-align: center; padding: 20px; color: rgba(255, 255, 255, 0.7); font-size: 14px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; }
.powered-by img { height: 24px; width: auto; opacity: 0.9; transition: opacity 0.2s; }
.powered-by a:hover img { opacity: 1; }
@media (max-width: 430px) { .app-container { max-width: 100%; } }

/* Error States */
.error-border {
    border-color: red !important;
    animation: shake 0.4s;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

@media (max-width: 768px) {
    body {
        background: url('assets/bg-mobile.png') center/cover no-repeat fixed var(--bg-color);
    }
}


/* Terms Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}
.modal-content.terms-content {
    background: #111;
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    padding: 25px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    color: white;
    text-align: center;
}
.terms-text {
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.6;
    text-align: right;
    direction: rtl;
    color: #ccc;
}
