* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}
.container {
    max-width: 1400px;
    margin: 20px auto;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}
.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: bold;
    transition: background 0.3s ease;
}
.back-button:hover {
    background: rgba(255, 255, 255, 0.4);
}
.header h1 { font-size: 2.8rem; margin-bottom: 10px; }
.header p { font-size: 1.3rem; opacity: 0.9; }
.tour-mode-selector { background: #f8f9fa; padding: 20px; text-align: center; border-bottom: 2px solid #eee; }
.mode-buttons { display: flex; gap: 20px; justify-content: center; margin-top: 15px; }
.mode-btn { background: linear-gradient(135deg, #3742fa, #5f27cd); color: white; border: none; padding: 15px 30px; border-radius: 30px; cursor: pointer; font-size: 1.1rem; transition: all 0.3s ease; min-width: 150px; }
.mode-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.mode-btn.active { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.tour-container { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; padding: 20px; min-height: 600px; }
.map-view { border-radius: 15px; overflow: hidden; }
#map { width: 100%; height: 100%; min-height: 500px; background-color: #e0e0e0; }
.control-panel { background: white; border-radius: 15px; padding: 20px; height: fit-content; }
.current-location { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white; padding: 20px; border-radius: 15px; margin-bottom: 20px; text-align: center; }
.current-location h3 { font-size: 1.5rem; margin-bottom: 5px; }
.locations-list { background: #f8f9fa; padding: 15px; border-radius: 10px; margin-bottom: 20px; }
.locations-list h4 { color: #2f3542; margin-bottom: 15px; }
.location-item { background: white; padding: 12px; margin-bottom: 10px; border-radius: 8px; border-left: 4px solid #3742fa; cursor: pointer; transition: all 0.3s ease; }
.location-item:hover { transform: translateX(5px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.location-item.active { border-left-color: #ff6b6b; background: #fff5f5; }
.navigation-controls { display: flex; gap: 10px; justify-content: center; }
.nav-btn { background: #5f27cd; color: white; border: none; padding: 12px 25px; border-radius: 25px; cursor: pointer; font-size: 1rem; transition: all 0.3s ease; }
.nav-btn:hover { background: #341f97; transform: translateY(-2px); }
.nav-btn:disabled { background: #95a5a6; cursor: not-allowed; transform: none; }

/* --- MODAL STYLES (FOR BOTH DIALOGUE AND DETAILS) --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); display: none; justify-content: center; align-items: center; z-index: 1000; padding: 20px; }
.details-popup { display: flex; flex-direction: column; background: white; border-radius: 15px; width: 90%; max-width: 800px; max-height: 90vh; box-shadow: 0 10px 30px rgba(0,0,0,0.2); position: relative; }
.details-close-btn { position: absolute; top: 10px; right: 15px; background: rgba(0,0,0,0.5); color: white; border: none; border-radius: 50%; width: 30px; height: 30px; font-size: 16px; cursor: pointer; z-index: 10; }
.details-image-container { width: 100%; height: 300px; background-color: #2c3e50; color: white; display: flex; align-items: center; justify-content: center; text-align: center; }
.details-image-container img { width: 100%; height: 100%; object-fit: cover; border-top-left-radius: 15px; border-top-right-radius: 15px; }
.details-content { padding: 25px; overflow-y: auto; }
.details-content h3 { margin-top: 0; font-size: 1.8rem; }
.details-content p { margin-bottom: 20px; line-height: 1.6; }
.scenario-card { background: linear-gradient(135deg, #ffeaa7, #fab1a0); padding: 20px; border-radius: 15px; text-align: center; }
.scenario-title { font-size: 1.2rem; font-weight: bold; color: #2d3436; margin-bottom: 15px; }
.german-phrase { font-size: 1.4rem; font-weight: bold; color: #2d3436; margin-bottom: 10px; background: rgba(255,255,255,0.8); padding: 10px; border-radius: 8px; }
.translation { font-size: 1rem; color: #636e72; margin-bottom: 15px; }
.audio-controls { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.audio-btn { background: #00b894; color: white; border: none; padding: 10px 15px; border-radius: 20px; cursor: pointer; font-size: 0.9rem; transition: all 0.3s ease; }
.audio-btn:hover { background: #00a085; transform: translateY(-2px); }

/* Dialogue Popup */
.dialogue-popup { background: white; padding: 30px; border-radius: 15px; width: 90%; max-width: 600px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.dialogue-popup h3 { margin-top: 0; color: #2f3542; text-align: center; margin-bottom: 20px; }
.dialogue-line { margin-bottom: 15px; padding: 10px; border-radius: 8px; }
.dialogue-line strong { display: block; margin-bottom: 5px; font-size: 1.1em; }
.dialogue-line .german { font-weight: bold; color: #2d3436; }
.dialogue-line .english { font-size: 0.9em; color: #636e72; font-style: italic; }
.dialogue-speaker-you { background-color: #eaf2ff; border-left: 4px solid #3742fa; }
.dialogue-speaker-other { background-color: #f8f9fa; border-left: 4px solid #95a5a6; }
.close-btn { display: block; margin: 20px auto 0 auto; padding: 10px 30px; border: none; background: #ff6b6b; color: white; border-radius: 20px; cursor: pointer; font-size: 1em; }
.dialogue-audio-btn { background: none; border: none; cursor: pointer; font-size: 1.2em; padding: 0 5px; vertical-align: middle; opacity: 0.7; transition: opacity 0.2s; }
.dialogue-audio-btn:hover { opacity: 1; }

/* Grammar Colors */
.noun-m { color: #007bff; font-weight: bold; } .noun-f { color: #dc3545; font-weight: bold; } .noun-n { color: #28a745; font-weight: bold; } .verb { color: #6f42c1; } .adjective { color: #fd7e14; } .adverb { color: #6c757d; font-style: italic; } .pronoun { color: #ffc107; } .preposition { color: #E91E63; } .conjunction { color: #20c997; } .article { color: #17a2b8; font-weight: 500; }

@media (max-width: 1024px) { .tour-container { grid-template-columns: 1fr; } .header h1 { font-size: 2.2rem; } }
@media (max-width: 768px) { .mode-buttons { flex-direction: column; align-items: center; } .mode-btn { width: 80%; max-width: 300px; } .back-button { top: 10px; left: 10px; padding: 6px 12px; font-size: 0.8em;} .header h1 { font-size: 1.8rem; margin-top: 30px; } .details-image-container { height: 200px; } .details-content h3 { font-size: 1.5rem; } }
