:root {
    --primary: #007bff;
    --bg: #f8f9fa;
    --text: #333;
    --card-bg: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
}

body.dark-mode {
    --bg: #1a1a1a;
    --text: #f4f4f4;
    --card-bg: #2d2d2d;
    --shadow: 0 10px 30px rgba(0,0,0,0.5);
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    transition: 0.3s;
    line-height: 1.6;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    z-index: 999;
    padding: 10px 0;
}

.header-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text);
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 8px;
    transition: 0.3s;
}

nav ul li a:hover {
    background: var(--primary);
    color: white;
}

/* Mobile Nav Styles */
.mobile-nav { display: none; }
.mobile-nav select {
    padding: 8px;
    border-radius: 5px;
    background: var(--primary);
    color: white;
    border: none;
}

/* Container & Services */
.container {
    max-width: 1100px;
    margin: 120px auto 50px;
    padding: 0 20px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.service-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: 0.3s ease;
}

.service-box:hover {
    transform: translateY(-10px);
    border: 1px solid var(--primary);
}

.service-box .icon { font-size: 40px; margin-bottom: 15px; }
.service-box a { text-decoration: none; color: inherit; }
.service-box h2 { color: var(--primary); margin-bottom: 10px; }

/* Rules Section (Noob) */
.noob {
    background: var(--card-bg);
    border-radius: 30px;
    padding: 40px;
    margin-top: 50px;
    box-shadow: var(--shadow);
}

.price-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.price-item {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: bold;
}

.discord-btn {
    display: inline-block;
    background: #5865F2;
    color: white;
    padding: 12px 25px;
    border-radius: 10px;
    text-decoration: none;
    margin-top: 20px;
}
.whatsapp-btn {
    display: inline-block;
    background: #58f258;
    color: white;
    padding: 12px 25px;
    border-radius: 10px;
    text-decoration: none;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-nav { display: block; }
    .header-content { padding: 0 15px; }
    .noob { padding: 20px; border-radius: 15px; }
}
/* تنسيقات إضافية للقواعد */
.main-list {
    list-style-type: "📍 ";
    padding-right: 20px;
    margin-bottom: 30px;
}

.main-list li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.rule-block {
    background: rgba(0, 123, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    border-right: 5px solid var(--primary);
}

.rule-block h3 {
    margin-top: 0;
    color: var(--primary);
}

.rule-block ul {
    padding: 0;
}

.rule-block li {
    list-style: none;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.rule-block li::before {
    content: "← ";
    color: var(--primary);
}

.separator {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, transparent, var(--primary), transparent);
    margin: 40px 0;
}

.status-tag {
    background: #ffc107;
    color: #000;
    display: inline-block;
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.9rem;
}

.phone {
    color: var(--primary);
    direction: ltr;
    display: inline-block;
}

.discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: fit-content;
    margin: 20px auto;
}
.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: fit-content;
    margin: 20px auto;
}
.mode-switch {
    display: flex;
    align-items: center;
}

.mode-btn {
    background: var(--primary); /* لون الزرار */
    border: none;
    width: 60px;
    height: 30px;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    padding: 5px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.icon-container {
    position: relative;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    left: 0;
}

/* أخفي الشمس في الوضع الفاتح */
.sun { display: none; font-size: 14px; }
.moon { font-size: 14px; }

/* لما يشتغل الدارك مود */
body.dark-mode .mode-btn {
    background: #444;
}

body.dark-mode .icon-container {
    left: -30px; /* يحرك الدائرة للجنب التاني */
    transform: rotate(360deg);
}

body.dark-mode .moon { display: none; }
body.dark-mode .sun { display: block; }

/* تأثير بسيط عند الهوفر */
.mode-btn:hover {
    transform: scale(1.1);
}
/* --- لمسات رمضان الكريم --- */
:root {
    --ramadan-gold: #d4af37;
    --ramadan-dark: #1a2a6c;
}

body {
    background: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
    background-attachment: fixed;
}

/* إضافة صورة الفوانيس كخلفية */
body::before {
    content: "";
    position: absolute;
    top: 0;
    right: 100px;
    width: 70%;
    height: 70%;
    background: url('img/ramdan.png') no-repeat center center/contain;
    opacity: 0.3;
    pointer-events: none;
    z-index: 99;
}

/* تزيين البطاقات */
.service-box, .rule-block {
    border: 2px solid var(--ramadan-gold) !important;
    background: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3) !important;
}

h2 {
    color: var(--ramadan-dark);
    text-shadow: 1px 1px 2px rgba(212, 175, 55, 0.5);
}

.discord-btn, .whatsapp-btn {
    border-radius: 20px !important;
    border: 1px solid var(--ramadan-gold) !important;
    transition: 0.3s;
}

.discord-btn:hover, .whatsapp-btn:hover {
    background-color: var(--ramadan-gold) !important;
    color: white !important;
}

/* توافق الدارك مود مع الطابع الرمضاني */
body.dark-mode {
    background: #0d1b2a !important;
}

body.dark-mode .service-box, 
body.dark-mode .rule-block {
    background: rgba(39, 59, 97, 0.9) !important;
    border-color: var(--ramadan-gold) !important;
}

/* تعريف حركة التأرجح للفوانيس */
@keyframes swing {
    0% { transform: rotate(5deg); }
    50% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

/* تطبيق الحركة على صورة الفوانيس */
body::before {
    content: "";
    top: 0;
    left: 20px; /* يمكنك تغيير المكان هنا */
    background: url('img/ramdan.png') no-repeat center top/contain;
    z-index: 99;
    pointer-events: none; /* عشان تقدر تضغط على الأزرار اللي تحتها */
    transform-origin: top center;
    animation: swing 3s ease-in-out infinite;
}

.countdown-container {
    text-align: center;
    margin: 30px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #d4af37;
    border-radius: 15px;
    max-width: 600px;
}

#countdown {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.time-box {
    background: #1a2a6c;
    color: #d4af37;
    padding: 10px 15px;
    border-radius: 8px;
    min-width: 60px;
    font-weight: bold;
}

.time-box span {
    display: block;
    font-size: 1.5rem;
}

/* 1. حل مشكلة العداد القص وتمركزه */
.countdown-container {
    text-align: center;
    margin: 20px auto; /* مسافة طبيعية فوق وتحت */
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #d4af37;
    border-radius: 15px;
    max-width: 800px;
    display: block; /* التأكد أنه ليس ثابتًا */
    position: relative;
    z-index: 1;
}

/* 2. حل مشكلة ألوان الدارك مود */
body.dark-mode .countdown-container h2, 
body.dark-mode .countdown-container .time-box {
    color: #fff !important; /* جعل الخط أبيض في الدارك مود */
}

body.dark-mode .time-box {
    background: #000 !important; /* خلفية سوداء للعداد في الدارك مود */
    border: 1px solid #d4af37;
}

/* تعديل عام للنصوص لضمان عدم ظهور أزرق مزعج في الدارك مود */
body.dark-mode h2, 
body.dark-mode p {
    color: #e0e0e0 !important;
}


/* الأنماط الحالية مع تحسين التجاوب */
.countdown-container {
    text-align: center;
    margin: 20px 10px; /* تقليل الهامش الجانبي للشاشات الصغيرة */
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #d4af37;
    border-radius: 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#countdown {
    display: flex;
    justify-content: center;
    gap: 10px; /* تقليل المسافة بين المربعات في الشاشات الصغيرة */
    margin-top: 15px;
    flex-wrap: wrap; /* السماح للمربعات بالنزول لسطر جديد لو ضاقت الشاشة */
}

.time-box {
    background: #1a2a6c;
    color: #d4af37;
    padding: 10px;
    border-radius: 8px;
    min-width: 65px; /* تصغير الحد الأدنى للعرض */
    font-weight: bold;
}

.time-box span {
    display: block;
    font-size: 1.2rem; /* تصغير حجم الخط قليلاً للموبايل */
}

/* التعديلات الخاصة بالهواتف (الشاشات التي عرضها أقل من 480 بكسل) */
@media (max-width: 480px) {
    .countdown-container h2 {
        font-size: 1.1rem; /* تصغير العنوان ليناسب الشاشة */
    }
    
    .time-box {
        min-width: 55px;
        padding: 8px 5px;
    }

    .time-box span {
        font-size: 1rem;
    }
    
    .time-box small {
        font-size: 0.7rem;
    }
}
/* تأثير حركي عند تغيير الأرقام */
.time-box span {
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: block;
    font-size: 1.5rem;
    opacity: 1;
    transform: translateY(0);
}

/* حالة التغيير (يمكنك استدعاء هذا الكلاس عبر الجافاسكريبت) */
.time-box span.changing {
    opacity: 0;
    transform: translateY(-10px);
}