/**
 * ============================================
 * Prayer Times PRO - Complete CSS System
 * نظام التصميم الكامل مع Dark Mode
 * ============================================
 */

/* ============================================
   CSS Variables - المتغيرات
   ============================================ */
:root {
    /* Light Theme Colors */
    --primary-emerald: #047857;
    --dark-emerald: #065f46;
    --primary-gold: #D4AF37;
    --dark-gold: #B8860B;
    --primary-navy: #1e3a5f;
    --light-navy: #2d5a8f;
    --cream: #FFF8DC;
    --white: #ffffff;
    --light-bg: #f8fafc;
    --light-surface: #ffffff;
    --light-text: #1e293b;
    --light-text-secondary: #64748b;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 10px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-xl: 25px;
    
    /* Spacing */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 30px;
    --space-xl: 40px;
}

/* ============================================
   Dark Theme
   ============================================ */
[data-theme="dark"] {
    --light-bg: #0f172a;
    --light-surface: #1e293b;
    --light-text: #f1f5f9;
    --light-text-secondary: #94a3b8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Alternative Themes */
[data-theme="ocean"] {
    --primary-emerald: #0891b2;
    --dark-emerald: #0e7490;
    --primary-gold: #fbbf24;
    --dark-gold: #f59e0b;
}

[data-theme="rose"] {
    --primary-emerald: #e11d48;
    --dark-emerald: #be123c;
    --primary-gold: #fb923c;
    --dark-gold: #f97316;
}

[data-theme="purple"] {
    --primary-emerald: #7c3aed;
    --dark-emerald: #6d28d9;
    --primary-gold: #a78bfa;
    --dark-gold: #8b5cf6;
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--light-bg);
    min-height: 100vh;
    color: var(--light-text);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    transition: background-color var(--transition-normal);
}

/* ============================================
   Background Pattern
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 35px,
            rgba(212, 175, 55, 0.03) 35px,
            rgba(212, 175, 55, 0.03) 70px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 35px,
            rgba(212, 175, 55, 0.03) 35px,
            rgba(212, 175, 55, 0.03) 70px
        );
    z-index: 0;
    pointer-events: none;
}

[data-theme="dark"] body::before {
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 35px,
            rgba(212, 175, 55, 0.01) 35px,
            rgba(212, 175, 55, 0.01) 70px
        );
}

/* ============================================
   Mosque Background Slideshow
   ============================================ */
.mosque-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.15;
}

[data-theme="dark"] .mosque-bg {
    opacity: 0.08;
}

.mosque-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.mosque-slide.active {
    opacity: 1;
}

/* ============================================
   Container
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-md);
    position: relative;
    z-index: 2;
}

/* ============================================
   Header
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--primary-navy), var(--primary-emerald));
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    border: 3px solid var(--primary-gold);
}

.header::before {
    content: '☪';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 200px;
    opacity: 0.1;
    color: var(--primary-gold);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    position: relative;
    z-index: 2;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.5);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-text h1 {
    font-family: 'Amiri', serif;
    font-size: 2.5rem;
    color: var(--primary-gold);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.logo-text p {
    font-size: 1.1rem;
    color: var(--cream);
    font-family: 'Scheherazade New', serif;
}

/* ============================================
   Theme Switcher (NEW)
   ============================================ */
.theme-controls {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.theme-btn {
    width: 50px;
    height: 50px;
    border: 2px solid var(--primary-gold);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--primary-gold);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover,
.theme-btn.active {
    background: var(--primary-gold);
    color: var(--primary-navy);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    gap: var(--space-sm);
}

.lang-btn {
    padding: 12px 25px;
    border: 2px solid var(--primary-gold);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--primary-gold);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-normal);
    font-family: inherit;
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--primary-gold);
    color: var(--primary-navy);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

/* ============================================
   Main Card
   ============================================ */
.main-card {
    background: var(--light-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-xl) var(--space-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-lg);
    border: 3px solid var(--primary-gold);
    position: relative;
    transition: background-color var(--transition-normal);
}

.main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-gold), var(--primary-emerald), var(--primary-gold));
}

/* ============================================
   Islamic Divider
   ============================================ */
.islamic-divider {
    text-align: center;
    margin: var(--space-lg) 0;
    color: var(--primary-gold);
    font-size: 2rem;
    font-family: 'Scheherazade New', serif;
}

/* ============================================
   Section Title
   ============================================ */
.section-title {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    color: var(--light-text);
    margin-bottom: var(--space-lg);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.section-title::before {
    content: '';
    width: 5px;
    height: 50px;
    background: linear-gradient(180deg, var(--primary-gold), var(--primary-emerald));
    border-radius: 10px;
}

/* ============================================
   Form Elements
   ============================================ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-label {
    font-weight: 700;
    color: var(--light-text);
    font-size: 1.05rem;
    font-family: 'Amiri', serif;
}

.form-input,
.form-select {
    padding: 16px 20px;
    border: 2px solid var(--primary-gold);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: all var(--transition-normal);
    background: var(--light-surface);
    color: var(--light-text);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-emerald);
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.1);
    transform: translateY(-2px);
}

/* ============================================
   Buttons
   ============================================ */
.btn-group {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 16px 35px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Cairo', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-emerald), var(--dark-emerald));
    color: var(--white);
    box-shadow: 0 5px 20px rgba(4, 120, 87, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(4, 120, 87, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold));
    color: var(--primary-navy);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

/* ============================================
   Today's Prayer Section
   ============================================ */
.today-section {
    background: linear-gradient(135deg, var(--primary-navy), var(--primary-emerald));
    color: var(--white);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--primary-gold);
    position: relative;
    overflow: hidden;
}

.today-section::before {
    content: '✦';
    position: absolute;
    top: -30px;
    left: -30px;
    font-size: 180px;
    opacity: 0.1;
    color: var(--primary-gold);
}

.today-header {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
    z-index: 2;
}

.today-date {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.today-hijri {
    font-family: 'Scheherazade New', serif;
    font-size: 1.4rem;
    opacity: 0.95;
}

/* ============================================
   Prayer Cards with Countdown (NEW)
   ============================================ */
.prayer-times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-md);
    position: relative;
    z-index: 2;
}

.prayer-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    padding: 25px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.4s;
    border: 2px solid rgba(212, 175, 55, 0.3);
    cursor: pointer;
    position: relative;
}

.prayer-card:hover {
    background: rgba(212, 175, 255, 0.25);
    transform: translateY(-8px) scale(1.05);
    border-color: var(--primary-gold);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.prayer-card.next-prayer {
    background: rgba(212, 175, 55, 0.3);
    border: 3px solid var(--primary-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.6); }
    50% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.9); }
}

.prayer-name {
    font-family: 'Amiri', serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-gold);
}

.prayer-time {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
}

.prayer-countdown {
    font-size: 0.9rem;
    margin-top: 8px;
    opacity: 0.8;
    font-family: 'Cairo', sans-serif;
}

/* ============================================
   Calendar Table
   ============================================ */
.calendar-section {
    display: none;
}

.calendar-section.active {
    display: block;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 3px solid var(--primary-gold);
}

.prayer-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--light-surface);
}

.prayer-table thead {
    background: linear-gradient(135deg, var(--primary-navy), var(--primary-emerald));
    color: var(--white);
}

.prayer-table th {
    padding: 20px 15px;
    font-weight: 700;
    text-align: center;
    font-size: 1.05rem;
    font-family: 'Amiri', serif;
    border-right: 1px solid rgba(212, 175, 55, 0.3);
}

.prayer-table tbody tr {
    transition: all var(--transition-normal);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.prayer-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), rgba(4, 120, 87, 0.05));
    transform: scale(1.01);
}

.prayer-table td {
    padding: 18px 15px;
    text-align: center;
    color: var(--light-text);
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    border-right: 1px solid rgba(226, 232, 240, 0.3);
}

.current-day {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.2), rgba(4, 120, 87, 0.15)) !important;
    font-weight: 800;
    border-left: 4px solid var(--primary-gold);
    border-right: 4px solid var(--primary-gold);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 18px 25px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-weight: 600;
    border: 2px solid;
    font-family: 'Cairo', sans-serif;
    animation: slideInDown 0.4s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #dcfce7, #d1fae5);
    color: #166534;
    border-color: #16a34a;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-color: #dc2626;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border-color: #3b82f6;
}

/* ============================================
   Loading Spinner
   ============================================ */
.loading {
    text-align: center;
    padding: 50px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(226, 232, 240, 0.3);
    border-top-color: var(--primary-gold);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    /* color: var(--primary-gold); */
    color: #056C4F;
    margin-top: 50px;
    font-family: 'Amiri', serif;
    position: relative;
    z-index: 2;
}

.footer-text {
    font-size: 1.1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Geolocation Prompt
   ============================================ */
.geolocation-prompt {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(4, 120, 87, 0.1));
    border: 2px solid var(--primary-gold);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    text-align: center;
    display: none;
}

.geolocation-prompt.active {
    display: block;
    animation: slideInDown 0.5s ease;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        flex-direction: column;
    }
    
    .logo-text h1 {
        font-size: 2rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .prayer-times-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .main-card {
        padding: var(--space-lg) var(--space-md);
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.6rem;
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
    
    .logo-text h1 {
        font-size: 1.5rem;
    }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-gold), var(--primary-emerald));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--dark-gold), var(--dark-emerald));
}

/* ============================================
   Favorites Section - Collapsible
   ============================================ */
.favorites-section {
    transition: all 0.3s ease;
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-gold);
    margin-bottom: 20px;
    cursor: pointer;
}

.favorites-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    opacity: 1;
}

.favorites-content.collapsed {
    max-height: 0 !important;
    opacity: 0;
    margin-top: 0 !important;
}

#favorites-icon {
    transition: transform 0.3s ease;
    display: inline-block;
    font-size: 16px;
    color: var(--primary-gold);
}

#favorites-icon.collapsed {
    transform: rotate(-90deg);
}

#favorites-count {
    animation: pulse 2s infinite;
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Print Styles - أنماط الطباعة
   ============================================ */
@media print {
    /* إخفاء العناصر غير الضرورية */
    .header,
    .main-card,
    .footer,
    .quick-menu,
    .geolocation-prompt,
    .theme-controls,
    .lang-toggle,
    .btn-group,
    .btn,
    body::before,
    .mosque-bg,
    .today-section,
    #qibla-section,
    #alarms-section,
    #favorites-section {
        display: none !important;
    }
    
    body {
        background: white;
        padding: 0;
        margin: 0;
    }
    
    .container {
        max-width: 100%;
        padding: 20px;
    }
    
    /* إضافة عنوان للطباعة */
    .calendar-section::before {
        content: 'مواقيت الصلاة - جدول شهري';
        display: block;
        text-align: center;
        font-size: 28px;
        font-weight: bold;
        color: #1e3a5f;
        margin-bottom: 10px;
        font-family: 'Cairo', Arial, sans-serif;
    }
    
    /* إضافة معلومات المدينة */
    .calendar-section::after {
        content: attr(data-city-info);
        display: block;
        text-align: center;
        font-size: 16px;
        color: #64748b;
        margin-bottom: 20px;
    }
    
    /* إظهار الجدول فقط */
    .calendar-section {
        display: block !important;
        background: white;
        padding: 20px;
        box-shadow: none;
        border: none;
        margin: 0;
    }
    
    .section-title {
        display: none !important;
    }
    
    /* تنسيق الجدول للطباعة */
    .table-wrapper {
        overflow: visible;
        box-shadow: none;
    }
    
    .prayer-table {
        width: 100%;
        border-collapse: collapse;
        page-break-inside: auto;
        font-family: 'Cairo', Arial, sans-serif;
    }
    
    .prayer-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    .prayer-table thead {
        display: table-header-group;
        background: #1e3a5f !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .prayer-table th {
        background: #1e3a5f !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        padding: 12px !important;
        font-size: 14pt;
        border: 1px solid #1e3a5f !important;
        font-weight: bold;
    }
    
    .prayer-table td {
        padding: 10px !important;
        font-size: 12pt;
        border: 1px solid #cbd5e1 !important;
        text-align: center;
    }
    
    .current-day {
        background: #fef3c7 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        font-weight: bold;
    }
    
    /* إضافة footer */
    .calendar-section {
        position: relative;
        padding-bottom: 60px;
    }
    
    .calendar-section .table-wrapper::after {
        content: 'Prayer Times PRO | مواقيت الصلاة 2026 © • Powered by Aladhan API | v2.0';
        display: block;
        text-align: center;
        margin-top: 30px;
        font-size: 10pt;
        color: #94a3b8;
        font-family: 'Cairo', Arial, sans-serif;
    }
    
    /* إعدادات الصفحة */
    @page {
        margin: 1.5cm;
        size: A4;
    }
}

/* زر الإغلاق X */
.close-section-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-section-btn:hover {
    background: rgba(185, 28, 28, 1);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
}

.close-section-btn:active {
    transform: scale(0.95) rotate(90deg);
}

/* تحسين لـ main-card لدعم الزر */
.main-card {
    position: relative;
    padding-top: 70px;
}

@media (max-width: 768px) {
    .close-section-btn {
        top: 10px;
        left: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

/* ============================================ */
/* Zakat Calculator - Price Inputs */
/* ============================================ */

.price-inputs {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.price-input-group {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.price-input-group label {
    display: block;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 10px;
    font-size: 16px;
}

.price-input-group .form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.price-input-group .form-input:focus {
    border-color: #047857;
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.1);
}

.price-note {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
}

.nisab-display {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #047857, #059669);
    border-radius: 15px;
    color: white;
}

.nisab-info h4 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: bold;
}

.nisab-values {
    display: grid;
    gap: 10px;
}

.nisab-values span {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 15px;
}

.nisab-values strong {
    font-size: 18px;
    font-weight: bold;
}

.nisab-warning {
    text-align: center;
    padding: 20px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 10px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .price-input-group {
        padding: 15px;
    }
    
    .price-input-group .form-input {
        font-size: 16px;
    }
}

/* ============================================ */
/* إخفاء المدن المفضلة */
/* ============================================ */

#favorites-section {
    display: none !important;
}

/* إذا كنت تريد إظهارها فقط عند الحاجة */
#favorites-section.show {
    display: block !important;
}
