:root { --prayer-text-size: 1.6rem; }
.timer-bar { background-color: var(--secondary-color); color: var(--primary-color); text-align: center; padding: 6px; font-size: 0.85rem; font-weight: bold; position: fixed; width: 100%; top: var(--header-height); z-index: 999; transition: opacity 0.5s ease, transform 0.5s ease;}
.timer-bar.fade-out { opacity: 0; transform: translateY(-100%); pointer-events: none; }
.tools-wrapper { position: sticky; top: calc(var(--header-height) + 1px); background: var(--bg-color); z-index: 900; border-bottom: 1px solid rgba(150,150,150,0.2); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.tools-explanation { font-size: 0.85rem; text-align: center; padding: 8px; background-color: rgba(150, 150, 150, 0.05); color: var(--text-color); }
.sticky-toolbar { display: flex; gap: 15px; align-items: center; justify-content: center; padding: 10px; flex-wrap: wrap; }

.letter-nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.nav-letter { width: 35px; height: 35px; background: var(--card-bg); color: var(--text-color); border-radius: 8px; display: flex; align-items: center; justify-content: center; text-decoration: none; font-weight: bold; box-shadow: 0 2px 4px rgba(0,0,0,0.1); border: 1px solid rgba(150,150,150,0.2); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.nav-letter:hover, .nav-letter:active { background: var(--secondary-color); color: var(--primary-color); transform: scale(1.15) translateY(-3px); box-shadow: 0 5px 12px rgba(0,0,0,0.15); }

/* התיקון לחיתוך! הוספתי פדינג גדול מאוד מראש העמוד כדי לנקות את הסרגל הנדבק */
.reading-layout { display: flex; flex-direction: column; gap: 20px; padding-top: 80px; }
@media (min-width: 900px) { .reading-layout { display: grid; grid-template-columns: 260px 1fr 230px; align-items: start; } }

.sidebar-box { background: var(--card-bg); padding: 20px; border-radius: var(--border-radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.sidebar-box h3 { font-size: 1.1rem; color: var(--primary-color); margin-bottom: 15px; border-bottom: 2px solid var(--secondary-color); padding-bottom: 5px;}
.sidebar-links { list-style: none; }
.sidebar-links li { margin-bottom: 10px; }
.sidebar-links a { color: var(--text-color); text-decoration: none; transition: 0.2s; display: block; padding: 5px; border-radius: 5px;}
.sidebar-links a:hover { background: rgba(150,150,150,0.1); padding-right: 10px; color: var(--secondary-color);}

.display-controls label { display: block; font-size: 0.9rem; font-weight: bold; margin-bottom: 5px; color: var(--text-color);}
.text-controls { display: flex; gap: 10px; margin-bottom: 15px;}
.tool-btn { flex: 1; background: var(--bg-color); color: var(--text-color); border: 1px solid rgba(150,150,150,0.3); border-radius: 6px; padding: 8px; font-weight: bold; cursor: pointer; transition: 0.2s;}
.tool-btn:hover, .tool-btn:active { background: var(--secondary-color); color: var(--primary-color);}
.form-select { width: 100%; padding: 10px; border-radius: 6px; border: 1px solid rgba(150,150,150,0.3); background: var(--bg-color); color: var(--text-color); font-family: inherit;}
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: normal; }

.main-prayer-content { background-color: var(--prayer-bg); padding: 30px; border-radius: var(--border-radius); box-shadow: var(--shadow); color: var(--text-color); }

#prayerContent { transition: all 0.3s ease; }
#prayerContent.font-heebo { font-family: 'Heebo', sans-serif; }
#prayerContent.font-frank { font-family: 'Frank Ruhl Libre', serif; }
#prayerContent.font-david { font-family: 'David Libre', serif; }
#prayerContent.font-taamey { font-family: 'Taamey Ashkenaz', serif; }
#prayerContent.text-bold { font-weight: 700; }
#prayerContent.text-bold .highlight-name { font-weight: 800; }

.prayer-header { text-align: center; margin-bottom: 35px; }
.prayer-header h1 { font-size: 1.2rem; opacity: 0.8; }
.highlight-name { font-size: calc(var(--prayer-text-size) * 1.3); color: var(--secondary-color); font-weight: 700; margin-top: 5px;}

.prayer-box-special { background-color: rgba(205, 164, 52, 0.05); padding: 25px; border-radius: 12px; margin-bottom: 35px; border: 1px solid rgba(205, 164, 52, 0.4); border-right: 5px solid var(--secondary-color); box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.prayer-text { font-size: var(--prayer-text-size); line-height: 1.8; text-align: justify;}

.letter-block { margin-bottom: 30px; scroll-margin-top: 180px; }
.letter-title { display: inline-block; background-color: var(--primary-color); color: white; width: 45px; height: 45px; line-height: 45px; text-align: center; border-radius: 50%; font-size: 1.5rem; font-weight: bold; margin-bottom: 15px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);}
.verse-item { margin-bottom: 15px; font-size: var(--prayer-text-size); padding-right: 15px; border-right: 1px solid rgba(150,150,150,0.2); }

.error-state { text-align: center; padding: 50px 20px; }
.error-state h1 { color: #dc2626; margin-bottom: 15px; font-size: 2rem;}
.error-state p { margin-bottom: 30px; font-size: 1.1rem;}
.error-state .btn-primary { display: inline-block; width: auto; min-width: 200px; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.8); z-index: 2000; display: flex; justify-content: center; align-items: center; padding: 20px; }
.modal-content { background: var(--card-bg); width: 100%; max-width: 400px; border-radius: var(--border-radius); padding: 30px; text-align: center; position: relative; }
.close-modal { position: absolute; top: 15px; left: 15px; background: none; border: none; font-size: 2rem; color: var(--text-color); cursor: pointer; }
.qr-container { background: white; padding: 15px; display: inline-block; border-radius: 10px; margin: 20px 0; border: 2px solid var(--secondary-color); }
.share-buttons { display: flex; flex-direction: column; gap: 10px; }
.share-btn { padding: 12px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 1rem; color: white;}
.copy-btn { background-color: var(--primary-color); }
.wa-btn { background-color: #25D366; }
.hidden { display: none !important; }
.loader-container { text-align: center; padding: 50px 0; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--bg-color); border-top: 4px solid var(--secondary-color); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 15px auto; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.end-of-prayer-actions { margin-top: 40px; padding-top: 30px; border-top: 2px dashed rgba(205, 164, 52, 0.4); }
.end-of-prayer-actions h3 { text-align: center; color: var(--secondary-color); margin-bottom: 25px; font-size: 1.3rem; }
.action-buttons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media(max-width: 600px) { .action-buttons-grid { grid-template-columns: 1fr; } }
.end-action-btn { background: var(--bg-color); color: var(--text-color); border: 2px solid var(--secondary-color); padding: 15px; border-radius: 10px; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(0,0,0,0.05); font-family: inherit; }
.end-action-btn:hover, .end-action-btn:active { background: var(--secondary-color); color: var(--primary-color); transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.1); }