:root {
    /* ألوان أساسية */
    --primary-color: #3f51b5;
    --secondary-color: #f57c00;

    /* الوضع الفاتح */
    --bg-light: #f5f7fa;
    --card-light: linear-gradient(145deg, #ffffff, #f0f2f5);
    --text-light: #333;
    --border-light: #e0e6ed;
    --value-light: #2c3e50;
    --shadow-light: 0 8px 24px rgba(0,0,0,0.08);

    /* الوضع الداكن */
    --bg-dark: #1f2733;
    --card-dark: linear-gradient(145deg, #2c394a, #1f2733);
    --text-dark: #e0e0e0;
    --border-dark: #4d5d6c;
    --value-dark: #dbe9ff;
    --shadow-dark: 0 10px 30px rgba(0,0,0,0.4);

    /* ألوان أقسام */
    --section-colors: 
        #28a745, #007bff, #6c757d,
        #dc3545, #17a2b8, #ffc107, #6610f2;
}

/* إعادة تعيين */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-light) url('https://www.transparenttextures.com/patterns/white-wall-3.png');
    color: var(--text-light);
    padding: 25px 15px;
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    transition: background 0.5s ease, color 0.5s ease;
}

/* الحاوية */
.container {
    max-width: 750px;
    margin: auto;
}

/* العنوان */
h1 {
    text-align: center;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 36px;
    margin-bottom: 15px;
    animation: fadeInDown 0.8s ease;
}

/* الوصف */
.description {
    text-align: center;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto 40px;
    font-size: 16px;
    line-height: 1.8;
    animation: fadeInUp 0.9s ease;
}

/* عناوين الأقسام */
.section-title {
    font-size: 24px;
    font-weight: 700;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid currentColor;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(63,81,181,0.05));
    border-radius: 8px;
    padding: 8px;
    animation: slideInRight 0.8s ease;
    transition: transform 0.3s ease;
}
.section-title:hover { transform: translateX(-5px); }
.section-title i { transition: transform 0.3s ease; }
.section-title:hover i { transform: scale(1.1); }

/* ألوان الأقسام */
.section-title:nth-of-type(1) { color: #28a745; }
.section-title:nth-of-type(2) { color: #007bff; }
.section-title:nth-of-type(3) { color: #6c757d; }
.section-title:nth-of-type(4) { color: #dc3545; }
.section-title:nth-of-type(5) { color: #17a2b8; }
.section-title:nth-of-type(6) { color: #ffc107; }
.section-title:nth-of-type(7) { color: #6610f2; }

/* البطاقات */
.card {
    background: var(--card-light);
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
    padding: 25px;
    margin-bottom: 25px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInCard 0.8s ease forwards;
}
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* صفوف الأسعار */
.price-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    transition: background 0.3s ease, transform 0.3s ease;
}
.price-row:last-child { border-bottom: none; }
.price-row:hover {
    background: rgba(63,81,181,0.05);
    transform: translateX(8px);
}

.label {
    font-weight: 600;
    font-size: 18px;
}
.value {
    font-weight: 800;
    font-size: 22px;
    min-width: 110px;
    text-align: left;
    direction: ltr;
    color: var(--value-light);
}

/* زر الوضع الليلي */
.theme-toggle {
    position: fixed;
    top: 30px;
    left: 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: background 0.3s ease, transform 0.3s ease;
}
.theme-toggle:hover {
    transform: scale(1.15) rotate(360deg);
    background: var(--secondary-color);
}

/* الوضع الليلي */
body.dark-mode {
    background: var(--bg-dark) url('https://www.transparenttextures.com/patterns/asfalt-light.png');
    color: var(--text-dark);
}
body.dark-mode .card {
    background: var(--card-dark);
    border: 1px solid var(--border-dark);
    box-shadow: var(--shadow-dark);
}
body.dark-mode .label { color: var(--text-dark); }
body.dark-mode .value { color: var(--value-dark); }
body.dark-mode .price-row { border-bottom: 1px solid rgba(255,255,255,0.1); }
body.dark-mode .price-row:hover { background: rgba(142,202,230,0.1); }
body.dark-mode .theme-toggle {
    background: #8ecae6;
}
body.dark-mode .theme-toggle:hover {
    background: var(--secondary-color);
}

/* الفوتر */
.footer {
    text-align: center;
    margin-top: 40px;
    font-size: 15px;
    color: #a0a0a0;
    padding-bottom: 20px;
}

/* استجابة */
@media (max-width: 600px) {
    body { padding: 15px; }
    h1 { font-size: 28px; }
    .description { font-size: 14px; margin-bottom: 30px; }
    .section-title { font-size: 20px; }
    .label { font-size: 16px; }
    .value { font-size: 20px; min-width: 80px; }
    .card { padding: 20px; border-radius: 16px; }
    .theme-toggle { top: 20px; left: 20px; padding: 14px; font-size: 20px; }
}

/* حركات */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInCard {
    to { opacity: 1; transform: translateY(0); }
}
