/**
 * Responsive Styles für den Vokabeltrainer
 * Behält das Original-Design bei und optimiert nur für Mobile
 */

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

html {
    font-size: 16px;
}

/* Container responsive anpassen */
.container, .card {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    margin: 10px auto;
}

/* Typografie skalierbar */
h1 {
    font-size: clamp(1.8em, 5vw, 2.5em);
    word-wrap: break-word;
}

h2 {
    font-size: clamp(1.4em, 4vw, 2em);
}

p {
    font-size: clamp(0.95em, 3vw, 1.3em);
}

/* Formular-Elemente - Touch-freundlich (16px verhindert Zoom auf iOS) */
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 15px;
    margin: 8px 0;
    font-size: 16px;
    border-radius: 12px;
    border: 2px solid #ddd;
    outline: none;
}

/* Buttons - Groß und klickbar */
button, .btn, a.btn {
    display: inline-block;
    width: 100%;
    padding: 15px 20px;
    margin: 8px 0;
    font-size: clamp(1em, 4vw, 1.3em);
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.1s;
    touch-action: manipulation;
}

button:active, .btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2) !important;
}

/* Emoji responsive */
.emoji {
    font-size: clamp(2em, 8vw, 3em);
    display: block;
    margin-bottom: 10px;
}

/* Tabellen responsive */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 15px 0;
}

table {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
}

th, td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: clamp(0.85em, 3vw, 1em);
    white-space: nowrap;
}

/* Wort-Anzeige */
.word-box {
    font-size: clamp(1.5em, 6vw, 2.5em);
    font-weight: bold;
    margin: 20px 0;
    padding: 15px;
    word-wrap: break-word;
}

/* Score/Progress */
.score-board, .progress {
    font-size: clamp(0.9em, 3vw, 1.2em);
}

/* Nachrichten */
.message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 12px;
    font-size: clamp(0.9em, 3vw, 1.1em);
    word-wrap: break-word;
}

/* Links */
.back-link, .back-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    font-size: clamp(0.9em, 3vw, 1em);
}

/* Badge */
.badge {
    display: inline-block;
    background: rgba(255,255,255,0.3);
    padding: 4px 10px;
    border-radius: 10px;
    font-size: clamp(0.7em, 2.5vw, 0.8em);
    margin-left: 10px;
}

/* Kleine Handys (bis 360px) */
@media (max-width: 360px) {
    body {
        padding: 5px;
    }
    
    .container, .card {
        padding: 15px;
        margin: 5px;
        border-radius: 20px;
    }
    
    button, .btn {
        padding: 12px 15px;
    }
}

/* Tablets und größer (ab 768px) */
@media (min-width: 768px) {
    body {
        padding: 30px;
    }
    
    .container, .card {
        max-width: 450px;
        padding: 30px 40px;
    }
    
    /* Buttons nebeneinander auf größeren Screens */
    .btn-row {
        display: flex;
        gap: 10px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .btn-row button,
    .btn-row .btn {
        width: auto;
        min-width: 150px;
    }
}

/* Desktop (ab 1024px) */
@media (min-width: 1024px) {
    .container, .card {
        max-width: 500px;
    }
}

/* Landscape-Modus auf Handys */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        align-items: flex-start;
        padding-top: 15px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .emoji {
        font-size: 2em;
    }
    
    .container, .card {
        padding: 15px 20px;
    }
}

/* Reduzierte Bewegung */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
