/* Vokabel-Trainer Styles */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #22c55e;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --error: #ef4444;
    --error-light: #fee2e2;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

header {
    margin-bottom: 24px;
    position: relative;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.6rem;
    color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    overflow: hidden;
}

.burger-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    color: var(--text);
}

.subtitle {
    color: var(--text-light);
    margin-top: 4px;
    text-align: center;
}

/* Burger Menu */
.burger-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1000;
    overflow: hidden;
}

.burger-menu.hidden {
    display: none;
}

.menu-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.menu-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.menu-user-info {
    display: flex;
    flex-direction: column;
}

.menu-username {
    font-weight: 600;
    font-size: 1.1rem;
}

.menu-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
}

.menu-items {
    padding: 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: none;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    text-align: left;
}

.menu-item:hover {
    background: var(--bg);
}

.menu-item.logout {
    color: var(--error);
}

/* Auth Screen */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-screen.hidden {
    display: none;
}

.auth-card {
    background: var(--card);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
    text-align: center;
}

.auth-card h1 {
    color: var(--primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-light);
    margin-bottom: 24px;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.user-btn:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.user-btn-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.user-btn-info {
    text-align: left;
    flex: 1;
}

.user-btn-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
}

.user-btn-stats {
    font-size: 0.85rem;
    color: var(--text-light);
}

.user-btn-delete {
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1rem;
}

.user-btn-delete:hover {
    color: var(--error);
}

.new-user-section {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.new-user-section p {
    color: var(--text-light);
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.new-user-form {
    display: flex;
    gap: 10px;
}

.new-user-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
}

.new-user-form .submit-btn {
    width: auto;
    padding: 12px 20px;
}

/* Main App Hidden when Auth visible */
.main-app {
    display: none;
}

.main-app.visible {
    display: block;
}

/* Navigation */
.main-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    border: none;
    background: var(--card);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.nav-btn .nav-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.nav-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.nav-btn.active {
    background: var(--primary);
    color: white;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Cards */
.stats-card, .form-card, .list-card, .quiz-card {
    background: var(--card);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.stat {
    text-align: center;
    padding: 16px;
    background: var(--bg);
    border-radius: 12px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Daily Goal */
.daily-goal {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

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

.goal-header h3 {
    margin: 0;
    font-size: 1rem;
}

.goal-header select {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.goal-header select option {
    color: black;
}

.goal-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.goal-bar {
    flex: 1;
    height: 12px;
    background: rgba(255,255,255,0.3);
    border-radius: 6px;
    overflow: hidden;
}

.goal-fill {
    height: 100%;
    background: #22c55e;
    border-radius: 6px;
    width: 0%;
    transition: width 0.5s ease;
}

.goal-fill.complete {
    background: #fbbf24;
    animation: pulse-glow 1s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px #fbbf24; }
    50% { box-shadow: 0 0 15px #fbbf24; }
}

.goal-text {
    font-size: 0.85rem;
    min-width: 80px;
    text-align: right;
}

.goal-status {
    margin-top: 8px;
    font-size: 0.9rem;
    text-align: center;
}

/* Today Stats */
.today-stats {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.today-stats h3 {
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text);
}

.today-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.today-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    color: white;
}

.today-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.today-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.today-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Week Stats */
.week-stats {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.week-stats h3 {
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text);
}

.week-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 100px;
    padding: 10px 0;
}

.week-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.week-bar-container {
    width: 100%;
    height: 70px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.week-bar {
    width: 70%;
    max-width: 30px;
    background: var(--border);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.3s, background 0.3s;
}

.week-bar.active {
    background: var(--primary);
}

.week-bar.today {
    background: var(--success);
}

.week-label {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 6px;
}

.week-minutes {
    font-size: 0.65rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* Vokabel-Statistik pro Woche */
.vocab-week-stats {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.vocab-week-stats h3 {
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text);
}

.vocab-week-stat-item {
    background: var(--bg);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.vocab-week-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.vocab-week-stat-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.vocab-week-stat-count {
    font-size: 0.85rem;
    color: var(--text-light);
}

.vocab-week-stat-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.vocab-week-stat-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.vocab-week-stat-fill.low {
    background: var(--error);
}

.vocab-week-stat-fill.medium {
    background: var(--warning);
}

.vocab-week-stat-fill.high {
    background: var(--success);
}

.vocab-week-stat-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
}

.vocab-week-stat-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Daily Reminder */
.daily-reminder {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 16px;
    text-align: center;
    animation: bounceIn 0.5s ease;
}

.daily-reminder.hidden {
    display: none;
}

.daily-reminder.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.reminder-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.reminder-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.4;
}

.reminder-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    padding: 10px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reminder-btn:hover {
    background: white;
    color: #f5576c;
}

.daily-reminder.success .reminder-btn:hover {
    color: #11998e;
}

/* Motivation Banner */
.motivation-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    animation: slideIn 0.5s ease;
}

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

/* Buttons */
.quick-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn.primary {
    background: var(--primary);
    color: white;
}

.action-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.action-btn.secondary {
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border);
}

.action-btn.secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Form */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover {
    background: var(--primary-dark);
}

.submit-btn.secondary {
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border);
}

.feedback {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.feedback.success {
    display: block;
    background: var(--success-light);
    color: var(--success);
}

.feedback.error {
    display: block;
    background: var(--error-light);
    color: var(--error);
}

/* Bulk Add */
.bulk-add {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px dashed var(--border);
}

.bulk-add h3 {
    margin-bottom: 8px;
}

.hint {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.bulk-add textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 12px;
}

.bulk-add textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Preset Vocab */
.preset-vocab {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px dashed var(--border);
}

.preset-vocab h3 {
    margin-bottom: 12px;
}

/* List */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.list-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.list-header input,
.list-header select {
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
}

.list-header select {
    min-width: 120px;
}

.vocab-week {
    font-size: 0.75rem;
    color: white;
    background: var(--primary);
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.vocab-mastery {
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.vocab-mastery.new {
    color: var(--error);
}

.vocab-mastery.learning {
    color: var(--warning);
}

.vocab-mastery.mastered {
    color: var(--success);
}

.vocabulary-list {
    max-height: 400px;
    overflow-y: auto;
}

.vocab-item {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.vocab-item:hover {
    background: var(--bg);
}

.vocab-item:last-child {
    border-bottom: none;
}

.vocab-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.vocab-words {
    flex: 1;
}

.vocab-de {
    font-weight: 600;
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.vocab-en {
    color: var(--text-light);
    font-size: 0.95rem;
}

.vocab-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 12px;
}

.vocab-actions button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    padding: 0;
}

.vocab-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.vocab-actions button {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.listen-btn {
    background: var(--bg);
    color: var(--primary);
}

.listen-btn:hover {
    background: var(--primary);
    color: white;
}

.listen-btn.slow {
    background: var(--warning-light);
    color: var(--warning);
}

.listen-btn.slow:hover {
    background: var(--warning);
    color: white;
}

.delete-btn {
    background: var(--error-light);
    color: var(--error);
}

.delete-btn:hover {
    background: var(--error);
    color: white;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-state .emoji {
    font-size: 3rem;
    margin-bottom: 12px;
}

/* Quiz Mode Selection */
.mode-selection {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.mode-btn {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    gap: 16px;
}

.mode-btn:hover {
    border-color: var(--primary);
    transform: translateX(5px);
    background: white;
}

.mode-icon {
    font-size: 2rem;
    width: 50px;
    text-align: center;
}

.mode-text {
    text-align: left;
}

.mode-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.mode-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Quiz Options */
.quiz-options {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Direction Toggle */
.direction-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.week-select,
.mastery-select {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.week-select select,
.mastery-select select {
    padding: 10px 16px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    font-size: 0.95rem;
    min-width: 150px;
}

.dir-btn {
    padding: 10px 16px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.dir-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* Active Quiz */
.quiz-active {
    background: var(--card);
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: var(--shadow);
}

.hidden {
    display: none !important;
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s;
}

.quiz-question {
    text-align: center;
    margin-bottom: 24px;
}

.quiz-question .word {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 16px 0;
}

.quiz-question .prompt {
    color: var(--text-light);
}

/* All Words Checkbox */
.all-words-option {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Fill Mode (Lückentext) */
.fill-level {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 8px;
    padding: 4px 12px;
    background: var(--bg);
    border-radius: 20px;
    display: inline-block;
}

.fill-hint {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    color: var(--primary);
    background: var(--bg);
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
}

/* Answer Area */
.quiz-answer {
    margin-bottom: 20px;
}

.quiz-answer input {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1.2rem;
    text-align: center;
}

.quiz-answer input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Multiple Choice */
.choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.choice-btn {
    padding: 16px;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: none !important;
}

.choice-btn:focus,
.choice-btn:focus-visible,
.choice-btn:focus-within,
.choice-btn:active,
.choice-btn:active:focus {
    outline: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    background: var(--bg) !important;
}

.choice-btn.selected {
    background: var(--bg) !important;
}

.choice-btn:hover:not(:disabled) {
    background: var(--bg);
    opacity: 0.85;
}

.choice-btn.correct {
    background: var(--success-light);
    border-color: transparent;
    color: var(--success);
}

.choice-btn.wrong {
    background: var(--error-light);
    border-color: transparent;
    color: var(--error);
}

/* Feedback */
.quiz-feedback {
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 16px;
}

.quiz-feedback.correct {
    background: var(--success-light);
    color: var(--success);
}

.quiz-feedback.wrong {
    background: var(--error-light);
    color: var(--error);
}

.quiz-feedback.typo {
    background: var(--warning-light);
    color: var(--warning);
}

.correct-answer {
    font-weight: 600;
    margin-top: 8px;
}

/* Quiz Controls */
.quiz-controls {
    display: flex;
    gap: 12px;
}

.control-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--primary);
    color: white;
}

.control-btn:hover {
    background: var(--primary-dark);
}

.control-btn.cancel {
    background: var(--bg);
    color: var(--text-light);
    border: 2px solid var(--border);
}

.control-btn.cancel:hover {
    border-color: var(--error);
    color: var(--error);
}

/* Results */
.quiz-results {
    background: var(--card);
    border-radius: 16px;
    padding: 32px 24px;
    margin-top: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.result-score {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin: 20px 0;
}

.result-message {
    font-size: 1.2rem;
    margin-bottom: 24px;
}

.result-details {
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
}

.result-item.correct {
    background: var(--success-light);
}

.result-item.wrong {
    background: var(--error-light);
}

.result-item.typo {
    background: var(--warning-light);
}

.result-motivation {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 18px;
    border-radius: 10px;
    margin: 16px 0;
    font-size: 0.95rem;
    text-align: center;
}

/* Listen Button in Quiz */
.listen-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 16px 0;
}

.listen-quiz-btn {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.listen-quiz-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.listen-quiz-btn.slow {
    background: var(--warning);
}

.listen-quiz-btn.slow:hover {
    background: #d97706;
}

/* Speak Mode */
.speak-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--error);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s;
    margin: 20px auto;
    display: block;
}

.speak-btn:hover {
    transform: scale(1.1);
}

.speak-btn.recording {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.speech-result {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 12px;
}

/* Avatar Builder */
.avatar-card {
    background: var(--card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.avatar-card h2 {
    text-align: center;
    margin-bottom: 20px;
}

.avatar-preview {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.avatar-bg {
    width: 150px;
    height: 200px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #87CEEB;
    padding: 10px;
}

.avatar-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-head {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #FFDFC4;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.avatar-hair {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 78px;
    height: 40px;
    background: #4A3C2A;
    transition: all 0.3s ease;
}

/* Kurze Haare - wirklich kurz, bedeckt Seiten */
.avatar-hair.short {
    height: 20px;
    top: -3px;
    width: 74px;
    border-radius: 50% 50% 5% 5%;
}

.avatar-hair.short::before,
.avatar-hair.short::after {
    content: '';
    position: absolute;
    top: 12px;
    width: 12px;
    height: 25px;
    background: inherit;
    border-radius: 30%;
}

.avatar-hair.short::before {
    left: -4px;
}

.avatar-hair.short::after {
    right: -4px;
}

/* Mittlere Haare - klassisch mit Seiten */
.avatar-hair.medium {
    height: 30px;
    top: -6px;
    width: 76px;
    border-radius: 50% 50% 10% 10%;
}

.avatar-hair.medium::before,
.avatar-hair.medium::after {
    content: '';
    position: absolute;
    top: 18px;
    width: 16px;
    height: 35px;
    background: inherit;
    border-radius: 40%;
}

.avatar-hair.medium::before {
    left: -6px;
}

.avatar-hair.medium::after {
    right: -6px;
}

/* Lange Haare - richtig lang, Seiten bedeckt */
.avatar-hair.long {
    height: 32px;
    width: 78px;
    top: -6px;
    border-radius: 50% 50% 0 0;
}

.avatar-hair.long::before,
.avatar-hair.long::after {
    content: '';
    position: absolute;
    top: 18px;
    width: 20px;
    height: 70px;
    background: inherit;
    border-radius: 40% 40% 50% 50%;
}

.avatar-hair.long::before {
    left: -8px;
    border-radius: 50% 30% 45% 55%;
}

.avatar-hair.long::after {
    right: -8px;
    border-radius: 30% 50% 55% 45%;
}

/* Locken - kleine Büschel */
.avatar-hair.curly {
    height: 28px;
    width: 80px;
    top: -8px;
    border-radius: 50%;
    clip-path: polygon(
        0% 80%, 5% 50%, 10% 70%, 18% 40%, 25% 65%, 
        32% 30%, 40% 55%, 50% 20%, 60% 55%, 68% 30%,
        75% 65%, 82% 40%, 90% 70%, 95% 50%, 100% 80%,
        100% 100%, 0% 100%
    );
}

.avatar-hair.curly::before,
.avatar-hair.curly::after {
    content: '';
    position: absolute;
    top: 15px;
    width: 18px;
    height: 40px;
    background: inherit;
    border-radius: 50%;
    clip-path: polygon(
        0% 100%, 20% 60%, 10% 40%, 30% 50%, 25% 20%, 
        50% 35%, 50% 0%, 50% 35%, 75% 20%, 70% 50%, 
        90% 40%, 80% 60%, 100% 100%
    );
}

.avatar-hair.curly::before {
    left: -8px;
}

.avatar-hair.curly::after {
    right: -8px;
}

/* Stachel/Spiky - punk style mit Seiten */
.avatar-hair.spiky {
    height: 40px;
    width: 78px;
    top: -15px;
    clip-path: polygon(
        5% 100%, 8% 55%, 15% 25%, 22% 65%, 
        28% 35%, 35% 10%, 42% 55%, 
        50% 0%, 58% 55%, 
        65% 10%, 72% 35%, 78% 65%,
        85% 25%, 92% 55%, 95% 100%
    );
    border-radius: 0;
}

.avatar-hair.spiky::before,
.avatar-hair.spiky::after {
    content: '';
    position: absolute;
    top: 30px;
    width: 14px;
    height: 25px;
    background: inherit;
    border-radius: 30%;
}

.avatar-hair.spiky::before {
    left: -5px;
}

.avatar-hair.spiky::after {
    right: -5px;
}

/* Zopf - Haare oben + Zopf hinten */
.avatar-hair.ponytail {
    height: 28px;
    width: 76px;
    top: -5px;
    border-radius: 50% 50% 10% 10%;
}

.avatar-hair.ponytail::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 50px;
    background: inherit;
    border-radius: 30% 30% 50% 50%;
    z-index: -1;
}

.avatar-hair.ponytail::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 12px;
    background: inherit;
    border-radius: 50%;
    z-index: -1;
}

.avatar-hair.none {
    display: none;
}

.avatar-face {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.avatar-eyes {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
}

.avatar-eyes .eye {
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
}

.avatar-mouth {
    width: 20px;
    height: 10px;
    border-bottom: 3px solid #333;
    border-radius: 0 0 50% 50%;
}

.avatar-shirt {
    width: 60px;
    height: 40px;
    background: #4ECDC4;
    border-radius: 5px 5px 0 0;
    margin-top: 5px;
}

.avatar-pants {
    width: 55px;
    height: 35px;
    background: #1E3A5F;
    border-radius: 0 0 5px 5px;
}

.avatar-shoes {
    display: flex;
    gap: 10px;
    margin-top: 2px;
}

.avatar-shoes .shoe {
    width: 22px;
    height: 12px;
    background: #FFFFFF;
    border-radius: 5px;
}

/* Avatar Options */
.avatar-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.option-group {
    background: var(--bg);
    padding: 12px;
    border-radius: 10px;
}

.option-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.color-picker,
.style-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.color-btn:hover,
.color-btn.selected {
    border-color: var(--primary);
    transform: scale(1.1);
}

.style-btn {
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.style-btn:hover,
.style-btn.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* Responsive */
@media (max-width: 480px) {
    .app-container {
        padding: 12px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .stat {
        padding: 12px 8px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .mode-selection {
        grid-template-columns: 1fr 1fr;
    }
    
    .choices {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        flex-direction: column;
    }
}
