@font-face { font-family: 'Amiri Quran'; src: url('fonts/Amiri Quran.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Arabic Typesetting Regular'; src: url('fonts/Arabic Typesetting Regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'DS Arabic Regular'; src: url('fonts/DS Arabic Regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'FS Arabic Regular'; src: url('fonts/FS Arabic Regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Hasenat'; src: url('fonts/Hasenat.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Kuran Kerim Font Latif'; src: url('fonts/Kuran Kerim Font Latif.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Mshftr'; src: url('fonts/Mshftr.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Msuigbuh'; src: url('fonts/Msuigbuh.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Traditional Naskh'; src: url('fonts/Traditional Naskh.woff2') format('woff2'); font-display: swap; }

:root {
    --bg-color: #f0f4f8;
    --text-primary: #2c3e50;
    --text-arabic: #1a1a1a;
    --text-secondary: #34495e;
    --text-muted: #7f8c8d;
    --counter-border: #fff;
    --menu-bg: #ffffff;
    --menu-shadow: rgba(0,0,0,0.1);
    --arabic-font: 'Kuran Kerim Font Latif', serif;
    --font-scale: 1;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-primary: #e0e0e0;
    --text-arabic: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;
    --counter-border: #333;
    --menu-bg: #1e1e1e;
    --menu-shadow: rgba(0,0,0,0.5);
}

[data-theme="sepia"] {
    --bg-color: #f8ebd5;
    --text-primary: #433422;
    --text-arabic: #2d241a;
    --text-secondary: #5c4b37;
    --text-muted: #8c7b67;
    --counter-border: #fdf6e3;
    --menu-bg: #fdf6e3;
    --menu-shadow: rgba(67, 52, 34, 0.15);
}

html, body { 
    margin: 0; padding: 0; width: 100%; min-height: 100vh; 
    background-color: var(--bg-color); font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    touch-action: pan-x pan-y; 
}

.view { display: none; flex-direction: column; width: 100%; min-height: 100vh; position: absolute; top: 0; left: 0; background-color: var(--bg-color); }
.view.active { display: flex; animation: fadeIn 0.25s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Sağ Üst Bar ve Açılır Menü */
.top-bar {
    width: 85%; max-width: 400px; margin: 2.5vh auto 0 auto;
    display: flex; justify-content: flex-end; align-items: center; position: relative; z-index: 100;
}
.auth-dropdown-wrapper { position: relative; }
.top-auth-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 20px;
    background: var(--menu-bg); color: var(--text-primary);
    border: 1px solid var(--text-muted); font-size: 14px; font-weight: 600;
    box-shadow: 0 2px 6px var(--menu-shadow); cursor: pointer;
    user-select: none; transition: transform 0.15s;
}
.top-auth-btn:active { transform: scale(0.95); }
.top-auth-btn.logged-in { border-color: #10b981; color: #10b981; }

.user-dropdown-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 8px);
    background: var(--menu-bg); border: 1px solid var(--text-muted);
    border-radius: 12px; box-shadow: 0 8px 20px var(--menu-shadow);
    min-width: 195px; overflow: hidden; z-index: 1000;
}
.user-dropdown-menu.open { display: block; animation: fadeIn 0.15s ease-out; }
.dropdown-item {
    padding: 12px 16px; font-size: 14px; font-weight: 600;
    color: var(--text-primary); cursor: pointer; border-bottom: 1px solid rgba(127,140,141,0.15);
    display: flex; align-items: center; gap: 8px; user-select: none;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:active { background: rgba(16, 185, 129, 0.1); }
.dropdown-item.admin-item { color: #3b82f6; }
.dropdown-item.danger-item { color: #ef4444; }

.submenu-title {
    color: var(--text-primary);
    margin: 9vh auto 1vh auto;
    padding: 0 12vw;
    text-align: center;
    font-size: clamp(20px, 3vh, 26px);
}

.menu-container { display: flex; flex-direction: column; gap: 18px; width: 85%; max-width: 400px; margin: 3vh auto 0 auto; padding-bottom: 10vh; }
.menu-btn { display: flex; align-items: center; justify-content: center; padding: 18px 20px; background: linear-gradient(135deg, #10b981, #059669); color: white; text-align: center; font-size: 20px; border-radius: 15px; font-weight: bold; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; user-select: none; }
.menu-btn:active { transform: scale(0.95); box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3); }

.custom-menu-btn { background: linear-gradient(135deg, #3b82f6, #2563eb) !important; box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3) !important; }
.custom-menu-btn:active { box-shadow: 0 2px 5px rgba(59, 130, 246, 0.3) !important; }

.custom-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--text-muted); background: var(--menu-bg); color: var(--text-primary); font-size: 15px; font-family: inherit; }
.custom-input:focus { outline: 2px solid #3b82f6; border-color: transparent; }

.auth-container { margin: auto; width: 85%; max-width: 400px; background: var(--menu-bg); padding: 30px 20px; border-radius: 15px; box-shadow: 0 4px 15px var(--menu-shadow); display: flex; flex-direction: column; gap: 15px; text-align: center; }
.auth-container h2 { margin: 0; color: var(--text-primary); font-size: 24px; }
.auth-message { padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.4; text-align: left; background: rgba(239, 68, 68, 0.12); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.password-rules { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: -6px; text-align: left; }
.password-rules span { font-size: 11.5px; line-height: 1.4; color: var(--text-muted); transition: color 0.15s ease; }
.password-rules span::before { content: "○ "; font-weight: bold; }
.password-rules span.valid { color: #10b981; }
.password-rules span.valid::before { content: "✓ "; }

.account-status-icon { font-size: 44px; line-height: 1; }
.account-status-text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.account-status-note { margin: -6px 0 0; min-height: 16px; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }

.remember-me-row {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 500; color: var(--text-secondary);
    cursor: pointer; user-select: none; align-self: flex-start; margin-top: -4px;
}
.remember-me-row input[type="checkbox"] {
    width: 17px; height: 17px; accent-color: #10b981; cursor: pointer; margin: 0;
}

.auth-buttons { display: flex; gap: 10px; width: 100%; }
.auth-buttons button { flex: 1; padding: 12px; }
.divider { margin: 10px 0; color: var(--text-muted); font-size: 14px; position: relative; text-align: center; }
.divider::before, .divider::after { content: ''; position: absolute; top: 50%; width: 28%; height: 1px; background: var(--text-muted); opacity: 0.3; }
.divider::before { left: 0; }
.divider::after { right: 0; }
.auth-google-btn { background: #fff !important; color: #3c4043 !important; border: 1px solid #dadce0 !important; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px !important; box-shadow:none; }

/* Kullanıcı Ayarları, Sıralama Butonları & Admin Panel Stilleri */
.panel-container { width: 90%; max-width: 600px; margin: 8vh auto 10vh auto; display: flex; flex-direction: column; gap: 15px; color: var(--text-primary); }
.panel-container h2 { margin: 0; text-align: center; font-size: 22px; }
.panel-subtitle { margin: 0; font-size: 13px; color: var(--text-muted); text-align: center; }
.panel-list { display: flex; flex-direction: column; gap: 12px; }
.panel-card { background: var(--menu-bg); border: 1px solid rgba(127,140,141,0.25); border-radius: 12px; padding: 14px; box-shadow: 0 2px 6px var(--menu-shadow); }
.panel-card-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: bold; font-size: 16px; }
.step-Target-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 8px; border-top: 1px dashed rgba(127,140,141,0.2); font-size: 14px; color: var(--text-secondary); gap: 10px; }
.step-controls-group { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.step-target-input { width: 76px !important; text-align: center; padding: 6px !important; }

.order-btn-group { display: inline-flex; gap: 4px; align-items: center; flex-shrink: 0; }
.order-btn {
    width: 28px; height: 28px; border-radius: 6px;
    border: 1px solid var(--text-muted); background: var(--bg-color);
    color: var(--text-primary); font-size: 12px; font-weight: bold;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; user-select: none; padding: 0;
}
.order-btn:active { transform: scale(0.9); background: #10b981; color: #fff; border-color: #10b981; }

.admin-toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.small-btn { padding: 6px 10px; border-radius: 6px; border: none; font-size: 12px; font-weight: bold; cursor: pointer; background: #3b82f6; color: #fff; }
.small-btn.danger { background: #ef4444; }

/* 10.000 İhlas Günlük Çetele Stilleri (Sayaç Düğmesinin Altında) */
.history-open-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff; border: none; padding: 10px 18px; border-radius: 20px;
    font-size: 14px; font-weight: bold; cursor: pointer;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.35);
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 16px; margin-bottom: 4px; user-select: none; transition: transform 0.15s;
}
.history-open-btn:active { transform: scale(0.95); }

.history-summary-box {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-color); padding: 12px 14px; border-radius: 10px;
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.history-list {
    display: flex; flex-direction: column; gap: 8px;
    max-height: 45vh; overflow-y: auto; padding-right: 4px;
}
.history-row {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-color); padding: 10px 12px; border-radius: 8px;
    font-size: 14px; border: 1px solid rgba(127, 140, 141, 0.2);
}
.history-date { font-weight: 600; color: var(--text-primary); }
.history-count-badge {
    background: rgba(16, 185, 129, 0.15); color: #10b981;
    padding: 4px 10px; border-radius: 12px; font-weight: bold; font-size: 13px;
}

/* Admin & Çetele Modal */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.6); z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 15px; box-sizing: border-box; }
.modal-card { background: var(--menu-bg); color: var(--text-primary); width: 100%; max-width: 560px; max-height: 88vh; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.modal-card h3 { margin: 0 0 5px 0; }
.form-label { font-size: 12px; font-weight: bold; color: var(--text-secondary); display: block; margin-bottom: 4px; }
.steps-header { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-weight: bold; font-size: 14px; }
.admin-steps-container { display: flex; flex-direction: column; gap: 12px; max-height: 42vh; overflow-y: auto; padding-right: 4px; }
.admin-step-box { border: 1px solid var(--text-muted); border-radius: 10px; padding: 10px; background: var(--bg-color); display: flex; flex-direction: column; gap: 8px; }
.modal-actions { display: flex; gap: 10px; margin-top: 8px; }

.back-btn { position: absolute; top: 2vh; left: 4vw; font-size: 4vh; color: var(--text-primary); z-index: 10; padding: 10px; cursor: pointer; user-select: none; }
.content-area { flex: 1; display: flex; flex-direction: column; text-align: center; padding: 0 4vw 6vh 4vw; margin-top: 8vh; direction: rtl; overflow-y: auto; }

.arabic-text { font-weight: 400 !important; text-align: center !important; direction: rtl; color: var(--text-arabic); font-family: var(--arabic-font) !important; font-size: calc(clamp(24px, 4.5vh, 48px) * var(--font-scale)); line-height: normal; padding-bottom: 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; display: inline; word-wrap: break-word; }
.bismillah { font-weight: 400 !important; text-align: center !important; font-family: var(--arabic-font) !important; font-size: calc(clamp(22px, 4vh, 40px) * var(--font-scale)); margin-top: 3vh; margin-bottom: 2vh; color: var(--text-primary); direction: rtl; cursor: pointer; -webkit-tap-highlight-color: transparent; display: block; width: 100%; }
.turkish-text { display: none; color: var(--text-secondary); font-size: calc(clamp(16px, 2.5vh, 24px) * var(--font-scale)); line-height: 1.5; font-weight: 500; margin: 2vh 0; width: 100%; text-align: center; direction: ltr; }
.bismillah-wrapper { display: inline; }
body.listening-active .bismillah-wrapper { display: flex; flex-direction: row; width: 100%; justify-content: center; align-items: center; margin-bottom: 1vh; }
body.listening-active .bismillah-wrapper .bismillah { flex: 1; text-align: center !important; }
.source-text { color: var(--text-muted); font-size: clamp(14px, 2vh, 20px); font-style: italic; margin-top: 2vh; margin-bottom: 4vh; text-align: center; width: 100%; display: block; direction: ltr; }

.counter-section { min-height: 24vh; display: flex; flex-direction: column; justify-content: center; align-items: center; flex-shrink: 0; width: 100%; direction: ltr; padding-bottom: 52px; }
.counter-wrapper { position: relative; display: inline-flex; }
.counter-btn { width: 17vh; height: 17vh; border-radius: 50%; background: linear-gradient(135deg, #10b981, #059669); border: 4px solid var(--counter-border); box-shadow: 0 1vh 2vh rgba(16, 185, 129, 0.4); color: white; font-size: 5vh; font-weight: bold; display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: all 0.15s ease; }
.counter-btn:active { transform: scale(0.92); }
.counter-btn.completed { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 1vh 2vh rgba(239, 68, 68, 0.4); font-size: 2.8vh; line-height: 1.2; padding: 10px; }
.reset-btn { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 15px; width: 6vh; height: 6vh; border-radius: 50%; background: linear-gradient(135deg, #ef4444, #b91c1c); border: 3px solid var(--counter-border); box-shadow: 0 0.5vh 1vh rgba(239, 68, 68, 0.4); color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: all 0.15s ease; }
.reset-btn:active { transform: translateY(-50%) scale(0.85); }

.rukye-slide { display: none; width: 100%; animation: fadeIn 0.3s; text-align: center; margin: auto 0; }
.rukye-slide.active { display: block; }
.surah-title { position: relative; font-family: var(--arabic-font) !important; color: var(--text-arabic); margin: 2vh auto 4vh auto; padding: 12px 10px; width: 95%; max-width: 450px; text-align: center; display: block; background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.15) 50%, transparent 100%); border-top: 2px solid #d4af37; border-bottom: 2px solid #d4af37; font-weight: bold !important; font-size: calc((1.5em + 4pt) * var(--font-scale)) !important; direction: rtl; }
.surah-title::before { content: ''; position: absolute; top: 3px; bottom: 3px; left: 0; right: 0; border-top: 1px solid rgba(212, 175, 55, 0.5); border-bottom: 1px solid rgba(212, 175, 55, 0.5); pointer-events: none; }
.verse-group { display: inline; }
.controls-section { height: 12vh; display: flex; justify-content: space-between; align-items: center; padding: 0 4vw; flex-shrink: 0; width: 100%; box-sizing: border-box; direction: ltr; }
.nav-btn { background: linear-gradient(135deg, #10b981, #059669); color: white; border: none; padding: 1.5vh 4vw; border-radius: 25px; font-size: clamp(16px, 2.5vh, 24px); font-weight: bold; cursor: pointer; box-shadow: 0 0.5vh 1vh rgba(16, 185, 129, 0.4); user-select: none; transition: all 0.15s ease; min-width: 120px; }
.nav-btn:active { transform: scale(0.95); }
.finish-btn { background: linear-gradient(135deg, #3498db, #2980b9); box-shadow: 0 0.5vh 1vh rgba(52, 152, 219, 0.4); }
.dua-container { display: none; width: 100%; flex: 1; flex-direction: column; }
.dua-container.active { display: flex; }

#bottom-menu { position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--menu-bg); box-shadow: 0 -2px 10px var(--menu-shadow); transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 2000; border-top-left-radius: 20px; border-top-right-radius: 20px; }
#bottom-menu.open { transform: translateY(0); }
#bottom-menu-handle { position: absolute; top: -35px; left: 50%; transform: translateX(-50%); background-color: var(--menu-bg); color: var(--text-primary); width: 70px; height: 35px; border-top-left-radius: 35px; border-top-right-radius: 35px; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; box-shadow: 0 -3px 5px var(--menu-shadow); }
#bottom-menu-handle::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 10px; background-color: var(--menu-bg); }
#bottom-menu-content { padding: 20px 4vw 30px 4vw; display: flex; flex-direction: column; gap: 20px; color: var(--text-primary); }
.menu-row { display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-weight: bold; }
.theme-buttons { display: flex; gap: 10px; }
.theme-buttons button { border: 1px solid var(--text-muted); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-weight: bold; background: transparent; color: var(--text-primary); transition: all 0.2s; }
.theme-buttons button.active { background-color: var(--text-primary); color: var(--bg-color); border-color: var(--text-primary); }
.action-btn { background: #34495e; color: white; border: none; padding: 10px 15px; border-radius: 8px; font-size: 15px; font-weight: bold; cursor: pointer; transition: 0.2s; flex: 1; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.action-btn:active { transform: scale(0.95); }
.exit-btn { background: #e74c3c; }

.switch { position: relative; display: inline-block; width: 50px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .3s; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .3s; }
input:checked + .slider { background-color: #10b981; }
input:checked + .slider:before { transform: translateX(22px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

.verse-group { display: inline; }
.arabic-text-wrapper { display: inline; }
.arabic-text { display: inline; word-wrap: break-word; }
.turkish-text { display: none !important; }
body.listening-active .verse-group { display: block; margin-bottom: 1vh; }
body.listening-active .arabic-text-wrapper { display: flex; flex-direction: row; width: 100%; justify-content: flex-start; align-items: flex-start; margin-bottom: 1vh; }
body.listening-active .arabic-text-wrapper .arabic-text { text-align: right !important; display: block; flex: 1; }
.listen-btn { display: none; cursor: pointer; font-size: 26px; margin-right: 15px; color: #10b981; flex-shrink: 0; user-select: none; margin-top: 5px; }
body.listening-active .listen-btn { display: flex; }
body.meal-mode-active .verse-group { display: block !important; margin-bottom: 2vh; text-align: center; }
body.meal-mode-active .arabic-text-wrapper { display: block !important; width: 100%; text-align: center; }
body.meal-mode-active .arabic-text { display: inline !important; text-align: center !important; }
body.meal-mode-active .turkish-text { display: none !important; color: var(--text-secondary); font-size: clamp(16px, 2.5vh, 24px); line-height: 1.5; font-weight: 500; margin: 1vh 0 2vh 0; width: 100%; text-align: center; direction: ltr; }
body.meal-mode-active .turkish-text.show { display: block !important; animation: fadeIn 0.3s ease-in-out; }
body:not(.meal-mode-active) .arabic-text { line-height: calc(1.5em + 30px) !important; }
body:not(.meal-mode-active) .arabic-text-wrapper { margin-bottom: 8px !important; }

.ayah-sign-container { display: inline-flex; align-items: center; justify-content: center; width: 1.7em; height: 1.7em; margin: 0 8px; background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="%23d4af37" stroke-width="4"><rect x="18" y="18" width="64" height="64" rx="4"/><rect x="18" y="18" width="64" height="64" rx="4" transform="rotate(45 50 50)"/><circle cx="50" cy="50" r="24" stroke-width="2"/></g></svg>') no-repeat center; background-size: contain; vertical-align: middle; }
.ayah-sign-number { font-size: 0.55em !important; color: var(--text-arabic); font-weight: bold; font-family: Arial, sans-serif; transform: translateY(2%); line-height: 1; }
.arabic-text, .turkish-text, .bismillah, .surah-title, .verse-group { user-select: none; -webkit-user-select: none; }

#splash-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: var(--bg-color); display: flex; align-items: center; justify-content: center; z-index: 9999; transition: opacity 0.5s ease-out, visibility 0.5s ease-out; }
#splash-screen img { width: 150px; height: auto; }
#splash-screen.hidden { opacity: 0; visibility: hidden; }