/**
 * Die drei ??? Statistiken - Styles
 * Modulare CSS-Datei für das Statistiken-Dashboard
 */

/* ============================================
   BASE & VARIABLES
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-dark: #0a0a12;
    --bg-card: #12121c;
    --bg-card-hover: #1a1a28;
    --text: #e5e5e5;
    --text-dim: #888;
    --text-bright: #ffffff;
    --border: rgba(255,255,255,0.08);
    --ddf-rot: #C50009;
    --ddf-blau: #01A4E7;
    --ddf-weiss: #ffffff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 30px; background: #011828;
    border-bottom: 1px solid var(--border);
}
.header-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.header-logo { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 2.5em; }
.header-logo .q1 { color: #ffffff; }
.header-logo .q2 { color: var(--ddf-rot); }
.header-logo .q3 { color: var(--ddf-blau); }
.header-text { display: flex; flex-direction: column; line-height: 1.2; }
.header-title { font-family: 'Oswald', sans-serif; font-weight: 700; color: var(--text-bright); font-size: 1.28em; }
.header-slogan { font-size: 0.75em; color: #ffffff; }
.header-nav { display: flex; gap: 10px; }
.header-btn { padding: 8px 16px; border-radius: 8px; font-size: 0.85em; font-weight: 600; cursor: pointer; transition: all 0.2s; text-decoration: none; background: transparent; color: var(--text); border: 1px solid var(--border); }
.header-btn:hover { border-color: var(--ddf-blau); color: var(--ddf-blau); }

/* ============================================
   HERO SECTION
   ============================================ */
.stats-hero {
    background: linear-gradient(135deg, #011828 0%, #0a0a12 100%);
    padding: 50px 30px 30px; text-align: center;
}
.stats-hero h1 { font-family: 'Oswald', sans-serif; font-size: 3em; font-weight: 700; color: var(--text-bright); margin-bottom: 10px; }
.stats-hero p { font-size: 1em; color: var(--text-dim); max-width: 600px; margin: 0 auto; }

/* ============================================
   BIG NUMBERS
   ============================================ */
.big-numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; max-width: 1000px; margin: 30px auto; padding: 0 30px; }
.big-number-card { background: var(--bg-card); border-radius: 12px; padding: 20px; text-align: center; border: 1px solid var(--border); }
.big-number { font-family: 'Oswald', sans-serif; font-size: 2.2em; font-weight: 700; color: var(--ddf-blau); line-height: 1; }
.big-number-label { font-size: 0.8em; color: var(--text-dim); margin-top: 5px; }

/* ============================================
   TABS
   ============================================ */
.tabs-container { max-width: 1200px; margin: 0 auto; padding: 0 30px; }
.tabs-nav { display: flex; gap: 4px; margin-bottom: 30px; background: var(--bg-card); border-radius: 12px; padding: 4px; }
.tab-btn { flex: 1; padding: 14px 10px; background: transparent; border: none; color: var(--text-dim); font-family: 'Oswald', sans-serif; font-size: 0.95em; font-weight: 600; cursor: pointer; transition: all 0.2s; border-radius: 8px; white-space: nowrap; text-transform: uppercase; text-align: center; }
.tab-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.tab-btn.active { background: var(--ddf-rot); color: var(--text-bright); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Filter Buttons */
.filter-btn {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 20px;
}
.filter-btn:hover {
    color: var(--text);
    background: var(--bg-card-hover);
    border-color: rgba(255,255,255,0.15);
}
.filter-btn.active {
    background: var(--ddf-blau);
    color: var(--text-bright);
    border-color: var(--ddf-blau);
}

/* ============================================
   SECTIONS & CHARTS
   ============================================ */
.section-title { font-family: 'Oswald', sans-serif; font-size: 1.5em; font-weight: 700; color: var(--text-bright); margin: 40px 0 20px; display: flex; align-items: center; gap: 10px; text-transform: uppercase; }
.section-title:first-child { margin-top: 0; }
.section-title::before { content: ''; width: 4px; height: 24px; background: var(--ddf-rot); border-radius: 2px; }

.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.chart-grid-3 { grid-template-columns: repeat(3, 1fr); }
.chart-card { background: var(--bg-card); border-radius: 12px; padding: 20px; border: 1px solid var(--border); }
.chart-card.full-width { grid-column: 1 / -1; }
.chart-card h3 { font-family: 'Oswald', sans-serif; font-size: 1em; font-weight: 600; color: var(--text-bright); margin-bottom: 15px; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.chart-card h3::before { content: ''; width: 3px; height: 14px; background: var(--ddf-rot); border-radius: 2px; }
.chart-container { position: relative; height: 280px; }
.chart-container.tall { height: 350px; }
.chart-container.short { height: 180px; }

/* ============================================
   DETECTIVE CARDS
   ============================================ */
.detective-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.detective-card { background: var(--bg-card); border-radius: 12px; padding: 25px; text-align: center; border: 1px solid var(--border); position: relative; overflow: hidden; }
.detective-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.detective-card.justus::before { background: var(--ddf-weiss); }
.detective-card.peter::before { background: var(--ddf-rot); }
.detective-card.bob::before { background: var(--ddf-blau); }
.detective-avatar { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-family: 'Oswald', sans-serif; font-size: 1.8em; font-weight: 700; }
.detective-card.justus .detective-avatar { background: var(--ddf-weiss); color: var(--bg-dark); }
.detective-card.peter .detective-avatar { background: var(--ddf-rot); color: white; }
.detective-card.bob .detective-avatar { background: var(--ddf-blau); color: white; }
.detective-name { font-family: 'Oswald', sans-serif; font-size: 1.2em; font-weight: 700; color: var(--text-bright); margin-bottom: 15px; }
.detective-stats { text-align: left; }
.detective-stat { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 0.85em; }
.detective-stat:last-child { border-bottom: none; }
.detective-stat-label { color: var(--text-dim); }
.detective-stat-value { font-weight: 600; color: var(--text-bright); }

/* ============================================
   RANKINGS
   ============================================ */
.ranking-list { display: flex; flex-direction: column; gap: 6px; }
.ranking-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: rgba(255,255,255,0.02); border-radius: 8px; }
.ranking-item:hover { background: rgba(255,255,255,0.05); }
.ranking-pos { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.1em; color: var(--text-dim); width: 28px; text-align: center; }
.ranking-info { flex: 1; min-width: 0; }
.ranking-title { font-weight: 600; color: var(--text-bright); font-size: 0.9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking-subtitle { font-size: 0.75em; color: var(--text-dim); }
.ranking-value { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1em; color: var(--ddf-rot); }

/* ============================================
   PHRASE CLOUD
   ============================================ */
.phrase-cloud { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.phrase-tag { padding: 8px 14px; background: rgba(1, 164, 231, 0.12); border: 1px solid rgba(1, 164, 231, 0.25); border-radius: 100px; font-size: 0.85em; color: var(--ddf-blau); }
.phrase-tag .count { font-weight: 700; margin-left: 5px; opacity: 0.7; }

/* ============================================
   FEAR INDEX
   ============================================ */
.fear-meter { background: var(--bg-card); border-radius: 12px; padding: 25px; border: 1px solid var(--border); text-align: center; }
.fear-meter h3 { font-family: 'Oswald', sans-serif; font-size: 1.2em; color: var(--text-bright); margin-bottom: 15px; }
.fear-meter-value { font-family: 'Oswald', sans-serif; font-size: 4em; font-weight: 700; color: var(--ddf-rot); line-height: 1; }
.fear-meter-label { font-size: 0.9em; color: var(--text-dim); margin-top: 10px; }
.fear-comparison { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.fear-char { text-align: center; }
.fear-char-value { font-family: 'Oswald', sans-serif; font-size: 1.5em; font-weight: 700; }
.fear-char-name { font-size: 0.8em; color: var(--text-dim); }

/* ============================================
   DIALOG MATRIX
   ============================================ */
.dialog-matrix { width: 100%; border-collapse: collapse; text-align: center; }
.dialog-matrix th { padding: 10px 8px; font-family: 'Oswald', sans-serif; font-weight: 600; color: var(--text-bright); background: rgba(255,255,255,0.05); }
.dialog-matrix td { padding: 12px 8px; font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 1.1em; color: var(--text-bright); border-bottom: 1px solid var(--border); }
.dialog-matrix .matrix-label { text-align: left; color: var(--text-dim); font-size: 0.9em; }

/* ============================================
   TIMELINE
   ============================================ */
.timeline-container { position: relative; }
.timeline-scroll { display: flex; flex-direction: column; gap: 8px; max-height: 500px; overflow-y: auto; padding: 20px; background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border); }
.timeline-scroll::-webkit-scrollbar { width: 8px; }
.timeline-scroll::-webkit-scrollbar-track { background: var(--bg-dark); border-radius: 4px; }
.timeline-scroll::-webkit-scrollbar-thumb { background: var(--ddf-rot); border-radius: 4px; }
.timeline-item { display: flex; align-items: center; gap: 15px; padding: 12px 15px; background: rgba(255,255,255,0.02); border-radius: 10px; cursor: pointer; transition: all 0.2s; border: 2px solid transparent; }
.timeline-item:hover { background: rgba(255,255,255,0.05); }
.timeline-item.active { background: rgba(197, 0, 9, 0.15); border-color: var(--ddf-rot); }
.timeline-cover { width: 50px; height: 50px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.timeline-info { flex: 1; min-width: 0; }
.timeline-number { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.1em; color: var(--ddf-rot); }
.timeline-title { font-size: 0.9em; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-year { font-size: 0.75em; color: var(--text-dim); }
.timeline-rating { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.2em; color: var(--ddf-blau); flex-shrink: 0; }

.timeline-detail { margin-top: 20px; background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.timeline-detail-header { display: flex; gap: 20px; padding: 25px; background: linear-gradient(135deg, rgba(197, 0, 9, 0.1) 0%, transparent 100%); }
.timeline-detail-cover { width: 150px; height: 150px; border-radius: 10px; object-fit: cover; box-shadow: 0 8px 25px rgba(0,0,0,0.4); }
.timeline-detail-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.timeline-detail-number { font-family: 'Oswald', sans-serif; font-size: 0.9em; color: var(--ddf-rot); text-transform: uppercase; letter-spacing: 1px; }
.timeline-detail-title { font-family: 'Oswald', sans-serif; font-size: 1.8em; font-weight: 700; color: var(--text-bright); margin: 5px 0 10px; }
.timeline-detail-meta { display: flex; flex-wrap: wrap; gap: 15px; font-size: 0.85em; color: var(--text-dim); }
.timeline-detail-meta span { display: flex; align-items: center; gap: 5px; }
.timeline-detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; padding: 20px 25px; border-top: 1px solid var(--border); }
.timeline-stat { text-align: center; }
.timeline-stat-value { font-family: 'Oswald', sans-serif; font-size: 1.5em; font-weight: 700; color: var(--ddf-blau); }
.timeline-stat-label { font-size: 0.75em; color: var(--text-dim); margin-top: 3px; }
.timeline-detail-link { display: block; padding: 15px 25px; background: var(--ddf-rot); color: white; text-align: center; text-decoration: none; font-family: 'Oswald', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: background 0.2s; }
.timeline-detail-link:hover { background: #a00007; }

/* ============================================
   DIALOGFLUSS VISUALISIERUNG
   ============================================ */
.dialogfluss-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border);
}
.dialogfluss-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.dialogfluss-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.dialogfluss-select {
    padding: 10px 15px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9em;
    cursor: pointer;
    min-width: 200px;
}
.dialogfluss-select:focus {
    outline: none;
    border-color: var(--ddf-blau);
}
.dialogfluss-btn {
    padding: 10px 20px;
    background: var(--ddf-rot);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dialogfluss-btn:hover {
    background: #a00007;
}
.dialogfluss-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.dialogfluss-btn.secondary {
    background: var(--bg-dark);
    border: 1px solid var(--border);
}
.dialogfluss-btn.secondary:hover {
    border-color: var(--ddf-blau);
    color: var(--ddf-blau);
}
.dialogfluss-btn.active {
    background: var(--ddf-blau);
}
.dialogfluss-speed-btns {
    display: flex;
    gap: 5px;
}
.dialogfluss-speed-btn {
    padding: 8px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s;
}
.dialogfluss-speed-btn:hover {
    border-color: var(--text-dim);
}
.dialogfluss-speed-btn.active {
    background: var(--ddf-blau);
    border-color: var(--ddf-blau);
    color: white;
}
.dialogfluss-canvas {
    width: 100%;
    aspect-ratio: 16/9;
    background: #ffffff;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.03);
}
.dialogfluss-canvas svg {
    width: 100%;
    height: 100%;
}
.dialogfluss-progress {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.dialogfluss-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.dialogfluss-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ddf-blau), var(--ddf-rot));
    width: 0%;
    transition: width 0.1s linear;
}
.dialogfluss-time {
    font-family: 'Oswald', sans-serif;
    font-size: 0.9em;
    color: var(--text-dim);
    min-width: 100px;
    text-align: right;
}
.dialogfluss-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
    justify-content: center;
}
.dialogfluss-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75em;
    color: var(--text-dim);
}
.dialogfluss-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ============================================
   WORD CLOUD
   ============================================ */
#wordCloudCanvas text.active-word {
    opacity: 1 !important;
    font-weight: 700 !important;
    filter: drop-shadow(0 0 3px currentColor);
}
#wordCloudCanvas text:not(.active-word) {
    opacity: 0.3 !important;
    transition: opacity 0.15s ease;
}

/* ============================================
   STREAMGRAPH
   ============================================ */
.streamgraph-tab-btn {
    padding: 10px 20px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}
.streamgraph-tab-btn:hover {
    border-color: var(--ddf-blau);
    color: var(--ddf-blau);
}
.streamgraph-tab-btn.active {
    background: var(--ddf-rot);
    border-color: var(--ddf-rot);
    color: white;
}

/* ============================================
   NETWORK TOOLTIP
   ============================================ */
.network-tooltip {
    position: absolute;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85em;
    pointer-events: none;
    z-index: 1000;
    max-width: 250px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.network-tooltip strong {
    color: var(--ddf-blau);
    display: block;
    margin-bottom: 4px;
}

/* ============================================
   CHARAKTER-UNIVERSUM ANIMATIONS
   ============================================ */
@keyframes flowLine {
    0% { stroke-dashoffset: 20; }
    100% { stroke-dashoffset: 0; }
}
@keyframes pulseNode {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes glowPulse {
    0%, 100% { filter: drop-shadow(0 0 3px currentColor); }
    50% { filter: drop-shadow(0 0 8px currentColor); }
}
.char-node circle {
    transition: all 0.3s ease;
}
.char-node:hover circle {
    transform: scale(1.15);
}
.char-node.main-char circle {
    animation: glowPulse 3s ease-in-out infinite;
}
.animated-link {
    stroke-dasharray: 5 5;
    animation: flowLine 1s linear infinite;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer { display: flex; justify-content: space-between; align-items: center; height: 70px; padding: 0 30px; background: #011828; margin-top: 50px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.8em; }
.footer-logo .q1 { color: #ffffff; }
.footer-logo .q2 { color: var(--ddf-rot); }
.footer-logo .q3 { color: var(--ddf-blau); }
.footer-text { display: flex; flex-direction: column; line-height: 1.2; }
.footer-title { font-family: 'Oswald', sans-serif; font-weight: 700; color: var(--text-bright); font-size: 0.9em; }
.footer-slogan { font-size: 0.7em; color: #ffffff; }
.footer-nav { display: flex; gap: 15px; }
.footer-nav a { color: #ffffff; text-decoration: none; font-size: 0.75em; }
.footer-nav a:hover { color: var(--ddf-blau); }

/* ============================================
   LOADING
   ============================================ */
.loading { display: flex; flex-direction: column; align-items: center; padding: 80px 20px; }
.loading-spinner { width: 50px; height: 50px; border: 4px solid var(--border); border-top-color: var(--ddf-blau); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { margin-top: 15px; color: var(--text-dim); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .big-numbers { grid-template-columns: repeat(2, 1fr); }
    .chart-grid, .chart-grid-3, .detective-grid { grid-template-columns: 1fr; }
    .stats-hero h1 { font-size: 2.2em; }
    .tabs-nav { flex-wrap: wrap; }
    .tab-btn { flex: 1 1 auto; min-width: calc(33% - 4px); padding: 10px 8px; font-size: 0.8em; }
}

@media (max-width: 600px) {
    .site-header { padding: 10px 15px; }
    .header-text { display: none; }
    .stats-hero { padding: 30px 15px 20px; }
    .stats-hero h1 { font-size: 1.8em; }
    .big-numbers { padding: 0 15px; gap: 10px; }
    .big-number-card { padding: 15px 10px; }
    .big-number { font-size: 1.8em; }
    .tabs-container { padding: 0 15px; }
    .tab-btn { min-width: calc(50% - 4px); padding: 10px 6px; font-size: 0.75em; }
    .timeline-detail-header { flex-direction: column; align-items: center; text-align: center; }
    .timeline-detail-cover { width: 120px; height: 120px; }
    .timeline-detail-meta { justify-content: center; }
    .timeline-detail-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   EPISODES MODAL
   ============================================ */
.episodes-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}
.episodes-modal-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.episodes-modal {
    background: var(--bg-card);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    margin: 40px auto;
    border: 1px solid var(--border);
    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
    animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.episodes-modal-header {
    padding: 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.episodes-modal-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-bright);
}
.episodes-modal-subtitle {
    font-size: 0.9em;
    color: var(--text-dim);
    margin-top: 4px;
}
.episodes-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--text);
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.episodes-modal-close:hover {
    background: var(--ddf-rot);
    color: white;
}
.episodes-modal-content {
    padding: 20px 25px;
    max-height: 60vh;
    overflow-y: auto;
}
.episodes-modal-content::-webkit-scrollbar {
    width: 8px;
}
.episodes-modal-content::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 4px;
}
.episodes-modal-content::-webkit-scrollbar-thumb {
    background: var(--ddf-rot);
    border-radius: 4px;
}
.episode-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}
.episode-list-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--ddf-blau);
}
.episode-list-item:last-child {
    margin-bottom: 0;
}
.episode-list-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.episode-list-info {
    flex: 1;
    min-width: 0;
}
.episode-list-number {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 0.9em;
    color: var(--ddf-rot);
}
.episode-list-title {
    font-size: 0.95em;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.episode-list-meta {
    font-size: 0.8em;
    color: var(--text-dim);
}
.episode-list-rating {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.1em;
    color: var(--ddf-blau);
    flex-shrink: 0;
}
.episodes-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.episodes-modal-count {
    font-size: 0.85em;
    color: var(--text-dim);
}

/* D3 Chart klickbare Elemente */
.d3-clickable {
    cursor: pointer;
    transition: all 0.2s;
}
.d3-clickable:hover {
    filter: brightness(1.1);
}

/* ============================================
   EMOTIONEN TAB
   ============================================ */
.emotions-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--text-dim);
}

.emotion-select {
    appearance: none;
    cursor: pointer;
}

.emotion-select:focus {
    outline: none;
    border-color: var(--ddf-blau);
}

/* Three-column grid for character radars */
.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1200px) {
    .three-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .three-cols {
        grid-template-columns: 1fr;
    }
}

/* Similar Episodes List */
.similar-episodes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.similar-episode-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--bg-card);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.similar-episode-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--ddf-blau);
    transform: translateX(5px);
}

.similar-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ddf-blau), var(--ddf-rot));
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85em;
    color: #fff;
    flex-shrink: 0;
}

.similar-info {
    flex: 1;
    min-width: 0;
}

.similar-title {
    font-size: 0.9em;
    color: var(--text);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.similar-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.similar-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

.similar-score {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.1em;
    color: var(--ddf-blau);
    flex-shrink: 0;
}

/* Top Episodes Grid */
.emotion-top-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.emotion-top-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 15px;
    transition: transform 0.2s;
}

.emotion-top-card:hover {
    transform: translateY(-3px);
}

.emotion-top-card h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
}

.emotion-top-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.emotion-top-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.emotion-top-item:hover {
    background: rgba(255,255,255,0.08);
}

.emotion-top-rank {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    font-size: 0.75em;
    font-weight: 700;
    color: var(--text-dim);
}

.emotion-top-title {
    font-size: 0.85em;
    color: var(--text);
}

/* ============================================
   RADAR POPUP
   ============================================ */
.radar-popup {
    position: absolute;
    z-index: 1000;
    min-width: 250px;
    max-width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    animation: popupFadeIn 0.2s ease;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.radar-popup-header {
    padding: 12px 15px;
    background: rgba(255,255,255,0.03);
    font-size: 0.95em;
}

.radar-popup-body {
    padding: 15px;
}

.radar-popup-score {
    font-size: 1.1em;
    margin-bottom: 8px;
}

.radar-popup-rank {
    color: var(--text-dim);
    font-size: 0.9em;
    margin-bottom: 8px;
}

.radar-popup-comparison {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.radar-popup-comparison.überdurchschnittlich {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.radar-popup-comparison.unterdurchschnittlich {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.radar-popup-comparison.durchschnittlich {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.radar-popup-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.radar-popup-label {
    font-size: 0.8em;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.radar-popup-episode {
    padding: 8px 10px;
    margin: 4px 0;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
}

.radar-popup-episode:hover {
    background: rgba(255,255,255,0.08);
    color: var(--ddf-blau);
}

/* ============================================
   EPISODE MAP TOOLTIP (Cover Version)
   ============================================ */
.episode-map-tooltip {
    position: fixed;
    z-index: 2000;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.6);
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.map-tooltip-content {
    display: flex;
    gap: 12px;
    padding: 10px;
}

.map-tooltip-cover {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
}

.map-tooltip-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-tooltip-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 140px;
}

.map-tooltip-episode {
    font-size: 0.8em;
    color: var(--text-dim);
    font-weight: 600;
}

.map-tooltip-title {
    font-size: 0.95em;
    color: var(--text-bright);
    font-weight: 600;
    line-height: 1.3;
}

.map-tooltip-emotion {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    font-weight: 500;
    margin-top: 4px;
}

.map-tooltip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Episode Map Legend */
.legend-item:hover {
    background: rgba(255,255,255,0.1) !important;
    transform: translateY(-1px);
}

.legend-item.active {
    background: rgba(255,255,255,0.15) !important;
    border: 1px solid rgba(255,255,255,0.2);
}
