:root {
    /* DARK THEME */
    --bg: #121212; --panel: #1e1e1e; --text: #e0e0e0;
    --text-dim: #a0a0a0; --text-translator: #88cc88; --text-correction: #ff8e8e;
    --accent: #4a9eff; --border: #333; --btn-bg: #2a2a2a;
    --btn-hover: #383838; --overlay: rgba(0,0,0,0.95); --note-bg: rgba(74,158,255,0.08);
}

body.light-theme {
    /* LIGHT THEME */
    --bg: #ffffff; --panel: #f5f5f5; --text: #1a1a1a;
    --text-dim: #555555; --text-translator: #2d662d; --text-correction: #b32d2d;
    --accent: #0056b3; --border: #ddd; --btn-bg: #e0e0e0;
    --btn-hover: #d0d0d0; --overlay: rgba(255,255,255,0.95); --note-bg: rgba(0,86,179,0.05);
}

body { background: var(--bg); color: var(--text); font-family: sans-serif; margin: 0; display: flex; flex-direction: column; height: 100vh; transition: background 0.3s; }

/* Header & Audio (Top) */
.header { background: var(--panel); padding: 10px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.audio-top { width: 100%; background: var(--panel); padding: 10px 0; border-bottom: 1px solid var(--border); text-align: center; }
audio { height: 32px; width: 90%; max-width: 800px; }

/* Control Bar */
.control-bar { background: var(--panel); padding: 8px 20px; border-bottom: 1px solid var(--border); display: flex; gap: 15px; align-items: center; font-size: 0.85em; }

/* Main Container */
.container { display: flex; flex: 1; overflow: hidden; gap: 1px; background: var(--border); }
.column { flex: 1; overflow-y: auto; padding: 30px; background: var(--bg); line-height: 1.7; }

/* Segments */
.segment { margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.id { font-size: 0.75em; color: var(--text-dim); font-weight: bold; display: block; margin-bottom: 5px; }
.text { color: var(--text); display: block; margin-bottom: 5px; font-size: 1.1em; }
.llr-text { color: var(--text-dim); display: block; font-size: 0.95em; margin-bottom: 8px; font-style: italic; }
.translator-comment { color: var(--text-translator); display: block; font-style: italic; font-size: 0.85em; margin-top: 10px; padding: 5px 10px; border-left: 2px solid var(--text-translator); }
.author-comment { color: var(--accent); display: block; font-style: italic; font-size: 0.85em; margin-top: 10px; background: var(--note-bg); padding: 10px; border-radius: 4px; }

/* UI Elements */
.btn-group { display: flex; gap: 5px; }
.btn { background: var(--btn-bg); color: var(--text); border: 1px solid var(--border); padding: 6px 12px; cursor: pointer; text-decoration: none; border-radius: 3px; font-size: 0.9em; font-family: monospace; }
.btn:hover { border-color: var(--accent); }
.btn.active { border-color: var(--accent); color: var(--accent); background: var(--note-bg); }
.btn:disabled { opacity: 0.2; cursor: not-allowed; }

.session-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 20px; }
.session-card { background: var(--panel); border: 1px solid var(--border); padding: 15px; text-decoration: none; color: var(--text); border-radius: 4px; display: flex; justify-content: space-between; }