/* ============================================
   VOKABELTRAINER - CLEAN DESIGN
   Farben: #F2F2F2 (Hellgrau) & #ada996 (Olivgrün)
   ============================================ */

/* Reset & Basis */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #F2F2F2;
    min-height: 100vh;
    padding: 0;
    color: #2d3748;
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
    background: #ffffff;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-bottom: 3px solid #ada996;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar h1 {
    font-size: 22px;
    color: #2d3748;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar h1 i {
    font-size: 24px;
    color: #ada996;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ada996;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.back-btn {
    background: #ada996;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.back-btn:hover {
    background: #969684;
    transform: translateX(-2px);
}

.logout-btn {
    background: #fff;
    color: #e53e3e;
    padding: 8px 16px;
    border: 2px solid #e53e3e;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    font-weight: 500;
}

.logout-btn:hover {
    background: #e53e3e;
    color: white;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
}

/* ============================================
   STATISTIK KARTEN MIT ICONS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    border-left: 4px solid #ada996;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    color: white;
}

.stat-icon i {
    font-size: 28px;
}

.stat-icon.purple {
    background: #ada996;
}

.stat-icon.blue {
    background: #7b9fa3;
}

.stat-icon.green {
    background: #6b8e6f;
}

.stat-icon.red {
    background: #c9736c;
}

.stat-info h3 {
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 4px;
    font-weight: 700;
}

.stat-info p {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    color: #2d3748;
    font-weight: 600;
}

.add-btn {
    background: #ada996;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(173, 169, 150, 0.3);
}

.add-btn:hover {
    background: #969684;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(173, 169, 150, 0.4);
}

/* ============================================
   KATEGORIE KARTEN
   ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    border-top: 4px solid #ada996;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.category-header h3 {
    font-size: 20px;
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 16px;
}

.category-stats {
    display: flex;
    gap: 20px;
    margin: 16px 0;
    padding: 16px;
    background: #F2F2F2;
    border-radius: 8px;
}

.category-stat {
    text-align: center;
    flex: 1;
}

.category-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #ada996;
}

.category-stat-label {
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
    font-weight: 500;
}

.category-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn i {
    font-size: 16px;
}

.btn-primary {
    background: #ada996;
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: #969684;
    transform: translateY(-2px);
}

.btn-success {
    background: #6b8e6f;
    color: white;
    flex: 1;
}

.btn-success:hover {
    background: #5a7a5e;
    transform: translateY(-2px);
}

.btn-danger {
    background: #c9736c;
    color: white;
    padding: 10px 14px;
}

.btn-danger:hover {
    background: #b86560;
    transform: translateY(-2px);
}

.btn-cancel {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-cancel:hover {
    background: #cbd5e0;
}

.btn-submit {
    background: #ada996;
    color: white;
    flex: 2;
}

.btn-submit:hover {
    background: #969684;
    transform: translateY(-2px);
}

button {
    background: #ada996;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

button:hover {
    background: #969684;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

/* ============================================
   BOXES & CARDS
   ============================================ */
.box {
    background: white;
    padding: 28px;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.box h2 {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 20px;
    font-weight: 600;
}

/* ============================================
   KARTEIKARTEN-DESIGN (Lernmodus)
   ============================================ */
.card-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 48px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 3px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.card-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #ada996, #7b9fa3, #6b8e6f);
}

.card-box::after {
    content: '📚';
    position: absolute;
    bottom: 20px;
    right: 30px;
    font-size: 48px;
    opacity: 0.08;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    background: #fff;
}

.form-group input:focus,
input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #ada996;
    box-shadow: 0 0 0 3px rgba(173, 169, 150, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 100px;
    gap: 16px;
    align-items: end;
}

/* ============================================
   TABLES
   ============================================ */
.cards-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.cards-table th {
    background: #F2F2F2;
    padding: 14px;
    text-align: left;
    border-bottom: 2px solid #ada996;
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
    text-transform: uppercase;
}

.cards-table td {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.cards-table tr:hover {
    background: #F2F2F2;
}

.stats {
    color: #718096;
    font-size: 14px;
}

.stats-good {
    color: #6b8e6f;
    font-weight: 600;
}

.stats-bad {
    color: #c9736c;
    font-weight: 600;
}

/* ============================================
   CUSTOM MODAL (ersetzt Browser Confirms)
   ============================================ */
.confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.confirm-overlay.active {
    display: flex;
    animation: fadeIn 0.2s;
}

.confirm-box {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 440px;
    width: 90%;
    animation: slideUp 0.3s;
}

.confirm-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 20px;
}

.confirm-title {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
    margin-bottom: 12px;
}

.confirm-message {
    font-size: 14px;
    color: #718096;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.6;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
}

.confirm-buttons button {
    flex: 1;
}

/* ============================================
   MODAL (Kategorie erstellen)
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 480px;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 20px;
    color: #2d3748;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    transition: all 0.2s;
}

.close-btn:hover {
    color: #4a5568;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    min-width: 300px;
}

.toast.active {
    display: flex;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success {
    border-left: 4px solid #6b8e6f;
}

.toast.error {
    border-left: 4px solid #c9736c;
}

.toast-icon {
    font-size: 20px;
    font-weight: 600;
}

.toast.success .toast-icon {
    color: #6b8e6f;
}

.toast.error .toast-icon {
    color: #c9736c;
}

.toast-message {
    color: #2d3748;
    font-weight: 500;
    font-size: 14px;
}

/* ============================================
   MESSAGE / FEEDBACK
   ============================================ */
.message {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 14px;
}

.message.success,
.feedback.correct {
    background: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #6b8e6f;
}

.message.error,
.feedback.wrong {
    background: #ffebee;
    color: #c62828;
    border: 2px solid #c9736c;
}

.feedback {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.feedback.typo {
    background: #fff8e1;
    color: #f57f17;
    border: 2px solid #fbc02d;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    background: white;
    padding: 64px;
    border-radius: 12px;
    text-align: center;
    border: 2px dashed #cbd5e0;
}

.empty-state-icon {
    margin-bottom: 16px;
    opacity: 0.4;
    color: #ada996;
    font-size: 64px;
}

.empty-state-icon i {
    font-size: 64px;
}

.empty-state h3 {
    font-size: 20px;
    color: #4a5568;
    margin-bottom: 8px;
    font-weight: 600;
}

.empty-state p {
    color: #a0aec0;
    font-size: 14px;
}

.empty {
    text-align: center;
    color: #a0aec0;
    padding: 40px;
    font-size: 14px;
}

/* ============================================
   LEARN PAGE
   ============================================ */
.header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 12px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ada996, #6b8e6f);
    transition: width 0.5s ease-in-out;
}

.question-lang {
    color: #718096;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question {
    font-size: 42px;
    color: #2d3748;
    margin: 32px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.answer-lang {
    color: #718096;
    font-size: 13px;
    margin-bottom: 12px;
    font-weight: 500;
}

.score {
    font-size: 16px;
    color: #4a5568;
    margin: 12px 0;
    font-weight: 500;
}

.next-btn {
    background: #6b8e6f;
    margin-top: 20px;
}

.next-btn:hover {
    background: #5a7a5e;
}

/* ============================================
   COMPLETION SCREEN
   ============================================ */
.completion-screen {
    text-align: center;
}

.completion-screen h2 {
    color: #6b8e6f;
    font-size: 32px;
    margin: 24px 0;
    font-weight: 700;
}

.completion-screen .final-score {
    font-size: 20px;
    color: #2d3748;
    margin: 20px 0;
    font-weight: 500;
}

.completion-screen .btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* ============================================
   TIPPFEHLER CHECK
   ============================================ */

.stats-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.stat-box {
    background: #F2F2F2;
    padding: 20px;
    border-radius: 8px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #ada996;
}

.stat-label {
    font-size: 12px;
    color: #718096;
    margin-top: 6px;
    font-weight: 500;
}

/* ============================================
   TIPPFEHLER CHECK
   ============================================ */
.typo-check {
    padding: 32px;
}

.typo-check h3 {
    color: #f57f17;
    font-size: 26px;
    margin-bottom: 20px;
    font-weight: 700;
    text-align: center;
}

.typo-comparison {
    background: #F2F2F2;
    padding: 24px;
    border-radius: 8px;
    margin: 20px 0;
}

.typo-comparison div {
    margin: 12px 0;
    font-size: 16px;
}

.your-answer {
    color: #c9736c;
    font-weight: 700;
    font-size: 18px;
}

.correct-answer {
    color: #6b8e6f;
    font-weight: 700;
    font-size: 18px;
}

.typo-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
}

.btn-correct {
    background: #6b8e6f;
}

.btn-correct:hover {
    background: #5a7a5e;
}

.btn-wrong {
    background: #c9736c;
}

.btn-wrong:hover {
    background: #b86560;
}

/* ============================================
   LEARN BUTTON
   ============================================ */
.learn-btn {
    background: #6b8e6f;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    display: inline-block;
    margin-top: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.learn-btn:hover {
    background: #5a7a5e;
    transform: translateY(-2px);
}

.edit-btn {
    background: #7b9fa3;
    color: white;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.edit-btn i {
    font-size: 14px;
}

.edit-btn:hover {
    background: #6a8b8f;
    transform: translateY(-1px);
}

.delete-btn {
    background: #c9736c;
    color: white;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.delete-btn i {
    font-size: 14px;
}

.delete-btn:hover {
    background: #b86560;
    transform: translateY(-1px);
}

/* ============================================
   WRONG CARDS LIST (Session Summary)
   ============================================ */
.wrong-cards-list {
    background: #fff5f5;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #fecaca;
    max-height: 300px;
    overflow-y: auto;
}

.wrong-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #fecaca;
}

.wrong-card-item:last-child {
    margin-bottom: 0;
}

.wrong-card-word {
    flex: 1;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.wrong-card-arrow {
    color: #c9736c;
    font-size: 18px;
    font-weight: bold;
}

/* ============================================
   RESPONSIVE - MOBILE OPTIMIERUNG
   ============================================ */

/* Tablet und größere Smartphones (Landscape) */
@media (max-width: 1024px) {
    .container,
    .page-container {
        padding: 24px 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Smartphones (Portrait und kleine Tablets) */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Verhindert Auto-Zoom auf iOS */
    }

    .container,
    .page-container {
        padding: 16px 12px;
    }

    /* Topbar Mobile */
    .topbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .topbar h1 {
        font-size: 18px;
    }

    .topbar h1 i {
        font-size: 20px;
    }

    .user-info {
        gap: 10px;
        font-size: 14px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .back-btn,
    .logout-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    /* Stats Grid Mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 14px;
        flex-direction: row;
        gap: 12px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .stat-icon i {
        font-size: 22px;
    }

    .stat-info h3 {
        font-size: 24px;
    }

    .stat-info p {
        font-size: 12px;
    }

    /* Categories Grid Mobile */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .category-card {
        padding: 20px;
    }

    .category-stats {
        gap: 12px;
        padding: 14px;
    }

    /* Section Header Mobile */
    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .add-btn {
        width: 100%;
        padding: 14px;
        font-size: 15px;
    }

    /* Boxes Mobile */
    .box {
        padding: 20px 16px;
        margin: 16px 0;
    }

    .box h2 {
        font-size: 16px;
    }

    /* Forms Mobile */
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .form-group input,
    input[type="text"],
    input[type="password"] {
        padding: 14px; /* Größer für Touch */
        font-size: 16px; /* Verhindert Auto-Zoom */
    }

    /* Buttons Mobile - Touch-freundlich */
    .btn {
        padding: 12px 18px;
        font-size: 15px;
        min-height: 44px; /* Touch-Target-Größe */
    }

    button {
        padding: 14px 20px;
        font-size: 15px;
        min-height: 44px;
    }

    .category-actions {
        flex-direction: column;
        gap: 10px;
    }

    .category-actions .btn {
        width: 100%;
    }

    /* Tables Mobile - Scrollbar */
    .cards-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cards-table thead,
    .cards-table tbody,
    .cards-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .cards-table td,
    .cards-table th {
        padding: 12px 8px;
        font-size: 13px;
    }

    .edit-btn,
    .delete-btn {
        padding: 8px 10px;
        font-size: 12px;
        display: inline-block;
        margin: 2px;
    }

    /* Learn Page Mobile */
    .card-box {
        padding: 24px 16px;
        min-height: 360px;
    }

    .question {
        font-size: 28px;
        margin: 24px 0;
    }

    .question-lang,
    .answer-lang {
        font-size: 12px;
    }

    .score {
        font-size: 14px;
    }

    /* Stats Preview Mobile */
    .stats-preview {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .stat-box {
        padding: 16px 12px;
    }

    .stat-number {
        font-size: 22px;
    }

    .stat-label {
        font-size: 11px;
    }

    /* Completion Screen Mobile */
    .completion h2 {
        font-size: 24px;
    }

    .completion .final-score {
        font-size: 16px;
    }

    .btn-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn-group .btn {
        width: 100%;
    }

    /* Modal Mobile */
    .modal-content {
        width: 95%;
        padding: 24px 20px;
        margin: 0 10px;
    }

    .confirm-box {
        width: 90%;
        padding: 24px 20px;
    }

    /* Toast Mobile */
    .toast {
        right: 12px;
        left: 12px;
        min-width: auto;
        width: calc(100% - 24px);
    }

    /* Wrong Cards List Mobile */
    .wrong-cards-list {
        padding: 16px;
        max-height: 250px;
    }

    .wrong-card-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px;
    }

    .wrong-card-arrow {
        transform: rotate(90deg);
        margin: 0 auto;
    }

    /* Typo Check Mobile */
    .typo-comparison {
        padding: 16px;
        font-size: 14px;
    }

    .your-answer,
    .correct-answer {
        font-size: 16px;
    }

    .typo-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .typo-buttons .btn {
        width: 100%;
    }
}

/* Sehr kleine Smartphones */
@media (max-width: 380px) {
    .topbar h1 {
        font-size: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: row;
    }

    .question {
        font-size: 22px;
    }

    .card-box {
        padding: 20px 12px;
        min-height: 320px;
    }

    .stats-preview {
        grid-template-columns: 1fr;
    }
}

/* Landscape Orientation für Smartphones */
@media (max-width: 768px) and (orientation: landscape) {
    .card-box {
        min-height: 280px;
        padding: 20px;
    }

    .question {
        font-size: 24px;
        margin: 16px 0;
    }

    .topbar {
        padding: 10px 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .btn-group {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .btn-group .btn {
        flex: 1;
        min-width: 140px;
    }
}
/* ============================================
   LOGIN PAGE
   ============================================ */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    max-width: 450px;
    width: 100%;
}

.login-form .box {
    margin: 0;
}

.login-tabs {
    display: flex;
    margin-bottom: -1px;
}

.tab-link {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: #e2e8f0;
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    border: 1px solid #e2e8f0;
    border-bottom: 1px solid #cbd5e0;
    transition: all 0.2s;
}

.tab-link.active {
    background: white;
    border-bottom: 1px solid white;
    color: #2d3748;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.logo {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 24px;
}

.logo i {
    color: #ada996;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #718096;
}

.form-footer a {
    color: #ada996;
    font-weight: 600;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}