:root { 
    --bg: #121212; --card: #1e1e1e; --text: #e0e0e0; 
    --primary: #bb86fc; --gold: #ffd700; --border: #333; --accent: #cf6679;
}
/* Improved Light Theme Visibility */
body.light-theme { 
    --bg: #fdfcf8; --card: #ffffff; --text: #1a1a1a; 
    --primary: #003366; --gold: #b8860b; --border: #d1cfc7; --accent: #c0392b;
}

body { font-family: 'Crimson Pro', serif; background: var(--bg); color: var(--text); margin: 0; transition: 0.3s; padding-top: 10px; }

.header-main { background: var(--card); border-bottom: 2px solid var(--border); padding: 10px; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }

.logo-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.logo-h { background: var(--primary); color: white; width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 24px; }

.controls-cluster { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; align-items: center; padding: 5px; }

.info-panel { 
    background: var(--primary); color: #fff; padding: 12px; margin: 10px auto; 
    max-width: 800px; border-radius: 8px; text-align: center; font-weight: bold;
}
body.light-theme .info-panel { color: #ffffff; }

.root-tag { background: rgba(255,255,255,0.2); padding: 2px 8px; border-radius: 4px; font-family: serif; border: 1px solid rgba(255,255,255,0.4); margin-left: 10px; }

.reader-container { max-width: 900px; margin: 20px auto; padding: 0 15px; }
.verse-box { background: var(--card); margin-bottom: 25px; padding: 25px; border-radius: 8px; border: 1px solid var(--border); position: relative; }

.v-num { position: absolute; left: -15px; top: 20px; background: var(--primary); color: white; width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 2px solid var(--bg); }

.hebrew-text { direction: rtl; font-family: 'Frank Ruhl Libre', serif; font-size: 32px; line-height: 2.2; text-align: right; }
.word { cursor: pointer; padding: 0 4px; border-radius: 4px; }
.word:hover { background: var(--gold); color: #000; }
.word.active { background: rgba(255, 215, 0, 0.4); outline: 1px solid var(--gold); }

.translation { font-size: 20px; color: var(--text); border-top: 1px solid var(--border); padding-top: 15px; margin-top: 10px; line-height: 1.6; }

.btn { padding: 6px 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 4px; cursor: pointer; font-size: 13px; }
.btn.active { background: var(--primary); color: white; }

.version-info { font-size: 10px; color: var(--text); opacity: 0.5; text-align: center; margin-top: 5px; }
input[type="range"] { accent-color: var(--primary); vertical-align: middle; }
