/* style.css */
* {
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 700; /* Bold überall */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 700;
    min-height: 100vh;
    overflow-x: auto;
    overflow-y: auto;
}


.map-container {
  position: relative;
  width: 100%;
  min-width: 1400px;
  min-height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;
}
.map-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover; /* Deckt den Container ab, ohne Verzerrung */
    z-index: 1;
}

.map-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* oder contain, je nach Wunsch */
  display: none;
}


/* ========== RESPONSIVE MEDIA QUERIES ========== */

/* Extra kleine Geräte (Phones, Portrait) */
@media (max-width: 576px) {
    /* Scrolling aktiviert - keine Größenänderungen an map-container */
    .map-container {
        min-width: 1200px; /* Garantiert scrolling auf Mobile */
    }
    
    .title {
        font-size: 12px;
        padding: 10px;
        top: 90%;
        width: 1000px; /* Fixe Breite für scrolling */
    }
    
    .video-wrapper {
        width: 95%;
        padding: 10px;
    }
    
    .quiz-content {
        padding: 20px;
        width: 95%;
    }
    
    .quiz-content h2 {
        font-size: 18px;
    }
    
    .quiz-question {
        font-size: 14px;
    }
}

/* Kleine Geräte (Phones, Landscape & Tablets Portrait) */
@media (min-width: 577px) and (max-width: 768px) {
    .map-container {
        min-width: 1300px;
    }
    
    .title {
        font-size: 16px;
        top: 88%;
        width: 1200px;
    }
}

/* Mittlere Geräte (Tablets Landscape) */
@media (min-width: 769px) and (max-width: 1024px) {
    .map-container {
        min-width: 1350px;
    }
    
    .title {
        font-size: 22px;
    }
}

/* Große Geräte (Desktop) */
@media (min-width: 1025px) and (max-width: 1440px) {
    /* Normale Darstellung - kein min-width override */
}

/* Sehr kleine Höhe (Landscape auf kleinen Geräten) */
@media (max-height: 600px) and (orientation: landscape) {
    .map-container {
        min-height: 600px; /* Feste Höhe für vertikales Scrolling */
        overflow-y: auto;
    }
    
    .title {
        top: 85%;
        font-size: 12px;
        padding: 8px;
    }
    
    .video-wrapper {
        gap: 10px;
    }
    
    .close-btn {
        padding: 8px 20px;
        font-size: 14px;
    }
}

/* Touch-Geräte spezifisch */
@media (hover: none) and (pointer: coarse) {
    .station-btn:active {
        transform: scale(0.95);
    }
    
    .btn:active,
    .close-btn:active {
        transform: scale(0.98);
    }
    
    /* Größere Touch-Targets */
    .station-btn {
        min-width: 60px;
        min-height: 60px;
    }
}

/* Station-Buttons */
.station-btn {
    position: absolute;
    z-index: 10;
    width: clamp(80px, 8vw, 120px);
    height: clamp(80px, 8vw, 120px);
    border-radius: 50%;
    border: clamp(2px, 0.3vw, 4px) solid #fff;
    background: transparent;
    color: #333;
    font-weight: bold;
    font-size: clamp(11px, 1.2vw, 14px);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    flex-direction: column;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Font Awesome 6 Free', Arial, sans-serif;
    touch-action: manipulation;
}

.station-btn::before {
    font-size: clamp(24px, 3vw, 32px);
    margin-bottom: 2px;
    display: block;
    transition: color 0.3s ease;
}

/* Grau: Nicht freigeschaltet (locked) */
.station-btn[data-unlocked="false"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.station-btn[data-unlocked="false"]::before,
.station-btn[data-unlocked="false"] {
  color: #888; /* Grau */
}

/* Weiß: Freigeschaltet, nicht absolviert */
.station-btn[data-unlocked="true"][data-completed="false"]::before,
.station-btn[data-unlocked="true"][data-completed="false"] {
  color: #fff; /* Weiß */
}

/* Grün: Absolviert – voller undurchsichtiger Hintergrund */
.station-btn[data-unlocked="true"][data-completed="true"] {
  background: rgba(72, 187, 120, 1) !important; /* Voll grün, priorisiert */
  border-color: #fff; /* Weißer Rand für Kontrast */
}

/* Icon und Text immer weiß davor (kein extra z-index needed) */
.station-btn[data-unlocked="true"][data-completed="true"]::before,
.station-btn[data-unlocked="true"][data-completed="true"] {
  color: #fff !important; /* Weißer Text/Icon */
}

/* Entferne ALLE position: absolute aus ::before – zurück zu Basics */
.station-btn::before {
  font-size: 32px;
  margin-bottom: 2px;
  display: block;
  transition: color 0.3s ease;
  /* KEIN position, z-index oder width/height hier! */
}



/* Video-Icon (z.B. Play-Symbol) */
.station-btn[data-type="video"]::before {
    content: '\f144'; /* Font Awesome play-circle */
}

/* Quiz-Icon (z.B. Fragezeichen) */
.station-btn[data-type="quiz"]::before {
    content: '\f059'; /* Font Awesome question-circle */
}

.station-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.station-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Button-Positionen (passe Koordinaten an deine Karte an) */
.station-btn[data-station="1"] { top: 70%; left: 5%; } 
.station-btn[data-station="2"] { top: 70%; left: 12%; }

.station-btn[data-station="3"] { top: 70%; left: 24%; }
.station-btn[data-station="4"] { top: 70%; left: 31%; }

.station-btn[data-station="5"] { top: 70%; left: 43%; }
.station-btn[data-station="6"] { top: 70%; left: 50%; }

.station-btn[data-station="7"] { top: 70%; left: 62%; }
.station-btn[data-station="8"] { top: 70%; left: 69%; }

.station-btn[data-station="9"] { top: 70%; left: 81%; }
.station-btn[data-station="10"] { top: 70%; left: 88%; }

/* Video-Player */
/* Vollbild-Overlay für Video */
.video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
}

.video-overlay.hidden {
    display: none;
}

/* Wrapper: Video oben, Button unten */
.video-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: clamp(300px, 90vw, 1350px);
    max-width: 95%;
    gap: clamp(12px, 2vw, 20px);
}

/* Player wird groß dargestellt */
.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    background: #282828;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Großer, zentrierter Button mit Rahmen/Hintergrund */
.close-btn {
    padding: clamp(10px, 1.5vw, 14px) clamp(24px, 4vw, 40px);
    font-size: clamp(14px, 1.8vw, 18px);
    font-weight: 600;
    background: #ffffff;
    color: #333;
    border: clamp(2px, 0.3vw, 3px) solid #333;
    border-radius: 999px;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    touch-action: manipulation;
}

.close-btn:hover {
    background: #f3f3f3;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}



/* Quiz-Overlay */
.quiz-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px; /* Abstand zwischen Fenster und Button */
    z-index: 2000;
}

.quiz-close-btn {
    margin-top: 8px;
}


.quiz-overlay.hidden {
    display: none;
}

.quiz-content {
    background: white;
    padding: clamp(20px, 4vw, 40px);
    border-radius: clamp(12px, 1.5vw, 16px);
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-height: 85vh;
    overflow-y: auto;
}

.quiz-content h2 {
    margin-bottom: 30px;
    color: #333;
}

.quiz-question {
    margin-bottom: 20px;
    text-align: left;
    font-weight: 400;
}

.quiz-question label {
    display: block;
    margin: 10px 0;
    cursor: pointer;
}

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: clamp(10px, 1.5vw, 12px) clamp(20px, 3vw, 30px);
    border-radius: 25px;
    font-size: clamp(14px, 1.6vw, 16px);
    cursor: pointer;
    transition: background 0.3s;
    margin-top: clamp(12px, 2vw, 20px);
    touch-action: manipulation;
}

.btn:hover {
    background: #5a67d8;
}

#quizResult {
    margin-top: 20px;
    font-weight: bold;
    font-size: 18px;
}

.success { color: #48bb78; }
.error { color: #f56565; }

/* SVG über der Karte, unter Buttons */
.connections {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* Gestrichelte Linien */
.conn-line {
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 3;
    stroke-dasharray: 8 6;
}

/* Buttons sollten über den Linien liegen */
.station-btn {
    position: absolute;
    z-index: 10;
    /* deine bisherigen Button-Styles hier beibehalten */
}

/* Glückwunsch-Overlay */
.congrats-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.congrats-overlay.hidden {
    display: none;
}

.congrats-content {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}

.congrats-content h2 {
    margin-bottom: 16px;
}

.congrats-content p {
    margin-bottom: 24px;
    font-size: 16px;
}

.chapter-label {
    position: absolute;
    width: clamp(180px, 14vw, 250px);
    height: clamp(400px, 40vh, 600px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: clamp(16px, 2vw, 24px);
    border-radius: clamp(8px, 1vw, 12px);
    font-size: clamp(14px, 1.4vw, 18px);
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 12;
    pointer-events: none;
    transition: all 0.3s ease;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

/* Hintergrundbilder für jedes Kapitel - du kannst diese URLs ersetzen */
.chapter-label[data-chapter="1"] { 
    background-image: url('Kapitel1.jpg');
    /* Fallback wenn kein Bild */
    background-color: #667eea;
}
.chapter-label[data-chapter="2"] { 
    background-image: url('Kapitel2.jpg');
    background-color: #764ba2;
}
.chapter-label[data-chapter="3"] { 
    background-image: url('Kapitel3.jpg');
    background-color: #f093fb;
}
.chapter-label[data-chapter="4"] { 
    background-image: url('Kapitel4.jpg');
    background-color: #4facfe;
}
.chapter-label[data-chapter="5"] { 
    background-image: url('Kapitel5.jpg');
    background-color: #43e97b;
}

.chapter-label::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.3) 60%,
        rgba(0,0,0,0.7) 100%
    );
    border-radius: inherit;
    z-index: -1;
}

.chapter-label:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

/* Über den Stationen, jeweils 2 Stationen pro Kapitel */
.chapter-label[data-chapter="1"] { top: 20%; left: 6.5%; }   /* Zwischen Station 1 & 2 */
.chapter-label[data-chapter="2"] { top: 20%; left: 25.5%; }  /* Zwischen Station 3 & 4 */
.chapter-label[data-chapter="3"] { top: 20%; left: 44.5%; }  /* Zwischen Station 5 & 6 */
.chapter-label[data-chapter="4"] { top: 20%; left: 63.5%; }  /* Zwischen Station 7 & 8 */
.chapter-label[data-chapter="5"] { top: 20%; left: 82.5%; }  /* Zwischen Station 9 & 10 */

.title {
    position: absolute;
    width: clamp(300px, 90vw, 1600px);
    max-width: 95%;
    height: auto;
    min-height: clamp(80px, 12vw, 250px);
    color: white;
    padding: clamp(8px, 1.5vw, 20px);
    border-radius: 0px;
    font-size: clamp(14px, 2vw, 30px);
    font-weight: 300;
    font-style: italic;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 12;
    pointer-events: none;
    transition: all 0.3s ease;
    top: 85%;
    left: 50%;
    transform: translateX(-50%);
}


