:root {
    --bg-dark: #0b0413;
    --panel-bg: rgba(22, 10, 36, 0.85);
    --pink: #ff4389;
    --gold: #ffd23f;
    --border: rgba(255, 67, 137, 0.25);
    --text-white: #f5f3f7;
    --text-muted: #958ba0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* FEJLÉC */
header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 35px; border-bottom: 1px solid var(--border);
    background: rgba(14, 5, 23, 0.95);
}
.logo-box { display: flex; align-items: center; gap: 12px; }
.logo-vi { font-family: 'Rajdhani', sans-serif; font-size: 46px; font-weight: 700; color: var(--pink); line-height: 1; }
.site-title { font-size: 18px; font-weight: 900; letter-spacing: 1.5px; }
.site-sub { font-size: 11px; color: var(--text-muted); letter-spacing: 2px; }

nav { display: flex; gap: 10px; }
.nav-link {
    color: var(--text-muted); text-decoration: none; padding: 8px 16px;
    border-radius: 6px; font-weight: 700; font-size: 13px; text-transform: uppercase;
}
.nav-link.active, .nav-link:hover { color: #fff; background: rgba(255, 67, 137, 0.15); border: 1px solid var(--pink); }

.btn-export {
    background: #2ed573; color: #000; text-decoration: none; font-weight: 900;
    padding: 8px 18px; border-radius: 20px; font-size: 12px;
}

/* FŐ MUNKATERÜLET */
.main-workspace {
    flex: 1; display: flex; padding: 20px 35px; gap: 25px; overflow: hidden;
}

/* OLDALSÓ MENÜ (Settings & Glossary) */
.left-sidebar {
    width: 280px; display: flex; flex-direction: column; gap: 8px;
    overflow-y: auto; padding-right: 5px; flex-shrink: 0;
}
.sidebar-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 6px;
    color: var(--text-muted); text-decoration: none; font-weight: 700; font-size: 13px;
    transition: 0.15s;
}
.sidebar-item:hover { color: #fff; border-color: var(--pink); }
.sidebar-item.active { background: var(--pink); color: #fff; border-color: var(--pink); }
.sidebar-item .tag { font-size: 10px; padding: 2px 6px; background: rgba(0,0,0,0.3); border-radius: 3px; }

/* JOBB OLDALI PANEL (KÖZÖS) */
.right-viewport, .subtitles-list-panel {
    flex: 1; background: var(--panel-bg); border: 1px solid var(--border);
    border-radius: 8px; display: flex; flex-direction: column; overflow: hidden;
}
.panel-header {
    padding: 15px 20px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.panel-header h2 { font-size: 18px; font-weight: 900; }
.sub-hint { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.entry-count-badge { background: var(--pink); font-size: 11px; padding: 3px 8px; border-radius: 4px; font-weight: 700; }

.sub-scroll-area { flex: 1; overflow-y: auto; padding: 15px 20px; display: flex; flex-direction: column; gap: 12px; }
.sub-scroll-area::-webkit-scrollbar { width: 6px; }
.sub-scroll-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* BAL OSZLOP (Videó & Felirat nézet) */
.video-panel { width: 44%; display: flex; flex-direction: column; gap: 15px; flex-shrink: 0; }
.mission-selector-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 5px; }
.mission-pill {
    background: rgba(255,255,255,0.05); color: var(--text-muted);
    padding: 6px 12px; border-radius: 4px; font-size: 12px; text-decoration: none; white-space: nowrap;
}
.mission-pill.active { background: var(--pink); color: #fff; font-weight: 700; }

.player-wrapper {
    width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 8px;
    overflow: hidden; border: 1px solid var(--border);
}
.player-wrapper iframe, #ytplayer { width: 100%; height: 100%; }

/* ÉLŐ FELIRAT PREVIEW */
.active-sub-card {
    background: rgba(255, 67, 137, 0.08); border: 1px solid var(--pink);
    border-radius: 8px; padding: 15px 20px; text-align: center;
}
.sub-time-badge { font-family: monospace; font-size: 13px; color: var(--gold); margin-bottom: 8px; }
.sub-text-preview-en { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.sub-text-preview-hu { font-size: 18px; font-weight: 700; color: #fff; }

/* KÜLDETÉS FELIRAT KÁRTYÁK */
.sub-entry-row {
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px; padding: 12px; display: flex; gap: 15px; transition: 0.2s;
}
.sub-entry-row.active-playing {
    border-color: var(--pink); background: rgba(255, 67, 137, 0.12);
    box-shadow: 0 0 10px rgba(255, 67, 137, 0.3);
}
.sub-time-col { display: flex; flex-direction: column; gap: 6px; width: 120px; flex-shrink: 0; }
.sub-idx { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.badge-type { font-size: 10px; text-transform: uppercase; font-weight: 700; border-radius: 3px; padding: 2px 4px; text-align: center; }
.type-dialogue { background: #3742fa; color: #fff; }
.type-tutorial { background: #e67e22; color: #fff; }
.type-objective { background: #2ed573; color: #000; }
.type-screentext { background: #747d8c; color: #fff; }

.btn-jump {
    background: rgba(255, 67, 137, 0.2); border: 1px solid var(--pink);
    color: #fff; font-size: 11px; padding: 4px 6px; border-radius: 4px; cursor: pointer;
}
.btn-jump:hover { background: var(--pink); }

.sub-content-col { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.speaker-tag { font-size: 12px; font-weight: 700; color: var(--gold); }
.text-en-box { font-size: 13px; color: #dcdde1; line-height: 1.4; }
.text-hu-input {
    background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff; font-family: inherit; font-size: 13.5px; border-radius: 4px;
    padding: 8px; resize: vertical; min-height: 44px; outline: none;
}
.text-hu-input:focus { border-color: var(--pink); }

/* BEÁLLÍTÁSOK & SZÓTÁR KÁRTYÁK */
.setting-card, .glossary-card {
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px; padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.setting-row-main { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.setting-name-en { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.setting-input-hu {
    width: 100%; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--pink); font-size: 14px; font-weight: 700; padding: 6px 10px; border-radius: 4px; outline: none;
}
.setting-input-hu:focus { border-color: var(--pink); }
.setting-val-input {
    width: 100%; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border);
    color: var(--gold); font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 4px; outline: none; text-align: center;
}
.dual-desc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; font-size: 12.5px; }
.desc-en-box { color: var(--text-muted); line-height: 1.4; padding: 6px 0; }
.desc-hu-input {
    background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff; font-family: inherit; font-size: 12.5px; border-radius: 4px; padding: 8px;
    resize: vertical; min-height: 48px; outline: none;
}
.desc-hu-input:focus { border-color: var(--pink); }

.glossary-header { display: flex; justify-content: space-between; align-items: center; }
.term-en { font-size: 14px; font-weight: 700; color: #fff; }
.setting-input-context {
    width: 100%; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.1);
    color: #bbb; font-size: 12px; padding: 6px 10px; border-radius: 4px; outline: none;
}

/* KONTROLLER GOMBOK & HUD ELEMEK */
.btn-ctrl { background: #222; border: 1px solid #555; color: #fff; padding: 1px 5px; border-radius: 4px; font-size: 11px; }
.hud-pink { color: var(--pink); }
.hud-yellow { color: var(--gold); }
.hud-red { color: #ff4757; }

/* FEJEZET & KÜLDETÉS NAVIGÁCIÓ */
.mission-nav-bar {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.select-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.select-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}
.select-group select {
    background: #12061e;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 10px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}
.select-group select:focus {
    border-color: var(--pink);
}

/* FÜLEK A JOBB OLDALI PANELEN */
.filter-tab-bar {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.filter-tab-bar .tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-tab-bar .tab-btn:hover {
    color: #fff;
}
.filter-tab-bar .tab-btn.active {
    background: var(--pink);
    color: #fff;
}
.tab-count {
    background: rgba(0,0,0,0.4);
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 10px;
}

/* HASH BADGE ÉS KONTEXTUS INFO */
.badge-hash {
    font-family: monospace;
    font-size: 10px;
    color: var(--gold);
    background: rgba(255, 210, 63, 0.1);
    border: 1px solid rgba(255, 210, 63, 0.3);
    padding: 1px 4px;
    border-radius: 3px;
    text-align: center;
}
.context-hint {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: normal;
    margin-left: 8px;
    cursor: help;
}