/* Variables CSS */
:root {
    --primary: #f7df1e;
    --primary-dark: #d4bb00;
    --secondary: #323330;
    --accent: #61dafb;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    
    --bg-primary: #1e1e1e;
    --bg-secondary: #2d2d30;
    --bg-tertiary: #3e3e42;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #969696;
    
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--secondary) 0%, #4a4a4a 100%);
    padding: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(247, 223, 30, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.header-content h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    font-weight: 800;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Barre de progression globale */
.progress-bar {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    height: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 20px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Navigation */
.main-nav {
    background: var(--bg-secondary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(247, 223, 30, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 223, 30, 0.3);
}

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

/* Chapitres */
.chapter {
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

.chapter.active {
    display: block;
}

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

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

.chapter-header h2 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chapter-number {
    background: var(--primary);
    color: var(--secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
}

/* Cartes de leçon */
.lesson-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.lesson-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.lesson-card h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lesson-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* Exemples de code */
.code-example {
    background: #1a1a1a;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header {
    background: var(--bg-tertiary);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-title {
    color: var(--primary);
    font-weight: 600;
}

.copy-btn {
    background: var(--primary);
    color: var(--secondary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.code-example pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-example code {
    font-family: 'JetBrains Mono', monospace;
}

/* Démos interactives */
.interactive-demo {
    background: linear-gradient(135deg, rgba(97, 218, 251, 0.1), rgba(247, 223, 30, 0.1));
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid rgba(97, 218, 251, 0.3);
}

.interactive-demo h4 {
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.demo-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.demo-controls input,
.demo-controls select,
.demo-controls textarea {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    font-family: inherit;
    transition: var(--transition);
}

.demo-controls input:focus,
.demo-controls select:focus,
.demo-controls textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(247, 223, 30, 0.3);
}

.demo-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--secondary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-family: inherit;
}

.demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 223, 30, 0.4);
}

.demo-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.demo-btn.secondary:hover {
    background: var(--text-muted);
    box-shadow: 0 4px 12px rgba(150, 150, 150, 0.3);
}

.output-box {
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
    min-height: 60px;
    font-family: monospace;
    white-space: pre-wrap;
    overflow-x: auto;
    color: var(--text-secondary);
}

/* Calculatrice */
.calculator {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto auto;
    gap: 1rem;
    align-items: center;
    max-width: 500px;
}

.calculator input {
    width: 100px;
}

.result-display {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    border: 2px solid var(--primary);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sélecteur interactif */
.demo-playground {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
}

#demo-html {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#demo-html h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

#demo-html .demo-text {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

#demo-html .demo-text.special {
    color: var(--accent);
    font-weight: 600;
}

#demo-html .demo-button {
    background: var(--primary);
    color: var(--secondary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
}

/* Éditeur de style */
.style-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1rem 0;
}

.style-target {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.style-controls {
    display: grid;
    gap: 1rem;
}

.style-controls label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Détecteur d'événements */
.event-playground {
    margin: 1rem 0;
}

.event-target {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 2px dashed var(--primary);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
    user-select: none;
}

.event-target:hover {
    background: rgba(247, 223, 30, 0.1);
    transform: scale(1.02);
}

.event-log {
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.9rem;
}

/* Démo de promises */
.promise-demo {
    text-align: center;
}

.demo-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    margin-top: 1rem;
}

.demo-progress.hidden {
    display: none;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(247, 223, 30, 0.3);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Démo API */
.api-demo {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

/* Démo de destructuring */
.destructuring-demo .demo-input {
    margin-bottom: 1rem;
}

.destructuring-demo textarea {
    width: 100%;
    min-height: 80px;
    resize: vertical;
}

.destructuring-demo input {
    width: 100%;
}

/* Générateur de templates */
.template-demo {
    margin: 1rem 0;
}

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

.template-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.template-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

/* Constructeur de classes */
.class-builder .demo-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Démo de closures */
.closure-demo {
    text-align: center;
}

/* Array methods explorer */
.array-demo .demo-input {
    margin-bottom: 1rem;
}

.array-demo textarea {
    width: 100%;
    min-height: 60px;
}

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

/* RegExp testeur */
.regex-demo .demo-inputs {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.regex-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Projets */
.project-demo {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Liste de courses */
.shopping-list-app {
    max-width: 500px;
    margin: 0 auto;
}

.add-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.add-item input {
    flex: 1;
}

.shopping-list {
    list-style: none;
    margin: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.shopping-item {
    background: var(--bg-primary);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.shopping-item:hover {
    transform: translateX(5px);
}

.shopping-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.shopping-item .item-text {
    flex: 1;
    cursor: pointer;
}

.shopping-item .item-actions {
    display: flex;
    gap: 0.5rem;
}

.shopping-item button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.shopping-item .toggle-btn {
    color: var(--success);
}

.shopping-item .delete-btn {
    color: var(--danger);
}

.shopping-item button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.list-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Jeu de mémoire */
.memory-game {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.memory-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.memory-card {
    aspect-ratio: 1;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    user-select: none;
}

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

.memory-card.flipped {
    background: var(--primary);
    color: var(--secondary);
}

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

.game-message {
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Calculatrice avancée */
.advanced-calculator {
    max-width: 400px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
}

.calc-display {
    margin-bottom: 1rem;
}

.calc-history {
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    min-height: 40px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: right;
    margin-bottom: 0.5rem;
}

.calc-input {
    width: 100%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem;
    font-size: 1.5rem;
    text-align: right;
    font-family: monospace;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.calc-btn {
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: var(--transition);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.calc-btn:hover {
    transform: scale(1.05);
}

.calc-btn.operator {
    background: var(--primary);
    color: var(--secondary);
}

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

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

.quiz-progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    height: 8px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 20px;
    transition: width 0.5s ease;
    width: 0%;
}

.quiz-progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.quiz-question {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.quiz-question h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.quiz-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quiz-option {
    background: var(--bg-tertiary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(247, 223, 30, 0.1);
}

.quiz-option.correct {
    border-color: var(--success);
    background: rgba(40, 167, 69, 0.1);
}

.quiz-option.incorrect {
    border-color: var(--danger);
    background: rgba(220, 53, 69, 0.1);
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-results {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.quiz-results.hidden {
    display: none;
}

.score-display {
    margin-bottom: 2rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--success));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    box-shadow: var(--shadow-lg);
}

.score-circle span {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
}

.quiz-review {
    text-align: left;
    margin: 2rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.review-question {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
}

/* Aide flottante */
.floating-help {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.help-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--secondary);
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.help-toggle:hover {
    transform: scale(1.1);
}

.help-content {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    width: 300px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.help-content.show {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

.help-content h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.help-content ul {
    list-style: none;
}

.help-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

/* Mode sombre */
body.dark-mode {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .chapter-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .style-editor {
        grid-template-columns: 1fr;
    }
    
    .demo-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calculator {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .floating-help {
        bottom: 1rem;
        right: 1rem;
    }
    
    .help-content {
        width: 250px;
        right: -95px;
    }
    
    .memory-board {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .game-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }
    
    .lesson-card {
        padding: 1rem;
    }
    
    .demo-inputs {
        grid-template-columns: 1fr;
    }
    
    .method-buttons {
        flex-direction: column;
    }
    
    .regex-buttons {
        flex-direction: column;
    }
}