/* Prayer Timings App - Custom Styles */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-bg: #ecf0f1;
    --dark-bg: #34495e;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #bdc3c7;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #34495e;
    --secondary-color: #2c3e50;
    --light-bg: #1a1a1a;
    --dark-bg: #2c3e50;
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --border-color: #34495e;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.4);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

[data-theme="dark"] body {
    background-color: #1a1a1a;
}

/* Header Styles */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: relative; /* Changed from sticky */
    z-index: 1000;
    transition: all 0.3s ease;
}

[data-theme="dark"] .main-header {
    background: rgba(44, 62, 80, 0.95);
}

.header-content {
    padding: 1rem 0;
}

.mosque-info h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.mosque-info p {
    color: var(--text-secondary);
    margin: 0;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.city-selector {
    min-width: 200px;
}

.theme-toggle {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow);
}

/* Date Display */
.date-display {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    text-align: center;
}

[data-theme="dark"] .date-display {
    background: rgba(44, 62, 80, 0.95);
}

.date-display h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.hijri-date {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-weight: 600;
}

.islamic-events {
    margin-top: 1rem;
}

.event-badge {
    display: inline-block;
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin: 0.25rem;
}

/* Prayer Times Card */
.prayer-times-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

[data-theme="dark"] .prayer-times-card {
    background: rgba(44, 62, 80, 0.95);
}

.prayer-times-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.prayer-time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.prayer-time-item:last-child {
    border-bottom: none;
}

.prayer-time-item:hover {
    background: var(--light-bg);
    margin: 0 -1rem;
    padding: 1rem;
    border-radius: 10px;
}

[data-theme="dark"] .prayer-time-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.prayer-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prayer-time {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--info-color);
}

.current-prayer {
    background: linear-gradient(135deg, var(--success-color), var(--info-color));
    color: white;
    margin: 0 -1rem;
    padding: 1rem;
    border-radius: 10px;
}

.current-prayer .prayer-name,
.current-prayer .prayer-time {
    color: white;
}

/* Next Prayer Countdown */
.next-prayer-card {
    background: linear-gradient(135deg, var(--accent-color), var(--warning-color));
    color: white;
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    text-align: center;
}

.countdown-display {
    font-size: 3rem;
    font-weight: 700;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
}

.next-prayer-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Monthly View */
.monthly-view {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

[data-theme="dark"] .monthly-view {
    background: rgba(44, 62, 80, 0.95);
}

.month-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.month-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.timings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.timings-table th,
.timings-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.timings-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.timings-table tr:hover {
    background: var(--light-bg);
}

[data-theme="dark"] .timings-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.today-row {
    background: var(--success-color);
    color: white;
    font-weight: 600;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0;
    justify-content: center;
}

.view-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    background: var(--light-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Export Button */
.export-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: white;
}

/* Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mosque-info h1 {
        font-size: 1.4rem;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .city-selector {
        width: 100%;
    }
    
    .prayer-times-card {
        padding: 1.5rem;
    }
    
    .countdown-display {
        font-size: 2rem;
    }
    
    .timings-table {
        font-size: 0.9rem;
    }
    
    .timings-table th,
    .timings-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .date-display {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .prayer-time-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .view-toggle {
        flex-direction: column;
    }
    
    .view-btn {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .header-controls,
    .view-toggle,
    .export-btn {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .prayer-times-card,
    .monthly-view,
    .date-display {
        background: white;
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Azan Listen Buttons */
.azan-listen-btn {
    transition: all 0.3s ease;
    border-width: 2px;
    font-weight: 600;
}

.azan-listen-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.azan-listen-btn:active {
    transform: translateY(-1px);
}

.azan-listen-btn i {
    transition: transform 0.3s ease;
}

.azan-listen-btn:hover i {
    transform: scale(1.1);
}background: var(--secondary-color);
}
