:root {
    --bg-color: #f7f5ef;
    --text-color: #0b1513;
    --primary-color: #1a4731;
    --accent-color: #d4af37;
    --card-bg: rgba(255, 255, 255, 0.6);
    --card-border: rgba(255, 255, 255, 0.2);
}
body.dark-mode {
    --bg-color: #0b1513;
    --text-color: #f7f5ef;
    --primary-color: #d4af37;
    --accent-color: #1a4731;
    --card-bg: rgba(0, 0, 0, 0.4);
    --card-border: rgba(255, 255, 255, 0.1);
}
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    transition: all 0.3s ease;
    line-height: 1.6;
}
h1, h2, h3, h4, h5, h6 { font-family: 'Amiri', serif; }
a { color: var(--primary-color); text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

/* Glassmorphism */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; padding: 15px 0; margin-bottom: 40px; border-radius: 0 0 24px 24px; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.site-title { margin: 0; font-size: 1.5rem; }
.site-title a { color: var(--text-color); }
.main-navigation ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.main-navigation a { color: var(--text-color); font-weight: 500; }
.theme-toggle-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-color); display: flex; align-items: center; justify-content: center; padding: 8px; border-radius: 50%; transition: background 0.2s; }
.theme-toggle-btn:hover { background: rgba(0,0,0,0.05); }
body.dark-mode .theme-toggle-btn:hover { background: rgba(255,255,255,0.1); }

/* Hero */
.hero-section { padding: 40px 0; }
.hero-title { font-size: 2.5rem; margin-bottom: 10px; color: var(--primary-color); }
.hero-subtitle { font-size: 1.2rem; opacity: 0.8; margin-bottom: 40px; }

/* Counter */
.tasbih-counter-wrapper { max-width: 350px; margin: 0 auto; padding: 40px 20px; text-align: center; }
.tc-display { position: relative; width: 250px; height: 250px; margin: 0 auto 30px; }
.tc-ring-container { position: relative; width: 100%; height: 100%; }
.tc-progress-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.tc-ring-bg { fill: none; stroke: rgba(0,0,0,0.05); stroke-width: 4; }
body.dark-mode .tc-ring-bg { stroke: rgba(255,255,255,0.05); }
.tc-ring-progress { fill: none; stroke: var(--primary-color); stroke-width: 4; stroke-dasharray: 289; stroke-dashoffset: 289; transition: stroke-dashoffset 0.3s; stroke-linecap: round; }
.tc-tap-btn { position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 50%; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 10px 25px rgba(0,0,0,0.1); transition: transform 0.1s; color: var(--text-color); }
.tc-tap-btn:active { transform: scale(0.95); }
#tc-count { font-size: 4.5rem; font-weight: 700; font-family: 'Inter', sans-serif; line-height: 1; margin-bottom: 5px; }
.tc-goal-text { font-size: 0.9rem; opacity: 0.7; font-weight: 500; }
.tc-controls { display: flex; justify-content: center; gap: 20px; background: var(--card-bg); padding: 10px 20px; border-radius: 50px; border: 1px solid var(--card-border); display: inline-flex; }
.tc-icon-btn { background: transparent; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: all 0.2s; color: var(--text-color); opacity: 0.5; display: flex; align-items: center; justify-content: center; }
.tc-icon-btn:hover { opacity: 1; background: rgba(0,0,0,0.05); }
body.dark-mode .tc-icon-btn:hover { background: rgba(255,255,255,0.1); }
.tc-icon-btn.active { opacity: 1; color: var(--primary-color); background: rgba(26, 71, 49, 0.1); }
body.dark-mode .tc-icon-btn.active { color: var(--primary-color); background: rgba(212, 175, 55, 0.1); }

/* Grid */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 60px; }
.feature-card { padding: 30px; text-align: center; }
.feature-card h3 { color: var(--primary-color); margin-top: 0; }

/* Popular Dhikr List */
.dhikr-item { padding: 20px 25px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: all 0.2s ease; border: 1px solid transparent; }
.dhikr-item:hover { background: rgba(255, 255, 255, 0.8); border-color: rgba(26, 71, 49, 0.2); transform: translateY(-2px); }
body.dark-mode .dhikr-item:hover { background: rgba(0, 0, 0, 0.6); border-color: rgba(212, 175, 55, 0.2); }

/* Stats Page */
.stat-card { padding: 25px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat-icon { width: 48px; height: 48px; border-radius: 50%; background: rgba(26, 71, 49, 0.1); color: var(--primary-color); display: flex; align-items: center; justify-content: center; margin-bottom: 15px; }
body.dark-mode .stat-icon { background: rgba(212, 175, 55, 0.1); }
.stat-label { font-size: 0.9rem; opacity: 0.7; margin: 0 0 5px 0; font-weight: 500; }
.stat-value { font-size: 2rem; font-weight: 700; margin: 0; }

.stat-item-row { margin-bottom: 15px; }
.stat-item-row:last-child { margin-bottom: 0; }
.stat-item-header { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 8px; }
.stat-item-name { font-weight: 500; }
.stat-item-count { opacity: 0.7; }
.stat-progress-bg { height: 8px; width: 100%; background: rgba(0, 0, 0, 0.05); border-radius: 10px; overflow: hidden; }
body.dark-mode .stat-progress-bg { background: rgba(255, 255, 255, 0.05); }
.stat-progress-fill { height: 100%; background: var(--primary-color); border-radius: 10px; transition: width 0.5s ease; }

/* Footer */
.site-footer { text-align: center; padding: 40px 0; margin-top: 60px; border-top: 1px solid rgba(0,0,0,0.1); opacity: 0.7; }
body.dark-mode .site-footer { border-top: 1px solid rgba(255,255,255,0.1); }

@media (max-width: 768px) {
    .header-inner { flex-direction: column; gap: 15px; }
    .tc-display { width: 200px; height: 200px; }
    #tc-count { font-size: 3.5rem; }
}
