:root {
    --color-bg:             #f8f8f8;
    --color-bg-alt:         #f8f8f8;
    --color-bg-canvas:      #f8f8f8;
    --color-border:         #f8f8f8;
    --color-border-light:   #f8f8f8;
    --color-text:           #535252;
    --color-text-muted:     #535252;
    --color-accent-blue:    rgb(27, 27, 27);
    --color-accent-blue-lt: rgb(27, 27, 27);
    --color-accent-green:   rgb(27, 27, 27);
    --color-accent-yellow:  #fbbf24;
    --color-btn-secondary:  #475569;
    --color-btn-sec-hover:  #64748b;

    font-family: "Poppins", sans-serif;
}
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-drag: none;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #f8f8f8;
    font-family: "Poppins", sans-serif;
    /* FIX: War "color: #f8f8f8" bei ebenfalls #f8f8f8 Hintergrund ->
       jeder Text ohne eigene Farbangabe war unsichtbar. Jetzt die
       dunkle Textfarbe, die im Theme sonst überall verwendet wird. */
    color: var(--color-text);
}

#scroll-wrapper {
    width: 100%;
    height: calc(100% - 50px);
    overflow-y: scroll;
    scroll-snap-type: none;   /* oder Zeile ganz löschen */
    scroll-behavior: smooth;
    background: #f8f8f8;

}

#main-navbar {
    height: 50px;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    z-index: 100;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.nav-btn:hover       { color: var(--color-text); background: var(--color-border); }
.nav-btn.active-main { color: var(--color-accent-blue); background: rgba(56, 189, 248, 0.1); }

#sub-menu-bar {
    height: 0;
    background: var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    overflow: hidden;
    border-bottom: 0 solid transparent;
    transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
}
#sub-menu-bar.bar-active {
    height: 45px;
    border-bottom: 1px solid var(--color-border-light);
}

.sub-group        { display: none; gap: 10px; width: 100%; overflow-x: auto; }
.sub-group.active { display: flex; }

.sub-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    white-space: nowrap;
    transition: color 0.15s;
}
.sub-btn:hover      { color: var(--color-text); }
.sub-btn.active-sub { color: var(--color-accent-green); font-weight: 700; }

.page-section {
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
}

.section-details {
    background: var(--color-bg);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#close-panel-btn {
    align-self: flex-start;
    background: var(--color-border);
    border: 1px solid var(--color-border-light);
    color: var(--color-text);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.2s;
}
#close-panel-btn:hover { background: var(--color-border-light); }

#info-text {
    flex: 1;
    background: #f8f8f8;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 30px;
    overflow-y: auto;
    user-select: text;

    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    line-height: 1.5;
    text-align: left;

}
#info-text p {
    margin-bottom: 1.8rem;
}
#info-text h1,
#info-text h2,
#info-text h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

#map-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: var(--color-bg-canvas);
}

#panzoom-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: grab;
    will-change: transform;
    transform: translateZ(0);
    display: flex;
    align-items: center;
    justify-content: center;
    
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}
#panzoom-wrapper:active { cursor: grabbing; }

#map-base {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    aspect-ratio: 1189 / 720;
    display: block;
}

.is-zooming .svg-hotspot,
.is-zooming .overlay-layer-dynamic {
    pointer-events: none !important;
}

.overlay-layer {
    width: 100%;
    height: 100%; 
    }
.overlay-layer-dynamic {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;

    opacity: 0;
    transition: opacity 0.25s ease-out;
    /* z-index: 5; */
    z-index: 2;
    will-change: opacity;
}
.overlay-layer.active-overlay { opacity: 1; }

#interactive-hotspot-layer {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    z-index: 10;
    pointer-events: none;
}

/* ============================================================
   FIX (wieder-hergestellt): Kein feGaussianBlur-Glow mehr, da er
   sowohl teuer beim Zoomen/Hovern war als auch für die
   unscharfen Icons gesorgt hat. Stattdessen leichtes brightness()
   + scharfer drop-shadow mit sehr kleinem Radius. "filter" nicht
   mehr Teil der Dauer-Transition, will-change nur noch auf
   "opacity" -> weniger permanente GPU-Compositing-Layer.
   ============================================================ */
.svg-hotspot {
    opacity: 0;
    cursor: pointer;
    pointer-events: all;
    transform: scale(1);
    transform-origin: center;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.22s ease;
    will-change: opacity;
}

.svg-hotspot:hover {
    opacity: 1 !important;
    filter: brightness(1.35) drop-shadow(0 0 0 var(--color-accent-blue-lt));
}

.svg-hotspot.selected-active,
#map-container.overlay-active .svg-hotspot.selected-active {
    opacity: 1 !important;
    transform: scale(1) !important;
    filter: brightness(1.35)
            drop-shadow(0 0 0 var(--color-accent-blue-lt))
            drop-shadow(0 0 3px rgba(0, 0, 0, 0.35)) !important;
}

#map-container.overlay-active .svg-hotspot {
    opacity: 0;
}

/* ============================================================
   FIX: Klassen für das Hebel-Hover-Highlighting aus app.js.
   Die alte Regel ".building-hotspot.highlight-all" hat nie
   gegriffen (falsche Klasse) -> das Feature hat optisch nichts
   getan.
   ============================================================ */
.svg-hotspot.highlight-all {
    opacity: 1;
}

.svg-hotspot.dimmed {
    opacity: 0.15 !important;
}

#card-game-deck {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.98);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    z-index: 90;
    overflow: hidden;
}

#map-container.game-mode-active #card-game-deck {
    display: flex;
}

/* FIX: Style für #round-indicator war komplett verschwunden (das
   Element selbst fehlte in der HTML -> siehe app.js-Bug). Jetzt
   dezent oben mittig über dem Spielbereich platziert. */
#round-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text);
    z-index: 96;
}

#btn-reset-game {
    background: rgba(51, 65, 85, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    color: white;
}

.main-focus-area {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0px;
    margin-top: -20px;
}

.game-card {
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

.question-card-type {
    height: 62vh; 
    width: calc(62vh / 1.714);
    max-width: 95%;
}

.card-row-bottom {
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: center;
    gap: 30px;
    height: 190px;
    margin-bottom: 70px;
    position: relative;
    z-index: 5;
}

.answer-card-type {
    height: 34vh;
    width: calc(34vh / 1.714);
    /* Schaut weiter ins Bild rein (vorher 16vh) */
    transform: translateY(9vh); 
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

.answer-card-type:hover {
    transform: translateY(-2vh) scale(1.05);
    z-index: 15;
}

.answer-card-type.maximized {
    position: absolute;
    top: auto;
    bottom: calc(140px + 20vh);
    left: 50%;
    transform: translateX(-50%) scale(1.82) !important;
    z-index: 25;
    pointer-events: auto;
}

.game-card.faded-out {
    opacity: 0 !important;
    pointer-events: none;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background: #0f172a;
}

.card-back { transform: rotateY(0deg); }
.card-front { transform: rotateY(180deg); }

.card-front img, .card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#game-navigation-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    box-sizing: border-box;
    z-index: 80;
    pointer-events: none;
}
/* NEU: Zurück/Weiter im selben Look wie die obere Navbar
   (heller Pill-Button, dunkle Schrift, dezenter Hover). */
.nav-control-btn {
    pointer-events: auto;
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    border: none;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.nav-control-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--color-text);
    transform: translateY(-1px);
}
.invisible-btn { opacity: 0; pointer-events: none; }

/* FIX: Scoreboard deutlich größer + KEINE sichtbare Box mehr
   (kein Hintergrund, kein Rand, kein Padding-Kasten). */
#sidebar-scores {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column; /* Stapelt Akzeptanz und Umsetzung vertikal */
    gap: 46px;
    z-index: 95;
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
}

.score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* Container für dein Icon: größer, ohne Kreis-Hintergrund/-Rahmen */
.score-icon-wrapper {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
}

.score-icon-wrapper svg,
.score-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.score-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Die Schiene für das vertikale Wachstum: größer, ohne Rahmen/Box-Look */
.progress-bar-vertical {
    width: 30px;
    height: 220px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    border: none;
}

.progress-fill {
    width: 100%;
    position: absolute;
    bottom: 0; /* Füllung startet zwingend unten */
    left: 0;
    border-radius: 10px;
    
    /* Steuerung über die Höhe */
    height: 0%; 
    transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: height;
}

/* Akzeptanz: Sattes, leuchtendes Grün */
.fill-green { 
    background: linear-gradient(180deg, #22c55e, #15803d); 
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

/* Umsetzung: Strahlendes, klares Blau */
.fill-blue { 
    background: linear-gradient(180deg, #3b82f6, #1d4ed8); 
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

/* ============================================================
   NEU: Fliegende Punkte-Partikel von der gewählten Antwortkarte
   zum Scoreboard-Balken. Reines transform/opacity -> günstig für
   den Browser, keine Layout-Neuberechnungen während der Animation.
   ============================================================ */
#score-particle-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
}

.score-particle {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    opacity: 1;
    transform: translate(0, 0) scale(1);
    transition: transform 0.75s cubic-bezier(0.3, 0, 0.4, 1),
                opacity 0.75s ease-in;
    will-change: transform, opacity;
}

#toast-balken {
    position: fixed;
    bottom: -90px;
    left: 0;
    width: 100%;
    height: 70px;
    background: var(--color-bg-alt);
    border-top: 3px solid var(--color-accent-blue);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.7px;
    box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    cursor: pointer;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background 0.2s ease;
}
#toast-balken:hover   { background: var(--color-border); color: var(--color-accent-blue-lt); }
#toast-balken.anzeigen { bottom: 0; }
#interactive-hotspot-layer {
    position: absolute;
    z-index: 9999 !important; /* Zwingt die SVGs vor JEDES Overlay-Bild */
    pointer-events: none;     /* Der Layer selbst lässt Klicks durch... */
}

#interactive-hotspot-layer svg {
    pointer-events: auto;     /* ...aber die geladenen SVGs fangen sie ab! */
}