/* ===== Amalias Welt - Hauptstylesheet ===== */

:root {
    --rosa: #ff69b4;
    --rosa-hell: #ffb6d9;
    --rosa-zart: #fff0f5;
    --gelb: #ffd700;
    --gelb-hell: #fff3b0;
    --portugal-gruen: #006600;
    --portugal-rot: #ff0000;
    --portugal-gelb: #ffcc00;
    --weiss: #ffffff;
    --text: #333333;
    --text-hell: #666666;
    --schatten: rgba(0, 0, 0, 0.1);
    --radius: 20px;
    --radius-klein: 12px;
}

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

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text);
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

/* ===== Azulejo-Muster Hintergrund ===== */
.azulejo-bg {
    background-color: var(--rosa-zart);
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 105, 180, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 215, 0, 0.08) 0%, transparent 50%);
    position: relative;
}

.azulejo-bg::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='%23ff69b4' stroke-width='0.5' opacity='0.08'/%3E%3Ccircle cx='30' cy='30' r='8' fill='none' stroke='%23006600' stroke-width='0.5' opacity='0.06'/%3E%3C/svg%3E");
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

body > *:not(script) {
    position: relative;
    z-index: 1;
}

/* ===== Login-Seite ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: var(--weiss);
    border-radius: var(--radius);
    padding: 40px 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px var(--schatten);
    text-align: center;
    border: 3px solid var(--rosa-hell);
}

.login-box .portugal-wappen {
    font-size: 4rem;
    margin-bottom: 10px;
    display: block;
    animation: schweben 3s ease-in-out infinite;
}

.login-box h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--rosa);
    margin-bottom: 5px;
}

.login-box .untertitel {
    font-size: 0.95rem;
    color: var(--text-hell);
    margin-bottom: 25px;
}

.login-box .portugal-streifen {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 25px;
}

.login-box .portugal-streifen span:first-child {
    flex: 2;
    background: var(--portugal-gruen);
}

.login-box .portugal-streifen span:last-child {
    flex: 3;
    background: var(--portugal-rot);
}

.form-gruppe {
    margin-bottom: 20px;
    text-align: left;
}

.form-gruppe label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--text);
}

.form-gruppe input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--rosa-hell);
    border-radius: var(--radius-klein);
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.form-gruppe input:focus {
    border-color: var(--rosa);
    box-shadow: 0 0 0 4px rgba(255, 105, 180, 0.15);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-klein);
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.96);
}

.btn-rosa {
    background: linear-gradient(135deg, var(--rosa), #ff85c8);
    color: var(--weiss);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.btn-rosa:hover {
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
    transform: translateY(-1px);
}

.btn-gelb {
    background: linear-gradient(135deg, var(--gelb), #ffe44d);
    color: var(--text);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-gruen {
    background: linear-gradient(135deg, var(--portugal-gruen), #008800);
    color: var(--weiss);
    box-shadow: 0 4px 15px rgba(0, 102, 0, 0.3);
}

.btn-rot {
    background: linear-gradient(135deg, var(--portugal-rot), #ff4444);
    color: var(--weiss);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.2);
}

.btn-voll {
    width: 100%;
}

.fehler-meldung {
    background: #fff0f0;
    color: var(--portugal-rot);
    padding: 12px;
    border-radius: var(--radius-klein);
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #ffcccc;
}

/* ===== Dashboard ===== */
.dashboard-header {
    background: linear-gradient(135deg, var(--portugal-gruen), #004d00);
    color: var(--weiss);
    padding: 20px 20px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    height: 30px;
    background: var(--rosa-zart);
    border-radius: 50% 50% 0 0;
}

.dashboard-header .begruessung {
    font-size: 1.5rem;
    font-weight: 800;
}

.dashboard-header .begruessung .name {
    color: var(--gelb);
}

.dashboard-header .untertitel {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-top: 4px;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header-nav .flagge {
    font-size: 1.5rem;
}

.logout-link {
    color: var(--weiss);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.8;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    transition: opacity 0.2s;
}

.logout-link:hover {
    opacity: 1;
}

.dashboard-content {
    padding: 25px 20px 40px;
    max-width: 600px;
    margin: 0 auto;
}

.abschnitt-titel {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--portugal-gruen);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== App-Karten ===== */
.app-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

.app-karte {
    background: var(--weiss);
    border-radius: var(--radius);
    padding: 24px 20px;
    box-shadow: 0 4px 20px var(--schatten);
    text-decoration: none;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.app-karte:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.app-karte:active {
    transform: scale(0.98);
}

.app-karte.mathe {
    border-color: var(--gelb-hell);
}

.app-karte.mathe:hover {
    border-color: var(--gelb);
}

.app-karte.portugiesisch {
    border-color: rgba(0, 102, 0, 0.2);
}

.app-karte.portugiesisch:hover {
    border-color: var(--portugal-gruen);
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.app-icon.mathe-icon {
    background: linear-gradient(135deg, var(--gelb-hell), var(--gelb));
}

.app-icon.portugiesisch-icon {
    background: linear-gradient(135deg, #c8f7c5, #7bed7b);
}

.app-info h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 3px;
}

.app-info p {
    font-size: 0.85rem;
    color: var(--text-hell);
}

/* ===== Steckbrief ===== */
.steckbrief {
    background: var(--weiss);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 4px 20px var(--schatten);
}

.steckbrief-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.steckbrief-item {
    background: var(--rosa-zart);
    border-radius: var(--radius-klein);
    padding: 12px;
    text-align: center;
}

.steckbrief-item .emoji {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 4px;
}

.steckbrief-item .label {
    font-size: 0.7rem;
    color: var(--text-hell);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.steckbrief-item .wert {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

/* ===== App-Seiten Header ===== */
.app-header {
    background: linear-gradient(135deg, var(--portugal-gruen), #004d00);
    color: var(--weiss);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header .zurueck {
    color: var(--weiss);
    text-decoration: none;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    padding: 4px;
}

.app-header h1 {
    font-size: 1.2rem;
    font-weight: 800;
}

.app-header .punkte {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* ===== Mathe-App ===== */
.mathe-container {
    padding: 25px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.mathe-aufgabe {
    background: var(--weiss);
    border-radius: var(--radius);
    padding: 30px 20px;
    box-shadow: 0 4px 20px var(--schatten);
    text-align: center;
    margin-bottom: 20px;
}

.aufgabe-typ {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--portugal-gruen);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.aufgabe-rechnung {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 25px;
    letter-spacing: 4px;
}

.aufgabe-rechnung .operator {
    color: var(--rosa);
    margin: 0 5px;
}

.aufgabe-rechnung .gleich {
    color: var(--portugal-gruen);
}

.aufgabe-rechnung .fragezeichen {
    display: inline-block;
    background: var(--gelb-hell);
    border-radius: 12px;
    padding: 0 15px;
    color: var(--gelb);
    animation: pulsieren 1.5s ease-in-out infinite;
}

.antwort-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.antwort-btn {
    padding: 18px;
    border: 3px solid rgba(255, 105, 180, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.antwort-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.15);
    border-color: var(--rosa-hell);
}

.antwort-btn:active {
    transform: scale(0.94);
}

.antwort-btn.richtig {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: var(--portugal-gruen);
    color: var(--portugal-gruen);
    box-shadow: 0 0 25px rgba(0, 102, 0, 0.3), 0 4px 15px rgba(0, 102, 0, 0.15);
    animation: glow-gruen 0.6s ease, huepfen 0.5s ease;
}

.antwort-btn.falsch {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-color: var(--portugal-rot);
    color: var(--portugal-rot);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
    animation: schuetteln 0.4s ease;
}

.mathe-fortschritt {
    background: var(--weiss);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 4px 20px var(--schatten);
    margin-bottom: 20px;
}

.fortschritt-bar {
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.fortschritt-fuell {
    height: 100%;
    background: linear-gradient(90deg, var(--portugal-gruen), #00cc00);
    border-radius: 6px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(0, 204, 0, 0.4);
    position: relative;
}

.fortschritt-fuell::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

.fortschritt-text {
    font-size: 0.8rem;
    color: var(--text-hell);
    text-align: center;
    font-weight: 600;
}

.mathe-level-auswahl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.level-btn {
    padding: 12px;
    border: 2px solid var(--rosa-hell);
    border-radius: var(--radius-klein);
    background: var(--weiss);
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.level-btn.aktiv {
    background: var(--gelb-hell);
    border-color: var(--gelb);
    color: var(--text);
}

.level-btn:active {
    transform: scale(0.96);
}

.ergebnis-screen {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px 20px;
    box-shadow:
        0 8px 40px rgba(255, 105, 180, 0.15),
        0 0 80px rgba(255, 215, 0, 0.1);
    text-align: center;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: ergebnis-einblenden 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ergebnis-screen .stern {
    font-size: 4.5rem;
    margin-bottom: 15px;
    display: block;
    animation: schweben 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
}

.ergebnis-screen h2 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--rosa), var(--portugal-rot));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.ergebnis-screen p {
    color: var(--text-hell);
    margin-bottom: 20px;
    font-weight: 600;
}

/* ===== Portugiesisch-App ===== */
.pt-container {
    padding: 20px 16px 40px;
    max-width: 500px;
    margin: 0 auto;
}

/* --- Modus-Wahl --- */
.pt-modus-wahl {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.pt-modus-btn {
    padding: 12px 8px;
    border: 2px solid rgba(255, 105, 180, 0.2);
    border-radius: var(--radius-klein);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.pt-modus-btn .emoji {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 2px;
}

.pt-modus-btn.aktiv {
    background: linear-gradient(135deg, var(--gelb-hell), var(--gelb));
    border-color: var(--gelb);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), 0 4px 15px rgba(255, 215, 0, 0.2);
    transform: scale(1.03);
}

.pt-modus-btn:active {
    transform: scale(0.95);
}

/* --- Kategorie-Grid --- */
.pt-kategorie-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 22px;
}

.pt-kategorie-btn {
    padding: 10px 4px;
    border: 2px solid rgba(255, 105, 180, 0.15);
    border-radius: var(--radius-klein);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'Nunito', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.pt-kategorie-btn .emoji {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 2px;
}

.pt-kategorie-btn.aktiv {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-color: var(--portugal-gruen);
    box-shadow: 0 0 15px rgba(0, 102, 0, 0.2), 0 4px 12px rgba(0, 102, 0, 0.1);
    transform: scale(1.05);
}

.pt-kategorie-btn:active {
    transform: scale(0.93);
}

/* --- Lernkarten --- */
.pt-karte-container {
    perspective: 1200px;
    margin-bottom: 20px;
}

.pt-karte {
    background: linear-gradient(145deg, #ffffff, #fefefe);
    border-radius: 24px;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    box-shadow:
        0 4px 30px rgba(255, 105, 180, 0.12),
        0 0 60px rgba(255, 105, 180, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
    transform-style: preserve-3d;
    position: relative;
    border: 2px solid rgba(255, 105, 180, 0.12);
}

.pt-karte:hover {
    box-shadow:
        0 8px 40px rgba(255, 105, 180, 0.2),
        0 0 80px rgba(255, 105, 180, 0.1);
}

.pt-karte.umgedreht {
    transform: rotateY(180deg);
}

.pt-karte.umgedreht:hover {
    box-shadow:
        0 8px 40px rgba(0, 102, 0, 0.2),
        0 0 80px rgba(0, 102, 0, 0.1);
}

.pt-karte-vorne,
.pt-karte-hinten {
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.pt-karte-hinten {
    position: absolute;
    transform: rotateY(180deg);
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: linear-gradient(145deg, #f0fff0, #ffffff);
}

.pt-karte .wort-emoji {
    font-size: 3.5rem;
    margin-bottom: 12px;
    animation: schweben 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.pt-karte .wort-deutsch {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.pt-karte .wort-portugiesisch {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--portugal-gruen), #00aa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.pt-karte .wort-aussprache {
    font-size: 0.85rem;
    color: var(--text-hell);
    font-style: italic;
}

.pt-karte .hinweis {
    font-size: 0.75rem;
    color: var(--rosa);
    margin-top: 10px;
    font-weight: 600;
    animation: pulsieren 2s ease-in-out infinite;
}

/* --- Audio-Button --- */
.audio-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--portugal-gruen), #00aa00);
    color: var(--weiss);
    font-size: 1.2rem;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0, 102, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.audio-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 0 25px rgba(0, 102, 0, 0.5), 0 6px 20px rgba(0, 102, 0, 0.3);
}

.audio-btn:active {
    transform: scale(0.9);
}

.audio-btn.spielt {
    animation: audio-puls 0.8s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(0, 102, 0, 0.6), 0 0 60px rgba(0, 102, 0, 0.3);
}

@keyframes audio-puls {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 102, 0, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(0, 102, 0, 0.7), 0 0 80px rgba(0, 102, 0, 0.3); transform: scale(1.08); }
}

.audio-btn-klein {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

/* --- Navigation --- */
.pt-navigation {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.pt-nav-btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-klein);
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.pt-nav-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.pt-nav-btn:hover::after {
    opacity: 1;
}

.pt-nav-btn:active {
    transform: scale(0.93);
}

.pt-nav-btn.zurueck-btn {
    background: linear-gradient(135deg, #e8e8e8, #f5f5f5);
    color: var(--text);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.pt-nav-btn.weiter-btn {
    background: linear-gradient(135deg, var(--portugal-gruen), #00aa00);
    color: var(--weiss);
    box-shadow: 0 4px 20px rgba(0, 102, 0, 0.3);
}

.pt-nav-btn.weiter-btn:hover {
    box-shadow: 0 0 25px rgba(0, 102, 0, 0.4), 0 6px 20px rgba(0, 102, 0, 0.3);
}

.pt-zaehler {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-hell);
    font-weight: 600;
    margin-bottom: 16px;
}

/* --- Quiz --- */
.pt-quiz-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 28px 18px;
    box-shadow:
        0 4px 30px rgba(255, 105, 180, 0.1),
        0 0 50px rgba(255, 105, 180, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 105, 180, 0.1);
}

.pt-quiz-container .frage-emoji {
    font-size: 3rem;
    margin-bottom: 8px;
    display: block;
    animation: schweben 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.pt-quiz-container .frage-text {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text);
    line-height: 1.4;
    padding: 0 4px;
}

.pt-quiz-antworten {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pt-quiz-btn {
    padding: 14px 10px;
    border: 2px solid rgba(255, 105, 180, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    word-break: break-word;
    hyphens: auto;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    position: relative;
    overflow: hidden;
}

.pt-quiz-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, transparent, rgba(255, 105, 180, 0.1));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.pt-quiz-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.15);
    border-color: var(--rosa-hell);
}

.pt-quiz-btn:hover::before {
    opacity: 1;
}

.pt-quiz-btn:active {
    transform: scale(0.96);
}

.pt-quiz-btn.richtig {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: var(--portugal-gruen);
    color: var(--portugal-gruen);
    box-shadow: 0 0 25px rgba(0, 102, 0, 0.3), 0 4px 15px rgba(0, 102, 0, 0.15);
    animation: glow-gruen 0.6s ease;
}

.pt-quiz-btn.falsch {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-color: var(--portugal-rot);
    color: var(--portugal-rot);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
    animation: schuetteln 0.4s ease;
}

@keyframes glow-gruen {
    0% { box-shadow: 0 0 5px rgba(0, 102, 0, 0.2); }
    50% { box-shadow: 0 0 40px rgba(0, 102, 0, 0.5), 0 0 80px rgba(0, 102, 0, 0.2); }
    100% { box-shadow: 0 0 25px rgba(0, 102, 0, 0.3), 0 4px 15px rgba(0, 102, 0, 0.15); }
}

/* --- Audio-Quiz-Modus --- */
.audio-quiz-frage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.audio-quiz-frage .audio-btn {
    width: 72px;
    height: 72px;
    font-size: 1.8rem;
    margin: 0;
    box-shadow: 0 0 30px rgba(0, 102, 0, 0.3), 0 8px 25px rgba(0, 102, 0, 0.2);
}

.audio-quiz-frage .audio-hinweis {
    font-size: 0.8rem;
    color: var(--text-hell);
    font-weight: 600;
}

@keyframes ergebnis-einblenden {
    0% { transform: scale(0.8) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ===== Acentos-App ===== */
.app-karte.acentos {
    border-color: rgba(138, 43, 226, 0.2);
}

.app-karte.acentos:hover {
    border-color: #8a2be2;
}

.app-icon.acentos-icon {
    background: linear-gradient(135deg, #e8d5f5, #c89efc);
    font-family: 'Nunito', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #6a1b9a;
}

.ac-container {
    padding: 20px 16px 40px;
    max-width: 500px;
    margin: 0 auto;
}

.ac-modus-wahl {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.ac-modus-btn {
    padding: 12px 8px;
    border: 2px solid rgba(138, 43, 226, 0.15);
    border-radius: var(--radius-klein);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.ac-modus-btn .emoji {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 2px;
}

.ac-modus-btn.aktiv {
    background: linear-gradient(135deg, #e8d5f5, #c89efc);
    border-color: #8a2be2;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3), 0 4px 15px rgba(138, 43, 226, 0.15);
    transform: scale(1.03);
}

.ac-modus-btn:active {
    transform: scale(0.95);
}

.ac-zaehler {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-hell);
    font-weight: 600;
    margin-bottom: 16px;
}

/* --- Lernkarte --- */
.ac-lernkarte {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 28px 20px;
    box-shadow:
        0 4px 30px rgba(138, 43, 226, 0.1),
        0 0 60px rgba(138, 43, 226, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid rgba(138, 43, 226, 0.1);
}

.ac-lernkarte.einblenden {
    animation: karte-rein 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ac-zeichen-gross {
    font-size: 4rem;
    font-weight: 800;
    color: #6a1b9a;
    margin-bottom: 4px;
    text-shadow: 0 0 30px rgba(138, 43, 226, 0.3);
    animation: schweben 3s ease-in-out infinite;
    letter-spacing: 12px;
}

.ac-zeichen-name {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8a2be2, #6a1b9a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
}

.ac-zeichen-symbol {
    font-size: 1rem;
    color: var(--text-hell);
    margin-bottom: 18px;
    font-weight: 600;
}

.ac-info-box {
    background: rgba(138, 43, 226, 0.04);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 10px;
    text-align: left;
    border: 1px solid rgba(138, 43, 226, 0.08);
}

.ac-info-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #8a2be2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ac-info-text {
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.5;
    font-weight: 600;
}

/* --- Beispiele --- */
.ac-beispiele {
    margin-top: 16px;
    text-align: left;
}

.ac-beispiel-titel {
    font-size: 0.75rem;
    font-weight: 800;
    color: #8a2be2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.ac-beispiel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(138, 43, 226, 0.04);
    border-radius: 12px;
    margin-bottom: 6px;
    border: 1px solid rgba(138, 43, 226, 0.06);
}

.ac-beispiel-wort {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    min-width: 80px;
}

.ac-highlight {
    color: #8a2be2;
    text-shadow: 0 0 12px rgba(138, 43, 226, 0.4);
    font-size: 1.2em;
}

.ac-beispiel-bedeutung {
    font-size: 0.8rem;
    color: var(--text-hell);
    font-weight: 600;
    flex: 1;
}

.ac-beispiel-audio {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.8rem !important;
    margin: 0 !important;
    flex-shrink: 0;
}

/* --- Navigation --- */
.ac-navigation {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.ac-nav-btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-klein);
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ac-nav-btn:active {
    transform: scale(0.93);
}

.ac-nav-btn.zurueck-btn {
    background: linear-gradient(135deg, #e8e8e8, #f5f5f5);
    color: var(--text);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.ac-nav-btn.weiter-btn {
    background: linear-gradient(135deg, #8a2be2, #6a1b9a);
    color: var(--weiss);
    box-shadow: 0 4px 20px rgba(138, 43, 226, 0.3);
}

.ac-nav-btn.weiter-btn:hover {
    box-shadow: 0 0 25px rgba(138, 43, 226, 0.4), 0 6px 20px rgba(138, 43, 226, 0.3);
}

/* --- Quiz-Karte --- */
.ac-quiz-karte {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 28px 18px;
    box-shadow:
        0 4px 30px rgba(138, 43, 226, 0.1),
        0 0 50px rgba(138, 43, 226, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid rgba(138, 43, 226, 0.1);
}

.ac-quiz-karte.einblenden {
    animation: frage-rein 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ac-quiz-zeichen {
    font-size: 3.5rem;
    font-weight: 800;
    color: #6a1b9a;
    margin-bottom: 8px;
    text-shadow: 0 0 25px rgba(138, 43, 226, 0.3);
    animation: schweben 3s ease-in-out infinite;
}

.ac-quiz-frage {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text);
    line-height: 1.4;
    padding: 0 4px;
}

.ac-quiz-antworten {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ac-antwort-btn {
    padding: 14px 10px;
    border: 2px solid rgba(138, 43, 226, 0.15);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    word-break: break-word;
    hyphens: auto;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
}

.ac-antwort-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.15);
    border-color: rgba(138, 43, 226, 0.3);
}

.ac-antwort-btn:active {
    transform: scale(0.96);
}

.ac-antwort-btn.richtig {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: var(--portugal-gruen);
    color: var(--portugal-gruen);
    box-shadow: 0 0 25px rgba(0, 102, 0, 0.3), 0 4px 15px rgba(0, 102, 0, 0.15);
    animation: glow-gruen 0.6s ease;
}

.ac-antwort-btn.falsch {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-color: var(--portugal-rot);
    color: var(--portugal-rot);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
    animation: schuetteln 0.4s ease;
}

/* --- Buchstaben-Buttons (Einsetzen-Modus) --- */
.ac-buchstabe-btn {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    min-height: 64px;
    letter-spacing: 0;
}

/* --- Lücken-Wort --- */
.ac-wort-luecke {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    letter-spacing: 2px;
}

.ac-wort-teil {
    color: var(--text);
}

.ac-luecke {
    display: inline-block;
    min-width: 36px;
    border-bottom: 4px solid #8a2be2;
    color: #8a2be2;
    animation: pulsieren 1.5s ease-in-out infinite;
    text-align: center;
    margin: 0 2px;
    transition: all 0.3s;
}

.ac-luecke-richtig {
    border-color: var(--portugal-gruen);
    color: var(--portugal-gruen);
    text-shadow: 0 0 15px rgba(0, 102, 0, 0.4);
    animation: huepfen 0.5s ease;
}

.ac-luecke-falsch {
    border-color: var(--portugal-rot);
    color: var(--portugal-rot);
    animation: schuetteln 0.4s ease;
}

/* --- Responsive für Acentos --- */
@media (max-width: 360px) {
    .ac-modus-wahl {
        gap: 6px;
    }

    .ac-modus-btn {
        padding: 10px 4px;
        font-size: 0.7rem;
    }

    .ac-zeichen-gross {
        font-size: 3rem;
        letter-spacing: 8px;
    }

    .ac-antwort-btn {
        font-size: 0.78rem;
        padding: 12px 8px;
        min-height: 48px;
    }

    .ac-buchstabe-btn {
        font-size: 1.3rem !important;
        min-height: 56px;
    }

    .ac-wort-luecke {
        font-size: 1.8rem;
    }
}

/* --- Karten-Einblend-Animation --- */
.pt-karte.einblenden {
    animation: karte-rein 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes karte-rein {
    0% { transform: scale(0.9) translateY(15px); opacity: 0.5; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.pt-quiz-container.einblenden {
    animation: frage-rein 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes frage-rein {
    0% { transform: translateX(30px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* --- Partikel-Container --- */
.partikel-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.partikel {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: partikel-fliegen var(--dauer, 1s) ease-out forwards;
}

@keyframes partikel-fliegen {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx, 50px), var(--ty, -80px)) scale(0) rotate(var(--tr, 360deg));
    }
}

/* --- Streak-Anzeige --- */
.streak-anzeige {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gelb), #ffaa00);
    color: var(--text);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.9rem;
    z-index: 200;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), 0 4px 15px rgba(255, 215, 0, 0.3);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.streak-anzeige.sichtbar {
    opacity: 1;
    animation: streak-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes streak-bounce {
    0% { transform: translateX(-50%) scale(0.5) translateY(-10px); }
    60% { transform: translateX(-50%) scale(1.15); }
    100% { transform: translateX(-50%) scale(1); }
}

/* ===== Feedback-Overlay ===== */
.feedback-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.feedback-overlay.sichtbar {
    opacity: 1;
}

.feedback-overlay .feedback-inhalt {
    font-size: 5rem;
    animation: aufploppen 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.6));
}

/* ===== Animationen ===== */
@keyframes schweben {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulsieren {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes huepfen {
    0% { transform: scale(1); }
    30% { transform: scale(1.12); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@keyframes schuetteln {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

@keyframes aufploppen {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes konfetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* ===== Responsive ===== */
@media (min-width: 480px) {
    .app-grid {
        grid-template-columns: 1fr;
    }
    
    .steckbrief-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .pt-quiz-btn {
        font-size: 1rem;
        padding: 16px 14px;
    }
}

@media (min-width: 768px) {
    .login-box {
        padding: 50px 40px;
    }
    
    .dashboard-content {
        padding: 30px;
    }
    
    .app-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pt-quiz-btn {
        font-size: 1.05rem;
        padding: 18px 16px;
    }

    .pt-quiz-container {
        padding: 35px 25px;
    }
}

@media (max-width: 360px) {
    .pt-kategorie-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .pt-kategorie-btn {
        padding: 8px 2px;
        font-size: 0.6rem;
    }

    .pt-kategorie-btn .emoji {
        font-size: 1.1rem;
    }

    .pt-quiz-btn {
        font-size: 0.8rem;
        padding: 12px 8px;
        min-height: 50px;
    }

    .pt-modus-wahl {
        gap: 6px;
    }

    .pt-modus-btn {
        padding: 10px 4px;
        font-size: 0.7rem;
    }
}
