/* style.css - RE-MINT Final Design */

:root {
    --primary: #2563eb;       /* Blau */
    --primary-dark: #1d4ed8;
    --success: #16a34a;       /* Grün */
    --error: #ef4444;         /* Rot */
    --bg: #f8fafc;            /* Hintergrund */
    --text: #1e293b;          /* Text dunkel */
    --text-light: #64748b;    /* Text grau */
    --border: #e2e8f0;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0; padding: 0; line-height: 1.5;
}

/* --- LAYOUT --- */
.page-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    min-height: 80vh;
}

#app-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* --- HAUPT-NAVIGATION (Die Buttons, die gefehlt haben!) --- */
.nav-pills-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.nav-pill {
    background: white;
    color: var(--text-light);
    padding: 10px 24px;
    border-radius: 99px; /* Pillenform */
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-pill:hover {
    background: #e2e8f0;
    color: var(--text);
    transform: translateY(-2px);
}

.nav-pill.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* --- SUB-NAVIGATION (Filter: A1, A2...) --- */
.nav-scroll-wrapper {
    display: flex; overflow-x: auto; gap: 10px; padding: 10px 5px; margin-bottom: 30px;
    justify-content: center; flex-wrap: wrap;
    scrollbar-width: none;
}
.nav-scroll-wrapper::-webkit-scrollbar { display: none; }

.nav-chip {
    background: white; border: 1px solid var(--border);
    padding: 8px 16px; border-radius: 20px;
    font-size: 14px; font-weight: 600; color: var(--text-light);
    cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px;
}
.nav-chip:hover { background: #f1f5f9; border-color: #cbd5e1; }
.nav-chip.active { background: var(--primary); color: white; border-color: var(--primary); }
.nav-chip.chip-exam { border-color: #fca5a5; color: #b91c1c; }
.nav-chip.chip-exam.active { background: #dc2626; color: white; }
.nav-chip.chip-high { border-color: #fcd34d; color: #b45309; }
.nav-chip.chip-high.active { background: #d97706; color: white; }

/* --- KARTEN --- */
.content-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px;
}
.card {
    background: white; border-radius: 16px; border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); transition: transform 0.2s;
    display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; height: 100%;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 12px 20px -3px rgba(0,0,0,0.1); }
.btn-check-card {
    text-decoration: none; text-align: center; display: block; color: white; border: none;
    font-size: 16px; padding: 12px; border-radius: 12px; font-weight: 700;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); transition: filter 0.2s;
}
.btn-check-card:hover { filter: brightness(110%); }

/* --- TRAINER --- */
#exercise-content {
    background: white; border-radius: 16px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    padding: 30px; min-height: 400px; display: flex; flex-direction: column;
}
.exercise-header { margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
#prog-container { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
#prog-bar { flex-grow: 1; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
#fill { height: 100%; background: var(--primary); width: 0%; transition: width 0.3s; }

/* Inputs */
.gap-input {
    border: 2px solid #cbd5e1; border-radius: 8px; padding: 8px 12px; font-size: 18px; text-align: center;
    background: #f8fafc; outline: none; margin: 0 5px;
}
.gap-input:focus { border-color: var(--primary); background: white; }
.gap-input.shake { animation: shake 0.4s; border-color: var(--error); }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

/* Sortier-Spiel */
.sorting-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 25px; }
.sort-zone {
    border-radius: 15px; min-height: 220px; padding: 15px; display: flex; flex-direction: column; align-items: center; gap: 10px;
    border: 4px solid rgba(0,0,0,0.05); box-shadow: inset 0 2px 6px rgba(0,0,0,0.03);
}
.sort-zone[data-cat="Nomen"] { background: #fef08a; border-color: #eab308; }
.sort-zone[data-cat="Verben"] { background: #dcfce7; border-color: #22c55e; }
.sort-zone[data-cat="Adjektive"] { background: #ffedd5; border-color: #f97316; }
.sort-zone[data-cat="Artikel"] { background: #dbeafe; border-color: #3b82f6; }
.sort-zone[data-cat="Pronomen"] { background: #f3e8ff; border-color: #a855f7; }
.sort-zone[data-cat="Preposition"] { background: #f1f5f9; border-color: #64748b; }
.sort-zone[data-cat="Possessiv"] { background: #fee2e2; border-color: #ef4444; }
.zone-header { font-weight: 900; text-transform: uppercase; margin-bottom: 5px; opacity: 0.6; pointer-events: none; }

.word-card {
    background: white; padding: 10px 15px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-weight: 700; cursor: grab; border: 3px solid white; width: 90%; text-align: center; position: relative;
    user-select: none; z-index: 5;
}
.word-card:active { cursor: grabbing; transform: scale(1.05); z-index: 10; }
.word-card.correct { border-color: #22c55e; background: #f0fdf4; color: #15803d; }
.word-card.wrong { border-color: #ef4444; background: #fef2f2; color: #b91c1c; }
.word-pool { background: #f1f5f9; padding: 20px; border-radius: 16px; min-height: 140px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Quiz */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.choice-btn { background: white; border: 2px solid var(--border); padding: 15px; border-radius: 12px; text-align: center; font-weight: 600; cursor: pointer; }
.choice-btn.selected { border-color: var(--primary); background: #eff6ff; color: var(--primary-dark); }
.quiz-question-box { background: #fff7ed; border-left: 6px solid #f97316; padding: 25px; border-radius: 8px; font-family: monospace; font-size: 1.3rem; margin-bottom: 30px; }

/* Buttons & Footer */
#action-bar { margin-top: 30px; display: flex; align-items: center; justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 20px; }
#btn-action { background: var(--primary); color: white; border: none; padding: 12px 24px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.btn-outline { background: white; border: 1px solid #cbd5e1; color: var(--text-light); padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; margin-right: 10px; }
#feedback { margin-right: auto; font-weight: 700; font-size: 18px; }
#app-footer { text-align: center; padding: 30px; color: var(--text-light); font-size: 14px; }

/* Mobile */
#virtual-keyboard { position: fixed; bottom: 0; left: 0; width: 100%; background: #e2e8f0; padding: 10px; display: none; z-index: 1000; text-align: center; }
.kb-key { background: white; border: 1px solid #cbd5e1; border-radius: 6px; padding: 10px; min-width: 30px; font-weight: 600; margin: 2px; }

@media (max-width: 600px) {
    .sorting-container { grid-template-columns: 1fr; }
    .choice-grid { grid-template-columns: 1fr; }
    .page-wrapper { padding: 10px; }
}
/* --- GEOGRAFIE / MAP DRAG --- */
.map-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 20px auto;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
    background: #e2e8f0; /* Fallback Hintergrund */
}

.map-image {
    width: 100%;
    display: block;
    user-select: none;
    pointer-events: none; /* Wichtig: Bild soll Drag nicht stören */
}

.map-drop-zone {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    border: 2px dashed #475569;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
    font-weight: bold;
    color: transparent; /* Text verstecken, nur fürs Debugging sichtbar machen wenn nötig */
}

.map-drop-zone:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--primary);
}

.map-drop-zone.correct {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.4);
}

.map-drop-zone.wrong {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.4);
}

/* Anpassung der Word-Card für die Karte: Kleiner */
.map-drop-zone .word-card {
    width: 100%;
    height: 100%;
    font-size: 0.8rem;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    box-shadow: none;
    margin: 0;
}