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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.app-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    min-height: 90vh;
    position: relative;
}

/* Hamburger Menu */
.hamburger-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 6px;
    padding: 8px;
}

.hamburger-btn span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Settings Overlay */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.3s ease;
}

.settings-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.settings-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideInUp 0.3s ease;
}

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

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.settings-header h2 {
    margin: 0;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.settings-content {
    padding: 20px;
}

.settings-content h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.settings-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

/* Language Buttons */
.language-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #555;
    flex: 1;
    min-width: 80px;
}

.lang-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.lang-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #f8f9fa;
    padding: 30px 20px;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
}

.sidebar h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.belt-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 30px;
}

.belt-btn {
    padding: 12px 16px;
    border: 3px solid;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #333;
    text-align: left;
}

/* Individual belt colors */
.belt-btn[data-kyu="5_kyu_gelb"] {
    border-color: #ffd700;
}

.belt-btn[data-kyu="5_kyu_gelb"]:hover:not(.active) {
    background: rgba(255, 215, 0, 0.1);
}

.belt-btn[data-kyu="5_kyu_gelb"].active {
    background: #ffd700;
    color: #333;
}

.belt-btn[data-kyu="4_kyu_orange"] {
    border-color: #ff8c00;
}

.belt-btn[data-kyu="4_kyu_orange"]:hover:not(.active) {
    background: rgba(255, 140, 0, 0.1);
}

.belt-btn[data-kyu="4_kyu_orange"].active {
    background: #ff8c00;
    color: white;
}

.belt-btn[data-kyu="3_kyu_gruen"] {
    border-color: #228b22;
}

.belt-btn[data-kyu="3_kyu_gruen"]:hover:not(.active) {
    background: rgba(34, 139, 34, 0.1);
}

.belt-btn[data-kyu="3_kyu_gruen"].active {
    background: #228b22;
    color: white;
}

.belt-btn[data-kyu="2_kyu_blau"] {
    border-color: #4169e1;
}

.belt-btn[data-kyu="2_kyu_blau"]:hover:not(.active) {
    background: rgba(65, 105, 225, 0.1);
}

.belt-btn[data-kyu="2_kyu_blau"].active {
    background: #4169e1;
    color: white;
}

.belt-btn[data-kyu="1_kyu_braun"] {
    border-color: #8b4513;
}

.belt-btn[data-kyu="1_kyu_braun"]:hover:not(.active) {
    background: rgba(139, 69, 19, 0.1);
}

.belt-btn[data-kyu="1_kyu_braun"].active {
    background: #8b4513;
    color: white;
}

.stats {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.stats h3 {
    font-size: 14px;
    margin-bottom: 12px;
    color: #333;
}

.stats p {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

#reset-stats {
    width: 100%;
    padding: 8px;
    margin-top: 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

#reset-stats:hover {
    background: #c82333;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
}

.card-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
}

.image-section {
    text-align: center;
}

#technique-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.words-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.instruction {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.answer-placeholders {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    min-height: 50px;
    align-items: center;
}

.answer-placeholder {
    width: 80px;
    height: 40px;
    border: 2px dotted #ccc;
    border-radius: 6px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    transition: all 0.3s ease;
}

.answer-placeholder.filled {
    border-color: #667eea;
    background: #e7f0ff;
}

.answer-placeholder.correct {
    border-color: #28a745;
    background: #d4edda;
    animation: pulse-correct 0.6s ease-out;
}

.answer-placeholder.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
    animation: wiggle 0.4s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

@keyframes pulse-correct {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.word-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    min-height: 45px;
}

.word-btn {
    padding: 10px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.word-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.word-btn.selected {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
}


.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit {
    background: #28a745;
    color: white;
}

.btn-submit:hover {
    background: #218838;
}

.btn-skip {
    background: #ffc107;
    color: white;
}

.btn-skip:hover {
    background: #e0a800;
}

.btn-show {
    background: #17a2b8;
    color: white;
}

.btn-show:hover {
    background: #138496;
}

.feedback {
    text-align: center;
    min-height: 40px;
    padding: 15px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

.feedback.empty {
    border: none;
    color: transparent;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #dee2e6;
    border-radius: 4px;
    margin-top: auto;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #667eea;
    width: 0%;
    transition: width 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {

    .app-container {
        flex-direction: column;
        padding-top: 60px;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: none;
        padding: 20px;
        order: 2;
    }

    .main-content {
        padding: 20px;
        order: 1;
    }

    .belt-filters {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .belt-btn {
        flex: 1;
        min-width: 80px;
    }

    #technique-image {
        max-height: 250px;
    }

    .words-section {
        padding: 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .stats {
        margin-top: 20px;
    }
}