:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --accent-color: #FFC107;
    --bg-color: #f0f9ff;
    --text-color: #333;
    --white: #ffffff;
    --correct-color: #4CAF50;
    --wrong-color: #f44336;
    --xp-color: #9C27B0;
    --fibi-color: #FF5722;
    --locked-color: #9e9e9e;
    --challenge-color: #f44336;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Comic Neue', cursive, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 10px;
}

#app {
    background: var(--white);
    width: 100%;
    max-width: 1100px;
    min-height: 850px;
    border-radius: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    padding: 20px;
    position: relative;
    border: 8px solid #e0f2fe;
    overflow: hidden;
}

.screen { display: none; flex-direction: column; align-items: center; text-align: center; animation: fadeIn 0.4s ease-out; width: 100%; }
.screen.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Header & Stats */
header { width: 100%; margin-bottom: 20px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
header h1 { margin: 0; width: 100%; text-align: center; }
#logout-btn { position: absolute; right: 0; top: 0; order: unset; }
.player-stats-header { display: flex; align-items: center; gap: 12px; font-weight: bold; font-size: 0.85rem; order: unset; }
.xp-mini-bar { width: 80px; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
#xp-mini-fill { height: 100%; background: var(--xp-color); width: 0%; transition: width 0.5s; }

.map-header { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.map-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.reward-strip {
    width: 100%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
    font-weight: 700;
}
.reward-pill {
    background: #fff3e0;
    border: 2px solid #ffcc80;
    border-radius: 14px;
    padding: 6px 10px;
    color: #5d4037;
}
.daily-challenge-panel {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 12px;
    background: #e8f5e9;
    border: 2px solid #a5d6a7;
    border-radius: 16px;
    text-align: left;
}
.daily-challenge-panel strong,
.daily-challenge-panel span {
    display: block;
}
.daily-challenge-panel.completed {
    background: #f5f5f5;
    border-color: #d0d7de;
}

.island-banner {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 5 / 2;
    margin: 0 auto 12px;
    border: 4px solid #90caf9;
    border-radius: 18px;
    overflow: hidden;
    background: #e3f2fd;
    box-shadow: 0 8px 20px rgba(33,150,243,0.14);
}

.island-banner img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Klassenauswahl */
.grade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; width: 100%; max-width: 500px; }
.grade-btn { background: var(--secondary-color); color: white; border: none; padding: 30px; border-radius: 20px; font-size: 1.5rem; cursor: pointer; transition: transform 0.2s, background 0.2s; font-family: inherit; }
.grade-btn:hover { transform: scale(1.05); background: #1976D2; }

.bonus-btn {
    background: linear-gradient(135deg, #FFD700, #FFA000) !important;
    border: 3px solid #E65100 !important;
    color: #fff !important;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 160, 0, 0.4);
}

.bonus-btn:hover {
    background: linear-gradient(135deg, #FFC107, #FF8F00) !important;
}

.secret-btn {
    background: linear-gradient(135deg, #7B1FA2, #9C27B0) !important;
    border: 3px solid #4A148C !important;
    color: #fff !important;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(123, 31, 162, 0.35);
}

.secret-btn:hover {
    background: linear-gradient(135deg, #8E24AA, #AB47BC) !important;
}

.multiplayer-status {
    margin: 16px 0 8px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(33, 150, 243, 0.1);
    color: #0D47A1;
    font-weight: 700;
    border: 2px solid rgba(33, 150, 243, 0.2);
}

/* Weltkarte (17 Orte) */
.world-map {
    width: 100%;
    height: 600px;
    background: #e3f2fd;
    border-radius: 20px;
    position: relative;
    margin: 10px 0;
    background-image: radial-gradient(#bbdefb 2px, transparent 2px);
    background-size: 20px 20px;
    border: 4px solid #90caf9;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
}

/* Wir nutzen Flexbox für die Orte, um bei 17 Orten die Übersicht zu behalten */
.world-map {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 30px 20px;
}

.map-location {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s;
    z-index: 2;
    width: 110px;
    position: relative;
}

.map-location.map-hidden { display: none; }

.map-location:hover:not(.locked) { transform: scale(1.15); }

.map-location.locked { cursor: not-allowed; filter: grayscale(1); opacity: 0.7; }
.map-location.locked .loc-icon { border-color: #999; }
.loc-lock { position: absolute; top: -10px; right: 0; background: #333; color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 8px; font-weight: bold; z-index: 3; }

.loc-icon { background: white; border-radius: 50%; width: 62px; height: 62px; display: flex; justify-content: center; align-items: center; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border: 4px solid var(--secondary-color); overflow: hidden; }
.loc-icon img { width: 100%; height: 100%; display: block; }
.world-symbol {
    position: absolute;
    top: 42px;
    right: 18px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    overflow: hidden;
}
.world-symbol img { width: 100%; height: 100%; display: block; }
.loc-label { font-weight: bold; margin-top: 5px; background: rgba(255,255,255,0.9); padding: 4px 8px; border-radius: 10px; font-size: 0.75rem; white-space: nowrap; text-align: center; width: 100%; overflow: hidden; text-overflow: ellipsis; border: 2px solid var(--secondary-color); }
.loc-stars { color: #5f6b7a; font-size: 0.8rem; height: 1.2rem; font-weight: bold; }

/* Missionen */
.mission-panel { width: 100%; background: #fff9c4; padding: 12px; border-radius: 15px; border: 2px solid #fff176; text-align: left; margin-top: 10px; }
.mission-panel h3 { margin-bottom: 5px; color: #fbc02d; font-size: 1rem; }
#mission-list { list-style: none; font-size: 0.9rem; }
.mission-item { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed #ffe082; }
.mission-done { text-decoration: line-through; color: #999; }
.mission-ready { color: #2e7d32; font-weight: 700; }
.mission-reward { color: #7b4b00; font-size: 0.78rem; margin-left: 8px; }

.shop-intro { width: 100%; max-width: 900px; background: #e3f2fd; border: 2px solid #90caf9; border-radius: 20px; padding: 16px; margin-bottom: 14px; text-align: left; }
.shop-items-grid { width: 100%; display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 18px; }
.shop-category-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; justify-content: center; }
.shop-category-btn { border: 2px solid #90caf9; background: white; color: #1565c0; border-radius: 12px; padding: 8px 14px; cursor: pointer; font-family: inherit; font-weight: 700; }
.shop-category-btn.active { background: #90caf9; color: white; }
.shop-items-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.shop-status-panel { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 12px; padding: 14px; border: 2px dashed #90caf9; border-radius: 18px; background: #f0f7ff; color: #1565c0; font-weight: 700; }
.shop-status-panel span { background: #ffffff; border: 1px solid #90caf9; border-radius: 14px; padding: 8px 12px; box-shadow: 0 6px 12px rgba(33, 150, 243, 0.08); }
.shop-item-card { background: #ffffff; border: 2px solid #90caf9; border-radius: 18px; padding: 14px; text-align: left; box-shadow: 0 12px 22px rgba(33, 150, 243, 0.08); display: flex; flex-direction: column; justify-content: space-between; }
.shop-item-card h3 { margin-bottom: 8px; color: #1565c0; font-size: 1.1rem; }
.shop-item-card p { margin-bottom: 12px; color: #37474f; font-size: 0.95rem; line-height: 1.4; }
.shop-item-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.shop-item-cost { font-weight: 700; color: #0d47a1; }
.shop-buy-btn { background: linear-gradient(135deg, #42a5f5, #1e88e5); color: white; border: none; padding: 10px 16px; border-radius: 12px; cursor: pointer; font-family: inherit; font-weight: 700; }
.shop-buy-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.shop-footer { width: 100%; max-width: 900px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.shop-message { color: #1565c0; font-weight: 700; min-height: 1.5em; }

/* Shop layout: items + history */
.shop-main { display: flex; gap: 16px; align-items: flex-start; }
.shop-items-list { flex: 1 1 0; }
.shop-history { width: 280px; background: #f7fbff; border: 2px solid #e1f0ff; padding: 12px; border-radius: 12px; box-shadow: 0 8px 20px rgba(14, 90, 140, 0.04); }
.shop-history h4 { margin: 0 0 8px 0; color: #1565c0; }
.shop-history ul { list-style: none; padding-left: 0; max-height: 260px; overflow-y: auto; font-size: 0.9rem; }
.shop-history li { padding: 6px 0; border-bottom: 1px dashed #e6f2ff; }

/* Shop confirmation modal */
.shop-confirm-modal { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(2, 34, 50, 0.38); z-index: 120; }
.shop-confirm-modal.hidden { display: none; }
.shop-confirm-window { width: min(520px, 95%); background: white; border: 4px solid #90caf9; border-radius: 12px; padding: 18px; box-shadow: 0 18px 40px rgba(0, 77, 64, 0.16); text-align: left; }
.shop-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }

/* Fibi der Fuchs */
#fibi-container {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
    z-index: 10;
}

.fibi-bubble {
    background: white;
    border: 3px solid var(--fibi-color);
    padding: 8px 12px;
    border-radius: 15px 15px 0 15px;
    margin-right: 5px;
    max-width: 160px;
    font-size: 0.8rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    pointer-events: auto;
}

.fibi-avatar { font-size: 3.5rem; filter: drop-shadow(0 5px 5px rgba(0,0,0,0.1)); }

/* Buttons */
.btn-main { background: var(--primary-color); color: white; padding: 12px 24px; font-size: 1rem; border-radius: 15px; border: none; cursor: pointer; transition: background 0.2s; font-family: inherit; }
.btn-main:hover { background: #45a049; }
.btn-main:disabled { background: #ccc; cursor: not-allowed; }
.btn-secondary { background: var(--secondary-color); color: white; padding: 8px 16px; border-radius: 10px; border: none; cursor: pointer; font-family: inherit; }
.btn-small { background: #eee; padding: 6px 10px; font-size: 0.75rem; border-radius: 8px; border: none; cursor: pointer; width: fit-content; font-family: inherit; }

.btn-challenge { background: #eee; border: 2px solid #ccc; padding: 8px 15px; border-radius: 12px; cursor: pointer; font-weight: bold; font-family: inherit; transition: all 0.2s; }
.btn-challenge.active { background: var(--challenge-color); color: white; border-color: #b71c1c; box-shadow: 0 0 10px rgba(244, 67, 54, 0.4); }

/* Game Elements */
.game-header-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.timer { font-size: 1.2rem; font-weight: bold; color: var(--challenge-color); background: #ffebee; padding: 5px 12px; border-radius: 10px; border: 2px solid #ffcdd2; }
.timer.warning { animation: pulse 0.5s infinite alternate; }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.1); color: #d32f2f; } }

#game-container { width: 100%; margin: 20px 0; min-height: 200px; }
.progress-container { width: 100%; height: 10px; background: #eee; border-radius: 5px; margin-top: 10px; overflow: hidden; }
#progress-bar { height: 100%; background: var(--primary-color); width: 0%; transition: width 0.3s; }

.choice-container { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.choice-btn { padding: 10px 20px; font-size: 1.1rem; background: #f8f9fa; border: 3px solid #dee2e6; border-radius: 12px; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.choice-btn:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--secondary-color); }
.choice-btn:disabled { cursor: not-allowed; opacity: 0.8; }

.gap-text { font-size: 1.4rem; margin: 20px 0; line-height: 1.6; }
.gap-input { border: 2px solid #ddd; border-radius: 8px; text-align: center; font-family: inherit; outline: none; font-size: 1.2rem; }
.gap-input:focus { border-color: var(--secondary-color); }

.drop-zone { min-height: 80px; width: 100%; border: 3px dashed #ccc; border-radius: 15px; margin: 20px 0; display: flex; flex-wrap: wrap; gap: 10px; padding: 15px; justify-content: center; background: #fafafa; transition: background 0.2s; }
.drop-zone.active { background: #e8f5e9; border-color: var(--primary-color); }
.draggable-word { padding: 8px 15px; background: white; border: 2px solid var(--secondary-color); border-radius: 10px; cursor: grab; font-size: 1.1rem; user-select: none; }

#feedback { margin: 20px 0; padding: 15px; border-radius: 15px; background: #f9f9f9; width: 100%; }
.hidden { display: none; }
.success { color: var(--correct-color); font-weight: bold; font-size: 1.2rem; }
.error { color: var(--wrong-color); font-weight: bold; font-size: 1.1rem; }

.story-card {
    width: min(720px, 100%);
    margin: 16px auto;
    padding: 16px;
    border: 3px solid #b2dfdb;
    border-radius: 8px;
    background: #f1fffd;
    text-align: left;
    box-shadow: 0 8px 18px rgba(0, 121, 107, 0.12);
}

.story-card span {
    display: block;
    color: #00796b;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.story-card h3 {
    color: #004d40;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.story-card p {
    line-height: 1.45;
    margin-bottom: 8px;
}

.story-card small {
    color: #456;
    font-weight: 700;
}

.story-intro-overlay {
    position: absolute;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(21, 67, 82, 0.42);
}

.story-intro-overlay.hidden {
    display: none;
}

.story-intro-window {
    width: min(680px, 100%);
    background: #ffffff;
    border: 4px solid #80cbc4;
    border-radius: 8px;
    padding: 20px;
    text-align: left;
    box-shadow: 0 18px 40px rgba(0, 77, 64, 0.24);
}

.story-intro-window span {
    display: block;
    color: #00796b;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.story-intro-window h2 {
    color: #004d40;
    font-size: 1.5rem;
    line-height: 1.15;
    margin-bottom: 10px;
}

.story-intro-window p {
    line-height: 1.5;
    margin-bottom: 10px;
}

.story-intro-window small {
    display: block;
    color: #456;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Player Cards */
.player-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin: 20px 0; }
.player-card { border: 2px solid #ddd; border-radius: 15px; padding: 15px; cursor: pointer; transition: all 0.2s; min-width: 150px; }
.player-card:hover { border-color: var(--primary-color); background: #f1f8e9; }

/* Bestenliste Table */
.highscore-table-container { width: 100%; max-height: 400px; overflow-y: auto; margin: 20px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; }

/* Eltern-/Lehrerbericht */
.report-content { width: 100%; display: grid; gap: 16px; text-align: left; }
.report-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
    padding: 14px;
    background: #eef7ff;
    border: 2px solid #d0e7ff;
    border-radius: 10px;
}
.report-summary div {
    padding: 10px;
    background: white;
    border: 1px solid #dbe9f5;
    border-radius: 10px;
    font-weight: 700;
}
.report-summary button {
    grid-column: span 3;
    justify-self: start;
    padding: 10px 14px;
    border-radius: 10px;
}
.report-player-card {
    border: 2px solid #d7ecff;
    border-radius: 8px;
    padding: 14px;
    background: #fbfdff;
}
.report-player-card .report-recommendation {
    margin-bottom: 12px;
    background: #f2f9ff;
    border: 1px solid #d5e7ff;
    border-radius: 10px;
    padding: 10px;
    color: #2f4f7b;
}

/* Erweiterte Bericht-Styles */
.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #f5f9ff 0%, #e8f4ff 100%);
    border: 2px solid #d7ecff;
    border-radius: 12px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.summary-card {
    background: white;
    border: 2px solid #2196f3;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.1);
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(33, 150, 243, 0.2);
}

.summary-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 6px;
}

.summary-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2196f3;
}

.summary-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.top-performer {
    grid-column: 1 / -1;
    padding: 12px;
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    border-radius: 6px;
    color: #e65100;
    font-weight: 700;
}

.report-player-card {
    border: 2px solid #d7ecff;
    border-radius: 12px;
    padding: 18px;
    background: #fbfdff;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.report-player-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

.report-player-head h3 {
    margin: 0 0 4px 0;
    color: #1a237e;
    font-size: 1.3rem;
}

.report-player-head p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.accuracy-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.report-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f5f9ff;
    border-radius: 8px;
}

.report-metrics span {
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
}

.report-time-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    background: #e8f5e9;
    border-radius: 8px;
}

.time-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.time-stat .label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 600;
}

.time-stat .value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2e7d32;
}

.time-stat .detail {
    font-size: 0.75rem;
    color: #999;
}

.report-trend {
    padding: 12px;
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.trend-improving {
    color: #2e7d32;
    font-weight: 700;
}

.trend-declining {
    color: #c62828;
    font-weight: 700;
}

.trend-stable {
    color: #f57c00;
    font-weight: 700;
}

.report-learning-speed {
    padding: 10px;
    background: #f3e5f5;
    border-left: 4px solid #9c27b0;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.report-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.report-columns section {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.report-columns h4 {
    margin: 0 0 12px 0;
    color: #1a237e;
    font-size: 1rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin-bottom: 6px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.category-item.strength {
    background: #e8f5e9;
    border-left: 3px solid #4caf50;
}

.category-item.warning {
    background: #fff3e0;
    border-left: 3px solid #ff9800;
}

.cat-name {
    font-weight: 600;
    color: #333;
}

.cat-stats {
    color: #666;
    font-size: 0.85rem;
}

.report-recommendation {
    padding: 14px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #2196f3;
    border-radius: 8px;
    margin-bottom: 16px;
    color: #1a237e;
    font-weight: 600;
    line-height: 1.5;
}

.report-category-table,
.report-recent-sessions {
    margin-bottom: 16px;
}

.report-category-table h4,
.report-recent-sessions h4 {
    margin: 12px 0 8px 0;
    color: #1a237e;
    font-size: 1rem;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.report-table thead {
    background: #2196f3;
    color: white;
}

.report-table th {
    padding: 10px;
    text-align: left;
    font-weight: 700;
}

.report-table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.report-table tbody tr:hover {
    background: #f5f9ff;
}

.report-table tbody tr:last-child td {
    border-bottom: none;
}

.placeholder {
    color: #999;
    font-style: italic;
    padding: 8px 0;
}

.empty-report {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 1.1rem;
}

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

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .report-player-head {
        flex-direction: column;
    }

    .accuracy-badge {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }

    .report-table {
        font-size: 0.8rem;
    }

    .report-table th,
    .report-table td {
        padding: 8px;
    }
}

/* Dropdown Menu */
.dropdown-menu-container { position: relative; display: inline-block; }
#open-menu-btn { padding: 8px 16px; border: 2px solid #2196F3; background: white; color: #2196F3; font-weight: bold; border-radius: 10px; cursor: pointer; font-family: inherit; transition: all 0.2s; }
#open-menu-btn:hover { background: #f5f5f5; }
.dropdown-menu { position: absolute; top: 100%; right: 0; background: white; border: 2px solid #2196F3; border-radius: 10px; list-style: none; margin-top: 5px; padding: 8px 0; min-width: 180px; box-shadow: 0 8px 20px rgba(0,0,0,0.15); z-index: 1000; }
.dropdown-menu.hidden { display: none; }
.dropdown-item { display: block; width: 100%; padding: 12px 16px; background: transparent; border: none; text-align: left; cursor: pointer; font-family: inherit; font-size: 0.95rem; color: #333; transition: all 0.2s; }
.dropdown-item:hover { background: #f5f5f5; color: #2196F3; }

/* Zusatzsysteme: Koop, Lernserien, geheime Erfolge */
.feature-modal-window {
    width: min(680px, calc(100% - 32px));
    color: #263238;
}

.feature-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.feature-panel-head h3 {
    margin: 0;
    color: #14505f;
    font-size: 1.35rem;
}

.feature-panel-head span {
    padding: 4px 10px;
    border-radius: 999px;
    background: #e0f2f1;
    color: #00695c;
    font-weight: 700;
    white-space: nowrap;
}

.secret-achievement-grid,
.learning-series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.secret-achievement-card,
.learning-series-card,
.coop-panel {
    border: 2px solid #d9e9ef;
    border-radius: 8px;
    background: #fbfdff;
    padding: 14px;
    text-align: left;
}

.secret-achievement-card {
    min-height: 150px;
    opacity: 0.72;
}

.secret-achievement-card.is-unlocked {
    opacity: 1;
    border-color: #80cbc4;
    background: #f0fffc;
}

.secret-achievement-card-icon,
.secret-achievement-icon {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    background: #14505f;
    color: white;
    font-weight: 800;
    margin-bottom: 8px;
}

.secret-achievement-card strong,
.learning-series-card strong {
    display: block;
    color: #17444f;
    margin-bottom: 6px;
}

.secret-achievement-card p,
.learning-series-card p,
.coop-panel p {
    margin: 0 0 10px;
    line-height: 1.35;
}

.secret-achievement-card small,
.series-stage small,
.coop-objective small,
.coop-player-option small {
    color: #607d8b;
    font-weight: 700;
}

.secret-achievement-unlock,
.series-toast {
    position: fixed;
    right: 18px;
    top: 18px;
    z-index: 10000;
    display: flex;
    gap: 12px;
    align-items: center;
    max-width: min(360px, calc(100vw - 36px));
    padding: 14px;
    border-radius: 8px;
    background: #143f4a;
    color: white;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
    animation: toastIn 0.24s ease-out;
}

.secret-achievement-unlock span,
.secret-achievement-unlock small {
    display: block;
}

.series-toast {
    top: auto;
    bottom: 18px;
    font-weight: 800;
}

.secret-achievement-unlock.is-leaving,
.series-toast.is-leaving {
    animation: toastOut 0.28s ease-in forwards;
}

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

@keyframes toastOut {
    to { transform: translateY(-8px); opacity: 0; }
}

.learning-series-card {
    display: grid;
    gap: 10px;
}

.learning-series-card.is-completed {
    background: #f1fff4;
    border-color: #a5d6a7;
}

.series-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.series-meta span,
.coop-team-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 8px;
    background: #eef7fb;
    color: #31515c;
    font-size: 0.85rem;
    font-weight: 700;
}

.series-stage progress,
.coop-objective progress {
    width: 100%;
    height: 10px;
    margin: 6px 0;
}

.coop-player-list,
.coop-objectives,
.coop-team-list {
    display: grid;
    gap: 10px;
}

.coop-player-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid #d9e9ef;
    border-radius: 8px;
    background: #ffffff;
}

.coop-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0;
}

.coop-stats strong,
.coop-stats span {
    display: block;
    padding: 8px;
    text-align: center;
    background: #eef7fb;
}

.coop-stats strong {
    border-radius: 8px 8px 0 0;
    color: #14505f;
    font-size: 1.15rem;
}

.coop-stats span {
    border-radius: 0 0 8px 8px;
    color: #607d8b;
    font-size: 0.8rem;
    font-weight: 700;
}

.coop-objective {
    padding: 10px;
    border-radius: 8px;
    background: #f7fbfd;
}

.coop-objective.is-complete {
    background: #efffed;
}

/* Profile Content */
.profile-content { width: 100%; max-width: 900px; text-align: left; }
.player-profile-card { border: 3px solid #9C27B0; border-radius: 16px; padding: 20px; background: #f3e5f5; box-shadow: 0 8px 20px rgba(156, 39, 176, 0.12); }
.player-profile-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #9C27B0; }
.player-profile-head h3 { color: #4a148c; margin: 0; font-size: 1.4rem; }
.player-profile-head span { color: #6a1b9a; font-weight: bold; }
.profile-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; }
.profile-row > div, .profile-row > section { background: white; border: 2px solid #ce93d8; border-radius: 12px; padding: 12px; }
.profile-row h4 { color: #6a1b9a; margin: 0 0 8px 0; font-size: 1rem; }
.profile-row p { margin: 6px 0; color: #333; font-size: 0.9rem; }
.profile-notice { background: #fff3e0; border: 2px solid #ffb74d; border-radius: 12px; padding: 12px; color: #e65100; font-weight: bold; }
.report-player-head,
.report-metrics,
.report-columns {
    display: grid;
    gap: 10px;
}
.report-player-head {
    grid-template-columns: 1fr auto;
    align-items: center;
    margin-bottom: 10px;
}
.report-player-head strong {
    color: #1976d2;
    font-size: 1.2rem;
}
.report-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 10px 0;
}
.report-metrics span {
    background: white;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    font-weight: 700;
}
.report-columns {
    grid-template-columns: 1fr 1fr;
    margin: 8px 0 12px;
}
.report-columns section {
    background: white;
    border: 1px solid #e4eaf0;
    border-radius: 8px;
    padding: 10px;
}
.report-table { font-size: 0.9rem; }
.empty-report { text-align: center; padding: 30px; color: #667; }

/* Responsive */
@media (max-width: 768px) {
    .world-map { height: auto; max-height: 600px; }
    .grade-grid { grid-template-columns: 1fr; }
    .map-header,
    .daily-challenge-panel { align-items: stretch; flex-direction: column; }
    .map-actions { justify-content: center; }
    .report-player-head,
    .report-metrics,
    .report-columns { grid-template-columns: 1fr; }
    #app { min-height: auto; }
}
