/* ============================================== */
/* 🎉 LOTTERY SECTION v4 - FINAL FIX             */
/* ============================================== */

.lottery-section {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.interactive-lottery-wrapper {
    position: relative;
    padding: 20px;
}

/* ============================================== */
/* 💎 Box اصلی - متن راست، تایمر چپ              */
/* ============================================== */
.glass-lottery-box {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 50px;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 40px;
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
    box-shadow: var(--shadow);
}

.glass-lottery-box:hover {
    transform: scale(1.01);
    box-shadow: 0 20px 50px rgba(230, 0, 0, 0.15);
    border-color: var(--brand-red);
}

/* ── متن سمت راست ── */
.lottery-info {
    flex: 1;
    text-align: right;
    min-width: 0;
}

.lottery-info h2 {
    color: var(--brand-red);
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-weight: 900;
}

.lottery-info p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
    margin: 0;
}

/* ============================================== */
/* ⏰ Timer - چهارتا کنار هم                     */
/* ============================================== */
.glass-timer {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.time-unit {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 14px 16px !important;
    border-radius: 16px;
    text-align: center;
    min-width: 75px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px;
    transition: all 0.3s ease;
}

.time-unit:hover {
    border-color: var(--brand-red);
    transform: translateY(-3px);
}

.time-unit span {
    font-size: 1.8rem !important;
    font-weight: 900 !important;
    color: var(--text-primary) !important;
    line-height: 1 !important;
    display: block !important;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.time-unit span.tick {
    transform: scale(1.15);
    color: var(--brand-red) !important;
}

.time-unit small {
    color: var(--text-secondary) !important;
    font-weight: 700;
    font-size: 0.7rem !important;
    display: block !important;
    margin-top: 0 !important;
}

/* ============================================== */
/* 🏷️ Badge                                      */
/* ============================================== */
.lottery-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(230, 0, 0, 0.08);
    border: 1px solid rgba(230, 0, 0, 0.15);
    color: var(--brand-red);
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 12px;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 0, 0, 0.2); }
    50% { box-shadow: 0 0 0 12px rgba(230, 0, 0, 0); }
}

/* ============================================== */
/* ✨ Float Items                                */
/* ============================================== */
.float-item {
    position: absolute;
    z-index: 3;
    opacity: 0;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.float-item img {
    display: block;
    width: 100%;
    height: auto;
}

.lottery-section.is-visible .float-item {
    opacity: 0.9;
}

.decor-1 { top: -20px; left: 3%; width: 60px; animation: floatA 4s ease-in-out infinite; }
.decor-2 { bottom: -25px; left: 38%; width: 45px; animation: floatB 5s ease-in-out infinite 0.5s; }
.decor-3 { top: -15px; right: 3%; width: 60px; animation: floatC 4.5s ease-in-out infinite 1s; }
.decor-4 { top: 45%; left: -5px; width: 45px; animation: floatA 6s ease-in-out infinite 1.5s; }
.decor-5 { bottom: -10px; right: 8%; width: 45px; animation: floatB 5.5s ease-in-out infinite 2s; }
.decor-6 { top: 20%; right: -5px; width: 38px; animation: floatC 7s ease-in-out infinite 0.8s; }

@keyframes floatA {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    50% { transform: translateY(-20px) rotate(10deg) scale(1.05); }
}

@keyframes floatB {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-25px) rotate(-15deg); }
}

@keyframes floatC {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-8px, -15px) rotate(12deg); }
    66% { transform: translate(5px, -8px) rotate(-8deg); }
}

/* ============================================== */
/* 🎁 بارش آیکون‌ها                              */
/* ============================================== */
.celebration-rain {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.rain-icon {
    position: absolute;
    top: -60px;
    font-size: 1.5rem;
    opacity: 0;
    animation: rainFall linear forwards;
    pointer-events: none;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    will-change: transform, opacity;
}

@keyframes rainFall {
    0% { opacity: 0; transform: translateY(0) rotate(0deg); }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(500px) rotate(360deg); }
}

/* ============================================== */
/* ✨ Celebration                                 */
/* ============================================== */
.lottery-section.celebration-active .glass-lottery-box {
    border-color: var(--brand-red) !important;
    box-shadow: 
        0 0 30px rgba(230, 0, 0, 0.15),
        0 0 60px rgba(230, 0, 0, 0.08),
        0 20px 50px rgba(230, 0, 0, 0.12) !important;
    animation: celebrationGlow 1.5s ease-in-out 3;
}

@keyframes celebrationGlow {
    0%, 100% { 
        box-shadow: 
            0 0 30px rgba(230, 0, 0, 0.15),
            0 20px 50px rgba(230, 0, 0, 0.12);
    }
    50% { 
        box-shadow: 
            0 0 50px rgba(230, 0, 0, 0.3),
            0 0 80px rgba(230, 0, 0, 0.15);
    }
}

.lottery-section.celebration-active .float-item {
    opacity: 1 !important;
}

/* ============================================== */
/* 📱 تبلت (≤992px) - عمودی فشرده               */
/* ============================================== */
@media (max-width: 992px) {
    .lottery-section {
        padding: 60px 0;
    }
    
    .glass-lottery-box {
        flex-direction: column !important;
        text-align: center;
        padding: 35px 30px;
        gap: 25px;
    }
    
    .lottery-info {
        text-align: center;
    }
    
    .lottery-info h2 {
        font-size: 1.5rem;
    }
    
    .lottery-info p {
        font-size: 0.95rem;
    }
    
    .glass-timer {
        justify-content: center;
        gap: 10px;
    }
    
    .time-unit {
        min-width: 70px;
        padding: 12px 14px !important;
    }
    
    .time-unit span {
        font-size: 1.6rem !important;
    }
}

/* ============================================== */
/* 📱 موبایل (≤768px) - فشرده‌تر                 */
/* ============================================== */
@media (max-width: 768px) {
    .lottery-section {
        padding: 40px 15px;
    }
    
    .interactive-lottery-wrapper {
        padding: 10px;
    }
    
    .glass-lottery-box {
        padding: 30px 20px;
        gap: 20px;
        border-radius: 24px;
    }
    
    .lottery-badge {
        font-size: 0.75rem;
        padding: 5px 13px;
    }
    
    .lottery-info h2 {
        font-size: 1.3rem;
    }
    
    .lottery-info p {
        font-size: 0.88rem;
    }
    
    .glass-timer {
        gap: 6px;
        width: 100%;
        justify-content: space-between;
    }
    
    .time-unit {
        min-width: 0 !important;
        flex: 1;
        padding: 10px 4px !important;
        border-radius: 12px;
    }
    
    .time-unit span {
        font-size: 1.3rem !important;
    }
    
    .time-unit small {
        font-size: 0.62rem !important;
    }
    
    .decor-4, .decor-6 {
        display: none;
    }
    
    .decor-1, .decor-3 {
        width: 42px;
    }
    
    .decor-2, .decor-5 {
        width: 35px;
    }
    
    .rain-icon {
        font-size: 1.2rem;
    }
}

/* ============================================== */
/* 📱 موبایل کوچک (≤480px)                       */
/* ============================================== */
@media (max-width: 480px) {
    .lottery-section {
        padding: 30px 10px;
    }
    
    .glass-lottery-box {
        padding: 22px 14px;
        border-radius: 20px;
    }
    
    .lottery-info h2 {
        font-size: 1.15rem;
    }
    
    .lottery-info p {
        font-size: 0.82rem;
    }
    
    .time-unit {
        padding: 8px 2px !important;
    }
    
    .time-unit span {
        font-size: 1.1rem !important;
    }
    
    .time-unit small {
        font-size: 0.58rem !important;
    }
    
    .glass-timer {
        gap: 4px;
    }
    
    .decor-1, .decor-3 {
        width: 35px;
    }
    
    .decor-2, .decor-5 {
        display: none;
    }
}