
/* Base styles */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-color: #3b82f6;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --active-prayer: rgba(59, 130, 246, 0.1);
    --active-prayer-border: #3b82f6;
}
.dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --active-prayer: rgba(22, 108, 247, 0.234);
    --active-prayer-border: #3b82f6;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}
/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    backdrop-filter: blur(10px);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
}
.logo {
    color: var(--accent-color);
    font-size: 1.5rem;
}
.endnav{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
}
.btn{
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
}
.endnav a:hover{
    color: var(--text-primary);
}
.btn.active{
    color: var(--accent-color) !important;
}
#theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
}
#theme-toggle:hover {
    background-color: var(--border-color);
}
.icon {
    width: 1.25rem;
    height: 1.25rem;
}
.hidden {
    display: none !important;
}
/* Hero section */
.hero {
    text-align: center;
    margin: 4rem 0 3rem;
}
.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.hero p {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}
/* Location selector */
.location-selector {
    position: relative;
    margin: 1.5rem 0;
}
#location-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 1rem;
    margin: 0 auto;
}
#location-button:hover {
    background-color: var(--border-color);
}
.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-card);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    padding: 1rem;
    margin-top: 0.5rem;
    z-index: 10;
    width: 100%;
    max-width: 400px;
}
.dropdown h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}
.popular-locations {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.popular-locations button {
    text-align: left;
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: none;
    border-radius: 0.375rem;
    color: var(--text-primary);
    cursor: pointer;
}
.popular-locations button:hover {
    background-color: var(--bg-secondary);
}
.custom-location {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.input-group label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.input-group input {
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}
.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
}
.btn-primary:hover {
    opacity: 0.9;
}
.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
}
.btn-secondary:hover {
    background-color: var(--border-color);
}
/* Date and time  */
.datetime {
    margin: 1.5rem 0;
}
.date {
    color: #3b82f6 !important;
    font-weight: 500;
    font-size: 2rem !important;
    margin-bottom: 0.1rem;
}
.time {
    font-size: 2rem !important;
    font-weight: 600;
    color: #475e7f !important;
    font-family: monospace;
}
/* Date selector */
.date-selector {
    position: relative;
    margin: 1.5rem 0;
}
#date-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 1rem;
    margin: 0 auto;
}
#date-button:hover {
    background-color: var(--border-color);
}
#date-picker {
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    margin-bottom: 1rem;
}
.date-actions {
    display: flex;
    justify-content: space-between;
}
/* Islamic date */
.islamic-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    margin: 0 auto 2rem;
    width: fit-content;
}

.section-title {
    text-align: center;
    font-size: 1.875rem;
    margin-bottom: 2rem;
}
/* Prayer grid */
.prayer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
@media (min-width: 768px) {
    .prayer-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.prayer-card {
    background-color: var(--bg-card);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow-color);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
}
.prayer-item:hover{
    background-color: hsla(216, 30%, 23%, 0.36);
}
.prayer-list {
    padding: 1rem;
}
.prayer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: 0.375rem;
}
.prayer-item.active {
    background-color: var(--active-prayer);
    border-left: 4px solid var(--active-prayer-border);
}
.prayer-name {
    display: flex;
    flex-direction: column;
}
.arabic {
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.prayer-time {
    font-size: 1.25rem;
    font-family: monospace;
}
/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.tab {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
}
.tab.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.monthly-view {
    background-color: var(--bg-card);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    margin-bottom: 2rem;
}
.month-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.month-navigation button {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    background-color: var(--bg-secondary);
}
.month-navigation button:hover {
    background-color: var(--border-color);
}
.table-container {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
th {
    background-color: var(--bg-secondary);
    font-weight: 600;
}
tr.today {
    background-color: var(--active-prayer);
}
td.date-cell {
    text-align: left;
}
.hijri-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .time {
        font-size: 2.5rem;
    }
    .custom-location {
        grid-template-columns: 1fr;
    }
    .prayer-time {
        font-size: 1rem;
    }
}
@media (max-width: 510px) {
    header{
        padding: 1rem 1.1rem;
    }
    .logo{
        font-size: 1.1rem;
    }
    .btn{
        font-size: 15px;
    }
    .endnav{
        gap: 15px;
    }
}
@media (max-width: 419px) {
    .btn{
        font-size: 12px;
    }
}
@media (max-width: 350px) {
    header{
        padding: 1rem 0.5rem;
    }
    .endnav{
        gap: 7px;
    }
}



/* Hadiths page styles */
.hadiths-container {
    padding-top: 4rem;
    max-width: 800px;
    margin: 0 auto;
}

.hadiths-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hadiths-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.narrators-tabs {
    display: flex;
    justify-content: space-between;
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.narrator-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.narrator-tab:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.narrator-tab.active {
    background-color: var(--bg-primary);
    color: var(--accent-color);
}

.hadiths-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.hadith-card {
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.hadith-text {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.hadith-arabic {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    text-align: right;
    direction: rtl;
}

.hadith-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.hadith-narrator {
    color: var(--accent-color);
}

.hadith-source {
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    .narrators-tabs {
        padding: 0.25rem;
    }
    
    .narrator-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .hadith-text, .hadith-arabic {
        font-size: 1rem;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}
footer a {
    color: var(--accent-color);
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}
/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}