/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #17a2b8;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #2c3e50;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --border-color: #bdc3c7;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="dark"] {
    --primary-color: #3498db;
    --secondary-color: #34495e;
    --text-color: #ecf0f1;
    --bg-color: #2c3e50;
    --card-bg: #34495e;
    --border-color: #7f8c8d;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    --gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.main-header {
    background: var(--secondary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

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

/* Footer Styles */
.main-footer {
    background: var(--secondary-color);
    color: white;
    padding: 1.5rem 0;
    margin-top: auto;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Container adjustments */
.container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}

/* Navigation Styles */
.navigation {
    background: var(--secondary-color);
    padding: 0;
    overflow-x: auto;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-tabs {
    display: flex;
    min-width: 100%;
}

.nav-tab {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    white-space: nowrap;
    position: relative;
    font-weight: 500;
}

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

.nav-tab.active {
    background: var(--primary-color);
    border-bottom-color: #2980b9;
}

.nav-tab::before {
    content: attr(data-number);
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.game-section {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    display: none;
}

.game-section.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

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

.game-title {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 700;
}

.game-description {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Stats Bar */
.stats-bar {
    background: var(--light-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    display: flex;
    justify-content: space-around;
    text-align: center;
    gap: 1rem;
}

[data-theme="dark"] .stats-bar {
    background: rgba(255,255,255,0.1);
}

.stat-item {
    flex: 1;
}

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

.stat-label {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Categories Overview */
.categories-overview {
    margin: 2rem 0;
}

.categories-overview h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.5rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-card {
    background: var(--light-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

[data-theme="dark"] .category-card {
    background: rgba(255,255,255,0.1);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.category-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.category-count {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Game Preview */
.game-preview {
    background: var(--light-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    border: 2px dashed var(--border-color);
    margin-top: 2rem;
}

[data-theme="dark"] .game-preview {
    background: rgba(255,255,255,0.05);
}

.game-preview h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.game-preview p {
    color: var(--text-color);
    opacity: 0.7;
    font-style: italic;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0.25rem;
    text-transform: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

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

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

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

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

.btn-danger {
    background: var(--accent-color);
    color: white;
}

/* Quiz Styles */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-progress {
    margin-bottom: 2rem;
    text-align: center;
}

.progress-bar {
    background: var(--light-color);
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .progress-bar {
    background: rgba(255,255,255,0.1);
}

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

.progress-text {
    color: var(--text-color);
    font-weight: 500;
}

.question-card {
    background: var(--light-color);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

[data-theme="dark"] .question-card {
    background: rgba(255,255,255,0.05);
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-btn {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: var(--text-color);
}

[data-theme="dark"] .option-btn {
    background: var(--card-bg);
    border-color: var(--border-color);
}

.option-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.option-btn.correct {
    background: var(--success-color) !important;
    border-color: var(--success-color) !important;
    color: white !important;
}

.option-btn.incorrect {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: white !important;
}

.quiz-controls {
    text-align: center;
    margin-top: 2rem;
}

/* Memory Game Styles */
.memory-container {
    max-width: 800px;
    margin: 0 auto;
}

.memory-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    text-align: center;
}

.stat {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.memory-card {
    aspect-ratio: 1;
    background: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    position: relative;
}

.memory-card:hover {
    transform: scale(1.05);
}

.memory-card.flipped {
    background: white;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
}

.memory-card.matched {
    background: var(--success-color);
    color: white;
    cursor: default;
}

.memory-controls {
    text-align: center;
}

/* Drag & Drop Styles */
.drag-drop-container {
    max-width: 1000px;
    margin: 0 auto;
}

.drag-drop-instructions {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.drag-drop-game {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.drag-column, .drop-column {
    background: var(--light-color);
    border-radius: 15px;
    padding: 1.5rem;
    min-height: 400px;
}

[data-theme="dark"] .drag-column,
[data-theme="dark"] .drop-column {
    background: rgba(255,255,255,0.05);
}

.drag-column h3, .drop-column h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.drag-items, .drop-zones {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.drag-item, .drop-zone {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: move;
    transition: all 0.3s ease;
    color: var(--text-color);
}

[data-theme="dark"] .drag-item,
[data-theme="dark"] .drop-zone {
    background: var(--card-bg);
}

.drag-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.drop-zone {
    cursor: default;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
}

.drop-zone.drag-over {
    border-color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
}

.drop-zone.filled {
    border-style: solid;
    border-color: var(--success-color);
    background: rgba(39, 174, 96, 0.1);
}

.drag-drop-controls {
    text-align: center;
}

/* Speed Quiz Styles */
.speed-quiz-container {
    max-width: 600px;
    margin: 0 auto;
}

.speed-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 2rem;
    text-align: center;
}

.timer {
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent-color);
    background: var(--light-color);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .timer {
    background: rgba(255,255,255,0.1);
}

.score, .question-counter {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
}

.speed-question {
    background: var(--light-color);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

[data-theme="dark"] .speed-question {
    background: rgba(255,255,255,0.05);
}

.speed-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.speed-controls {
    text-align: center;
}

/* Puzzle Styles */
.puzzle-container {
    max-width: 600px;
    margin: 0 auto;
}

.puzzle-word-display {
    text-align: center;
    margin-bottom: 2rem;
}

.word-hint {
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 1rem;
}

.word-target {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.letter-slot {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: white;
    color: var(--text-color);
}

[data-theme="dark"] .letter-slot {
    background: var(--card-bg);
}

.letter-slot.filled {
    border-color: var(--success-color);
    background: rgba(39, 174, 96, 0.1);
}

.puzzle-letters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.puzzle-letter {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: move;
    transition: all 0.3s ease;
}

.puzzle-letter:hover {
    transform: scale(1.1);
}

.puzzle-letter.used {
    opacity: 0.5;
    cursor: default;
}

.puzzle-controls {
    text-align: center;
}

/* Lückentext Styles */
.luckentext-container {
    max-width: 800px;
    margin: 0 auto;
}

.luckentext-instructions {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.luckentext-item {
    background: var(--light-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

[data-theme="dark"] .luckentext-item {
    background: rgba(255,255,255,0.05);
}

.luckentext-sentence {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.blank-input {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    color: var(--text-color);
    min-width: 100px;
    margin: 0 0.25rem;
}

[data-theme="dark"] .blank-input {
    background: var(--card-bg);
}

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

.blank-input.correct {
    border-color: var(--success-color);
    background: rgba(39, 174, 96, 0.1);
}

.blank-input.incorrect {
    border-color: var(--accent-color);
    background: rgba(231, 76, 60, 0.1);
}

.luckentext-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.solution-display {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid var(--success-color);
    border-radius: 5px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-weight: 500;
    color: var(--success-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .nav-tab {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .game-title {
        font-size: 1.5rem;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .memory-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .drag-drop-game {
        grid-template-columns: 1fr;
    }
    
    .dark-mode-toggle {
        position: static;
        transform: none;
        margin-top: 1rem;
    }
    
    .header-content {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0 0.5rem;
    }
    
    .game-section {
        padding: 1rem;
    }
    
    .memory-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .word-target {
        flex-wrap: wrap;
    }
    
    .puzzle-letters {
        gap: 0.25rem;
    }
    
    .puzzle-letter, .letter-slot {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Animations */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

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

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

.bounce {
    animation: bounce 1s;
}

.pulse {
    animation: pulse 0.5s;
}

.shake {
    animation: shake 0.5s;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.visible { display: block !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }


/* Clickable Categories Styles */
.category-card.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    background: rgba(255, 255, 255, 0.15);
}

.category-card.clickable:active {
    transform: translateY(-2px);
}

/* Category Words Display */
.category-words-display {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-words-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.category-words-header h4 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.3rem;
}

.category-words-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.word-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.word-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.word-french {
    font-weight: bold;
    color: var(--text-color);
    font-size: 1rem;
}

.word-german {
    color: var(--text-color);
    opacity: 0.8;
    font-style: italic;
}

/* Hangman Game Styles */
.hangman-container {
    max-width: 800px;
    margin: 0 auto;
}

.hangman-display {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.hangman-drawing {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 1rem;
}

.hangman-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hangman-hint {
    padding: 1rem;
    background: rgba(23, 162, 184, 0.1);
    border: 2px solid var(--info-color);
    border-radius: 10px;
}

.hint-label {
    font-weight: bold;
    color: var(--info-color);
    margin-bottom: 0.5rem;
}

.hint-text {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.hint-category {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
    font-style: italic;
}

.hangman-word {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.letter-slot {
    width: 40px;
    height: 50px;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px 5px 0 0;
}

.letter-slot.revealed {
    background: rgba(39, 174, 96, 0.2);
    border-bottom-color: var(--success-color);
    animation: letterReveal 0.5s ease;
}

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

.hangman-stats {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.stat {
    flex: 1;
    text-align: center;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.hangman-alphabet {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 0.5rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.alphabet-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alphabet-btn:hover:not(.used) {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.alphabet-btn.used {
    background: rgba(231, 76, 60, 0.2);
    border-color: var(--accent-color);
    color: var(--accent-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.alphabet-btn.correct {
    background: rgba(39, 174, 96, 0.2);
    border-color: var(--success-color);
    color: var(--success-color);
}

.hangman-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Responsive Design for Hangman */
@media (max-width: 768px) {
    .hangman-display {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hangman-drawing svg {
        width: 150px;
        height: 180px;
    }
    
    .hangman-alphabet {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .alphabet-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .letter-slot {
        width: 35px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* Game completion styles */
.hangman-success {
    background: rgba(39, 174, 96, 0.1);
    border: 2px solid var(--success-color);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
}

.hangman-failure {
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
}

.hangman-success h3 {
    color: var(--success-color);
    margin-bottom: 1rem;
}

.hangman-failure h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}


/* Karteikarte/Flashcard Styles */
.karteikarte-menu {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.menu-section {
    margin-bottom: 2rem;
    text-align: center;
}

.menu-section h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.mode-buttons, .content-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mode-btn, .content-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.4;
}

.mode-btn:hover, .content-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.category-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.category-btn {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
    font-size: 0.9rem;
}

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

.category-btn.active {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.btn-large {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    margin-top: 1rem;
}

/* Flashcard Study Interface */
.karteikarte-study {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.study-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.study-progress {
    flex: 1;
    margin-right: 2rem;
}

.progress-text {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.study-stats {
    display: flex;
    gap: 1rem;
}

.study-stats .stat {
    background: var(--light-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    color: var(--text-color);
}

/* Flashcard */
.flashcard-container {
    perspective: 1000px;
    margin: 2rem 0;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flashcard {
    width: 100%;
    max-width: 500px;
    height: 350px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    cursor: pointer;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 2px solid var(--border-color);
}

.flashcard-front {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.flashcard-back {
    background: linear-gradient(135deg, var(--success-color), var(--info-color));
    color: white;
    transform: rotateY(180deg);
}

[data-theme="dark"] .flashcard-front,
[data-theme="dark"] .flashcard-back {
    border-color: rgba(255,255,255,0.2);
}

.card-flag {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.card-text {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
    word-wrap: break-word;
}

.card-hint {
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
}

.card-category {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
}

/* Study Controls */
.study-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.difficulty-buttons {
    display: flex;
    gap: 1rem;
    transition: all 0.3s ease;
}

.navigation-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Results */
.karteikarte-results {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.result-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid var(--border-color);
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-4px);
}

.result-card.success {
    border-color: var(--success-color);
    background: linear-gradient(135deg, var(--success-color), rgba(40, 167, 69, 0.1));
}

.result-card.warning {
    border-color: var(--warning-color);
    background: linear-gradient(135deg, var(--warning-color), rgba(255, 193, 7, 0.1));
}

.result-card.danger {
    border-color: var(--danger-color);
    background: linear-gradient(135deg, var(--danger-color), rgba(220, 53, 69, 0.1));
}

.result-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.result-label {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.result-percent {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Responsive Design for Karteikarte */
@media (max-width: 768px) {
    .mode-buttons, .content-buttons {
        grid-template-columns: 1fr;
    }
    
    .flashcard-container {
        height: 300px;
    }
    
    .flashcard {
        height: 280px;
    }
    
    .card-text {
        font-size: 1.5rem;
    }
    
    .difficulty-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .navigation-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }
    
    .results-actions {
        flex-direction: column;
    }
}


/* Dark Mode Fixes for Hangman and Puzzle */
[data-theme="dark"] .alphabet-btn {
    background: var(--card-bg);
    color: var(--text-color);
    border-color: var(--primary-color);
}

[data-theme="dark"] .alphabet-btn:hover:not(.used) {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .alphabet-btn.used {
    background: rgba(231, 76, 60, 0.3);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

[data-theme="dark"] .alphabet-btn.correct {
    background: rgba(39, 174, 96, 0.3);
    border-color: var(--success-color);
    color: var(--success-color);
}

[data-theme="dark"] .puzzle-letter {
    background: var(--primary-color) !important;
    color: white !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
    font-weight: bold !important;
}

[data-theme="dark"] .puzzle-letter:hover {
    background: var(--accent-color) !important;
    border-color: rgba(255,255,255,0.5) !important;
}

[data-theme="dark"] .puzzle-letter.used {
    background: rgba(108, 117, 125, 0.6) !important;
    color: rgba(255,255,255,0.6) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

[data-theme="dark"] .letter-slot {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border: 2px solid var(--border-color) !important;
}

[data-theme="dark"] .letter-slot.filled {
    background: rgba(39, 174, 96, 0.2) !important;
    color: white !important;
    border-color: var(--success-color) !important;
}

[data-theme="dark"] .hangman-word .letter-slot {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

[data-theme="dark"] .hangman-word .letter-slot.revealed {
    background: rgba(39, 174, 96, 0.2);
    color: var(--success-color);
    border-color: var(--success-color);
}


/* Dark Mode Fixes for Memory Game */
[data-theme="dark"] .memory-card {
    background: var(--primary-color) !important;
    color: white !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
}

[data-theme="dark"] .memory-card:hover {
    background: var(--accent-color) !important;
    border-color: rgba(255,255,255,0.5) !important;
}

[data-theme="dark"] .memory-card.flipped {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border: 2px solid var(--primary-color) !important;
    font-weight: bold !important;
}

[data-theme="dark"] .memory-card.matched {
    background: var(--success-color) !important;
    color: white !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
}



/* Enhanced Lückentext Styles - Based on Screenshot Model */
.luckentext-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.luckentext-header {
    text-align: center;
    margin-bottom: 2rem;
}

.luckentext-header .game-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 300;
}

.text-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.text-counter {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
}

.sentence-block {
    background: rgba(52, 152, 219, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.sentence-block::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px 0 0 2px;
}

.sentence-text {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.luckentext-input {
    display: inline-block;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 1.1rem;
    min-width: 120px;
    margin: 0 4px;
    text-align: center;
    transition: all 0.3s ease;
}

.luckentext-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.luckentext-input.correct {
    background: #d4edda;
    border-color: var(--success-color);
    color: var(--success-color);
}

.luckentext-input.incorrect {
    background: #f8d7da;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.blanks-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.blank-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.3);
    margin-bottom: 0;
}

.blank-label {
    font-weight: 600;
    color: var(--text-color);
    min-width: 80px;
}

.blank-control .btn {
    min-width: 80px;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.btn-dark {
    background: #495057;
    color: white;
    border: none;
}

.btn-dark:hover {
    background: #343a40;
}

.sentence-feedback {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.feedback-content {
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    border: 2px solid;
}

.feedback-content.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-content.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.feedback-content.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Dark mode adjustments for Lückentext */
[data-theme="dark"] .sentence-block {
    background: rgba(52, 152, 219, 0.2);
    border-color: var(--primary-color);
}

[data-theme="dark"] .luckentext-input {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .blank-control {
    background: rgba(52, 73, 94, 0.8);
    border-color: rgba(52, 152, 219, 0.5);
}

/* Responsive design for Lückentext */
@media (max-width: 768px) {
    .luckentext-container {
        padding: 1rem;
    }
    
    .sentence-block {
        padding: 1.5rem;
    }
    
    .sentence-text {
        font-size: 1.1rem;
    }
    
    .blank-control {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .blank-label {
        min-width: auto;
        text-align: center;
    }
    
    .text-navigation {
        flex-direction: column;
        gap: 0.5rem;
    }
}

