/* ==========================================
   RAMADAN 2026 CALENDAR - Modern Calendly-Style
   With 10 Culturally-Inspired Themes
   ========================================== */

/* ==========================================
   1. CSS VARIABLES & BASE THEME (Ottoman)
   ========================================== */
.ramadan-app {
    /* Base colors - Ottoman Theme (Default) */
    --primary: #1a5f7a;
    --primary-light: #2980b9;
    --primary-dark: #0d3647;
    --accent: #c4a35a;
    --accent-light: #e8d5a3;
    --accent-glow: rgba(196, 163, 90, 0.3);

    --bg-main: #0a0f1a;
    --bg-card: #111827;
    --bg-elevated: #1f2937;
    --bg-hover: #374151;

    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --border: #374151;
    --border-light: #4b5563;

    --sehri: #818cf8;
    --iftar: #f59e0b;
    --friday: #10b981;
    --laylatul-qadr: #c084fc;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--accent-glow);

    --transition: 200ms ease;
    --transition-slow: 400ms ease;

    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-arabic: 'Noto Naskh Arabic', serif;
}

/* ==========================================
   2. THEME DEFINITIONS
   ========================================== */

/* Theme: Ottoman (Turkey) - Deep blues with gold */
[data-theme="ottoman"] {
    --primary: #1a5f7a;
    --primary-light: #2980b9;
    --primary-dark: #0d3647;
    --accent: #c4a35a;
    --accent-light: #e8d5a3;
    --accent-glow: rgba(196, 163, 90, 0.3);
    --bg-main: #0a0f1a;
    --bg-card: #111827;
    --bg-elevated: #1f2937;
}

/* Theme: Batik (Indonesia) - Warm browns and coral */
[data-theme="batik"] {
    --primary: #8b4513;
    --primary-light: #cd853f;
    --primary-dark: #5c2e0a;
    --accent: #ff6b6b;
    --accent-light: #ffa8a8;
    --accent-glow: rgba(255, 107, 107, 0.3);
    --bg-main: #1a0f0a;
    --bg-card: #2d1810;
    --bg-elevated: #3d2218;
}

/* Theme: Emerald (Pakistan) - Deep greens with gold */
[data-theme="emerald"] {
    --primary: #065f46;
    --primary-light: #059669;
    --primary-dark: #064e3b;
    --accent: #fbbf24;
    --accent-light: #fde68a;
    --accent-glow: rgba(251, 191, 36, 0.3);
    --bg-main: #021a14;
    --bg-card: #042f22;
    --bg-elevated: #064e3b;
}

/* Theme: Pharaoh (Egypt) - Gold and sand */
[data-theme="pharaoh"] {
    --primary: #b8860b;
    --primary-light: #daa520;
    --primary-dark: #8b6914;
    --accent: #f4e4bc;
    --accent-light: #faf6eb;
    --accent-glow: rgba(244, 228, 188, 0.3);
    --bg-main: #1a1408;
    --bg-card: #2d2410;
    --bg-elevated: #3d3218;
}

/* Theme: Zellige (Morocco) - Blue and terracotta */
[data-theme="zellige"] {
    --primary: #1e3a5f;
    --primary-light: #3b82f6;
    --primary-dark: #1e293b;
    --accent: #d97706;
    --accent-light: #fbbf24;
    --accent-glow: rgba(217, 119, 6, 0.3);
    --bg-main: #0c1929;
    --bg-card: #1e293b;
    --bg-elevated: #334155;
}

/* Theme: Arabian (Gulf) - Purple and gold stars */
[data-theme="arabian"] {
    --primary: #581c87;
    --primary-light: #7c3aed;
    --primary-dark: #3b0764;
    --accent: #fcd34d;
    --accent-light: #fef3c7;
    --accent-glow: rgba(252, 211, 77, 0.3);
    --bg-main: #0f0720;
    --bg-card: #1e1033;
    --bg-elevated: #2e1a4d;
}

/* Theme: Persian (Iran) - Rich purple and rose */
[data-theme="persian"] {
    --primary: #7c2d12;
    --primary-light: #c2410c;
    --primary-dark: #4a1d0a;
    --accent: #f472b6;
    --accent-light: #fbcfe8;
    --accent-glow: rgba(244, 114, 182, 0.3);
    --bg-main: #1a0a12;
    --bg-card: #2d1620;
    --bg-elevated: #4a1d30;
}

/* Theme: Monsoon (Bangladesh) - Teal and tropical */
[data-theme="monsoon"] {
    --primary: #0d9488;
    --primary-light: #14b8a6;
    --primary-dark: #0f766e;
    --accent: #84cc16;
    --accent-light: #d9f99d;
    --accent-glow: rgba(132, 204, 22, 0.3);
    --bg-main: #021210;
    --bg-card: #042f2e;
    --bg-elevated: #134e4a;
}

/* Theme: Adire (Nigeria) - Indigo and earth tones */
[data-theme="adire"] {
    --primary: #3730a3;
    --primary-light: #6366f1;
    --primary-dark: #1e1b4b;
    --accent: #f97316;
    --accent-light: #fed7aa;
    --accent-glow: rgba(249, 115, 22, 0.3);
    --bg-main: #0c0a20;
    --bg-card: #1e1b4b;
    --bg-elevated: #312e81;
}

/* Theme: Modern (Malaysia) - Clean minimal */
[data-theme="modern"] {
    --primary: #475569;
    --primary-light: #64748b;
    --primary-dark: #334155;
    --accent: #06b6d4;
    --accent-light: #a5f3fc;
    --accent-glow: rgba(6, 182, 212, 0.3);
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-elevated: #334155;
}

/* ==========================================
   3. BASE STYLES
   ========================================== */
.ramadan-app {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    font-family: var(--font-main);
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--bg-main);
    min-height: 100vh;
    transition: background var(--transition-slow);
}

.ramadan-app * {
    box-sizing: border-box;
}

/* ==========================================
   4. HERO SECTION
   ========================================== */
.app-hero {
    text-align: center;
    padding: 48px 24px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--bg-card) 100%);
    border-radius: var(--radius-xl);
    margin-bottom: 32px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.app-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent);
    color: var(--bg-main);
    border-radius: var(--radius-xl);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    position: relative;
}

.hero-title {
    font-size: clamp(28px, 6vw, 48px);
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text-primary);
    position: relative;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

/* ==========================================
   5. THEME PICKER
   ========================================== */
.theme-section {
    margin-bottom: 32px;
}

.section-header {
    text-align: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.section-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

@media (min-width: 768px) {
    .theme-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.theme-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    overflow: hidden;
}

.theme-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.theme-card.active {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.theme-preview {
    width: 100%;
    height: 48px;
    position: relative;
    overflow: hidden;
}

.preview-pattern {
    width: 100%;
    height: 100%;
}

/* Theme Preview Colors */
.ottoman-preview { background: linear-gradient(135deg, #1a5f7a 0%, #c4a35a 100%); }
.batik-preview { background: linear-gradient(135deg, #8b4513 0%, #ff6b6b 100%); }
.emerald-preview { background: linear-gradient(135deg, #065f46 0%, #fbbf24 100%); }
.pharaoh-preview { background: linear-gradient(135deg, #b8860b 0%, #f4e4bc 100%); }
.zellige-preview { background: linear-gradient(135deg, #1e3a5f 0%, #d97706 100%); }
.arabian-preview { background: linear-gradient(135deg, #581c87 0%, #fcd34d 100%); }
.persian-preview { background: linear-gradient(135deg, #7c2d12 0%, #f472b6 100%); }
.monsoon-preview { background: linear-gradient(135deg, #0d9488 0%, #84cc16 100%); }
.adire-preview { background: linear-gradient(135deg, #3730a3 0%, #f97316 100%); }
.modern-preview { background: linear-gradient(135deg, #475569 0%, #06b6d4 100%); }

.theme-info {
    padding: 10px 8px;
    text-align: center;
    width: 100%;
}

.theme-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.theme-origin {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==========================================
   6. LOCATION SECTION
   ========================================== */
.location-section {
    margin-bottom: 32px;
}

.location-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.location-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.location-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-glow);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.location-text h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text-primary);
}

.location-text p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.location-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    font-family: var(--font-main);
}

.btn-detect {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-detect:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.city-select-wrapper {
    flex: 1;
    min-width: 200px;
}

.city-select,
.method-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.city-select:focus,
.method-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.city-select option,
.method-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.method-selector {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.method-selector label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================
   7. CALENDAR SECTION
   ========================================== */
.calendar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 16px;
}

.calendar-title h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.gregorian-range {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.calendar-nav {
    display: flex;
    gap: 4px;
    background: var(--bg-elevated);
    padding: 4px;
    border-radius: var(--radius-md);
}

.view-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-main);
}

.view-btn:hover {
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--accent);
    color: var(--bg-main);
}

/* ==========================================
   8. CALENDAR GRID (Month View)
   ========================================== */
.calendar-grid {
    padding: 16px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.weekday {
    text-align: center;
    padding: 12px 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Calendar Day Cell */
.calendar-day {
    aspect-ratio: 1;
    min-height: 80px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 8px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid transparent;
}

.calendar-day:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.today {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.calendar-day.friday .day-gregorian {
    color: var(--friday);
}

.calendar-day.last-ten {
    background: linear-gradient(135deg, var(--bg-elevated) 0%, rgba(192, 132, 252, 0.1) 100%);
}

.calendar-day.odd-night::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--laylatul-qadr);
    border-radius: 50%;
}

.calendar-day.selected {
    border-color: var(--accent);
    background: var(--accent-glow);
}

/* Day Content */
.day-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: auto;
}

.day-hijri {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.day-gregorian {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
}

.day-times {
    margin-top: auto;
}

.day-sehri,
.day-iftar {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    line-height: 1.6;
}

.day-sehri span:first-child,
.day-iftar span:first-child {
    color: var(--text-muted);
}

.day-sehri span:last-child {
    color: var(--sehri);
    font-weight: 500;
}

.day-iftar span:last-child {
    color: var(--iftar);
    font-weight: 500;
}

/* Mobile Calendar Adjustments */
@media (max-width: 640px) {
    .calendar-day {
        min-height: 60px;
        padding: 6px;
    }

    .day-hijri {
        font-size: 14px;
    }

    .day-gregorian {
        font-size: 9px;
    }

    .day-sehri,
    .day-iftar {
        font-size: 9px;
    }

    .day-sehri span:first-child,
    .day-iftar span:first-child {
        display: none;
    }
}

/* ==========================================
   9. CALENDAR LIST VIEW
   ========================================== */
.calendar-list {
    padding: 16px;
    overflow-x: auto;
}

.times-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.times-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.times-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.times-table tr:hover td {
    background: var(--bg-elevated);
}

.times-table tr.friday td {
    background: rgba(16, 185, 129, 0.05);
}

.times-table tr.last-ten td {
    background: rgba(192, 132, 252, 0.05);
}

.times-table .sehri-time {
    color: var(--sehri);
    font-weight: 500;
}

.times-table .iftar-time {
    color: var(--iftar);
    font-weight: 500;
}

/* ==========================================
   10. DAY DETAILS PANEL
   ========================================== */
.day-details {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px;
    pointer-events: none;
}

.details-card {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    pointer-events: all;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-details {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--bg-elevated);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.close-details:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.details-header {
    text-align: center;
    margin-bottom: 24px;
}

.details-date {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
}

.hijri-day {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.hijri-month {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
}

.details-gregorian {
    font-size: 14px;
    color: var(--text-secondary);
}

.details-times {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.time-block {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
}

.time-icon {
    color: var(--text-secondary);
}

.sehri-block .time-icon {
    color: var(--sehri);
}

.iftar-block .time-icon {
    color: var(--iftar);
}

.time-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.time-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.time-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 8px;
}

.fasting-duration {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.details-dua {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.dua-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.dua-card h4 {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dua-arabic {
    font-family: var(--font-arabic);
    font-size: 20px;
    color: var(--accent);
    margin: 0 0 8px;
    direction: rtl;
    line-height: 1.8;
}

.dua-translation {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    font-style: italic;
}

/* ==========================================
   11. KEY DATES SECTION
   ========================================== */
.key-dates-section {
    margin-bottom: 32px;
}

.key-dates-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px;
    color: var(--text-primary);
    text-align: center;
}

.key-dates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.key-date-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.key-date-card:hover {
    border-color: var(--accent);
}

.key-date-card.highlight {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(192, 132, 252, 0.1) 100%);
    border-color: var(--laylatul-qadr);
}

.key-date-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.key-date-card.highlight .key-date-icon {
    color: var(--laylatul-qadr);
}

.key-date-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.key-date-value {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
}

.moon-disclaimer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 16px;
}

/* ==========================================
   12. DOWNLOAD SECTION
   ========================================== */
.download-section {
    margin-bottom: 32px;
}

.download-card {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
}

.download-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.download-card > p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px;
}

.download-options {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.download-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.download-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.btn-download {
    background: var(--accent);
    color: var(--bg-main);
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
}

.btn-download:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* ==========================================
   13. CONTENT & FAQ SECTIONS
   ========================================== */
.content-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
}

.content-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent);
    margin: 32px 0 16px;
}

.content-section h2:first-child {
    margin-top: 0;
}

.content-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 12px;
}

.content-section p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.content-section ul,
.content-section ol {
    color: var(--text-secondary);
    padding-left: 24px;
    margin-bottom: 16px;
}

.content-section li {
    margin-bottom: 8px;
}

.faq-section {
    margin-bottom: 32px;
}

.faq-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px;
    color: var(--text-primary);
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-question {
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 20px;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-question:hover {
    background: var(--bg-elevated);
}

.faq-answer {
    padding: 0 20px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==========================================
   14. RESPONSIVE STYLES
   ========================================== */
@media (max-width: 768px) {
    .ramadan-app {
        padding: 16px;
    }

    .app-hero {
        padding: 32px 16px;
    }

    .location-card {
        padding: 16px;
    }

    .location-header {
        flex-direction: column;
        text-align: center;
    }

    .location-actions {
        flex-direction: column;
    }

    .btn-detect {
        width: 100%;
        justify-content: center;
    }

    .calendar-header {
        padding: 16px;
    }

    .details-times {
        flex-direction: column;
    }

    .time-block {
        width: 100%;
    }

    .time-divider {
        padding: 8px 0;
    }

    .download-card {
        padding: 24px 16px;
    }

    .content-section {
        padding: 24px 16px;
    }
}

@media (max-width: 480px) {
    .theme-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .theme-info {
        padding: 6px 4px;
    }

    .theme-name {
        font-size: 10px;
    }

    .theme-origin {
        display: none;
    }

    .key-dates-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   15. PRINT STYLES
   ========================================== */
@media print {
    .ramadan-app {
        background: white;
        color: black;
    }

    .theme-section,
    .location-section,
    .download-section,
    .day-details,
    .calendar-nav {
        display: none !important;
    }

    .calendar-section {
        border: 1px solid #ccc;
    }

    .calendar-day {
        border: 1px solid #eee;
    }
}

/* ==========================================
   16. ANIMATIONS
   ========================================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.calendar-day.today .day-hijri {
    animation: pulse 2s ease-in-out infinite;
}

/* Theme transition */
.ramadan-app,
.ramadan-app * {
    transition-property: background-color, border-color, color;
    transition-duration: var(--transition-slow);
    transition-timing-function: ease;
}
