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

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 15px;
    max-width: 1000px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

header {
    text-align: center;
    margin-bottom: 10px;
}

h1 {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: #764ba2;
    font-size: 0.9em;
}

/* Setup Steps */
.setup-step {
    animation: fadeIn 0.5s ease-in;
}

.setup-step.hidden {
    display: none;
}

.step-title {
    text-align: center;
    margin-bottom: 30px;
}

.step-number {
    font-size: 1em;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 10px;
}

.step-title h2 {
    font-size: 2.5em;
    color: #667eea;
    margin: 0;
}

.step-navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn-next, .btn-back {
    padding: 15px 40px;
    font-size: 1.3em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-next {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-back {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #764ba2;
}

/* Learning Path Selector */
.learning-path-selector {
    display: flex;
    gap: 30px;
    justify-content: center;
    padding: 20px;
    flex-wrap: wrap;
}

.path-option {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 30px;
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.path-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.path-title {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.path-description {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 25px;
    line-height: 1.5;
}

.path-btn {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.2em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Lesson Selection Grid */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.lesson-card {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.lesson-card:hover {
    transform: translateY(-3px);
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.lesson-card.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.lesson-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(50%);
}

.lesson-card.locked:hover {
    transform: none;
    border-color: #e0e0e0;
}

.lesson-card.completed {
    border-color: #4caf50;
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
}

.lesson-number {
    font-size: 0.9em;
    color: #999;
    font-weight: bold;
}

.lesson-emoji-card {
    font-size: 3em;
    margin: 10px 0;
}

.lesson-title-card {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.lesson-description-card {
    font-size: 0.85em;
    color: #666;
    line-height: 1.3;
}

.lesson-status {
    margin-top: 10px;
    font-size: 0.8em;
    font-weight: bold;
}

.lesson-status.completed {
    color: #4caf50;
}

.lesson-status.locked {
    color: #999;
}

/* Lesson Info Panel (in game area) */
.lesson-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.lesson-info.hidden {
    display: none;
}

.lesson-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.lesson-emoji {
    font-size: 2em;
}

.lesson-title {
    font-size: 1.3em;
    font-weight: bold;
}

.lesson-instructions {
    font-size: 0.95em;
    margin-bottom: 8px;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
}

.lesson-keys {
    font-size: 0.9em;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 8px;
    text-align: center;
}

.btn-next:hover, .btn-back:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.game-area {
    animation: fadeIn 0.5s ease-in;
}

.game-area.hidden {
    display: none;
}

.mode-selector {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.mode-group, .difficulty-group {
    margin-bottom: 20px;
}

.mode-group:last-child, .difficulty-group:last-child {
    margin-bottom: 0;
}

.mode-label {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 12px;
}

.mode-buttons, .difficulty-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.mode-btn, .difficulty-btn {
    padding: 12px 24px;
    font-size: 1.1em;
    border: 3px solid #667eea;
    border-radius: 15px;
    background: white;
    color: #667eea;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

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

.mode-btn.active, .difficulty-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #764ba2;
}

.quantity-group {
    margin-top: 20px;
    margin-bottom: 20px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.quantity-group.hidden {
    display: none;
}

.quantity-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.quantity-btn {
    padding: 12px 24px;
    font-size: 1.1em;
    border: 3px solid #f093fb;
    border-radius: 15px;
    background: white;
    color: #f093fb;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

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

.quantity-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-color: #f5576c;
}

/* Progress Display */
.progress-display {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    border-radius: 15px;
    padding: 10px 20px;
    text-align: center;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.progress-label {
    color: white;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 5px;
}

.progress-value {
    color: white;
    font-size: 2em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-display.nearly-done {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: pulse-progress 1s ease-in-out infinite;
}

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

.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
    gap: 8px;
}

.stat-box {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 8px 12px;
    border-radius: 10px;
    text-align: center;
    flex: 1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.stat-label {
    display: block;
    color: white;
    font-size: 0.7em;
    margin-bottom: 3px;
    font-weight: bold;
}

.stat-value {
    display: block;
    color: white;
    font-size: 1.3em;
    font-weight: bold;
}

.practice-area {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.target-text {
    font-size: 1.8em;
    font-weight: bold;
    color: #667eea;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    /* animation: pulse 2s ease-in-out infinite; */
    line-height: 1.5;
    word-wrap: break-word;
    max-width: 100%;
    letter-spacing: 0.1em;
    white-space: pre-wrap;
}

.target-text.letter-mode {
    font-size: 4em;
    letter-spacing: 0.05em;
}

.typing-input-container {
    position: relative;
    margin-bottom: 20px;
}

.typing-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.5em;
    border: 3px solid #667eea;
    border-radius: 15px;
    text-align: center;
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: white;
    color: #333;
}

.typing-input:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 15px rgba(118, 75, 162, 0.3);
}

.typing-input:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
}

.char-feedback {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px;
    font-size: 0.9em;
    color: #764ba2;
}

.typing-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 8px;
    font-size: 0.9em;
    font-weight: bold;
    color: #667eea;
}

.typing-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}
.hidden {
    display: none;
}
.message {
    font-size: 1.3em;
    color: #764ba2;
    margin-bottom: 15px;
}

.input-display {
    font-size: 2em;
    color: #f5576c;
    min-height: 40px;
    font-weight: bold;
}

.encouragement {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    min-height: 30px;
    animation: fadeIn 0.5s ease-in;
}

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

.encouragement.correct {
    color: #4caf50;
}

.encouragement.wrong {
    color: #f44336;
}

.racing-game {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 15px;
    padding: 12px;
    margin-bottom: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

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

.race-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #667eea;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.race-progress {
    font-size: 1em;
    font-weight: bold;
    color: #764ba2;
    background: white;
    padding: 5px 15px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.character-selector {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.character-label {
    display: block;
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
    text-align: center;
}

.character-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.character-btn {
    width: 60px;
    height: 60px;
    font-size: 2em;
    border: 3px solid #ccc;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: scaleX(-1);
}

.character-btn:hover {
    transform: scaleX(-1) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.character-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    transform: scaleX(-1) scale(1.15);
}

.race-track {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.track-lane {
    position: relative;
    height: 50px;
    background: linear-gradient(to bottom, #8fbc8f 0%, #90ee90 50%, #8fbc8f 100%);
    border-radius: 10px;
    overflow: visible;
    border: 2px solid #228b22;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.player-lane {
    border: 3px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5), inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.lane-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 50px,
        rgba(255, 255, 255, 0.3) 50px,
        rgba(255, 255, 255, 0.3) 60px
    );
}

.dino-runner {
    position: absolute;
    font-size: 3em;
    top: 50%;
    transform: translateY(-50%) scaleX(-1);
    left: 0;
    transition: left 0.5s ease-out;
    z-index: 10;
    filter: drop-shadow(3px 3px 5px rgba(0, 0, 0, 0.3));
}

.player-dino {
    animation: dino-bounce 0.5s ease-in-out infinite;
}

@keyframes dino-bounce {
    0%, 100% { transform: translateY(-50%) scaleX(-1) rotate(0deg); }
    50% { transform: translateY(-55%) scaleX(-1) rotate(-2deg); }
}

.player-dino.running {
    animation: dino-run 0.3s ease-in-out infinite;
}

@keyframes dino-run {
    0%, 100% { transform: translateY(-50%) scaleX(-1) scale(1); }
    50% { transform: translateY(-55%) scaleX(-1) scale(1.1); }
}

.opponent-dino {
    animation: opponent-move 20s linear infinite;
}

@keyframes opponent-move {
    0% { left: 0; }
    100% { left: calc(100% - 80px); }
}

.finish-line {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5em;
    animation: flag-wave 1s ease-in-out infinite;
}

@keyframes flag-wave {
    0%, 100% { transform: translateY(-50%) rotate(0deg); }
    50% { transform: translateY(-50%) rotate(5deg); }
}

.collectibles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.collectible {
    position: absolute;
    font-size: 1.5em;
    animation: collectible-float 2s ease-in-out infinite;
    z-index: 5;
}

@keyframes collectible-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
}

.collectible.collected {
    animation: collectible-collect 0.5s ease-out forwards;
}

@keyframes collectible-collect {
    0% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    100% {
        transform: scale(2) translateY(-50px);
        opacity: 0;
    }
}

.race-items {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.item-counter {
    background: white;
    padding: 5px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.item-icon {
    font-size: 1.2em;
}

.item-count {
    font-size: 1em;
    font-weight: bold;
    color: #667eea;
    min-width: 20px;
    text-align: center;
}

.winner-celebration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 40px 60px;
    border-radius: 30px;
    font-size: 2.5em;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: celebration-pop 0.5s ease-out;
}

@keyframes celebration-pop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.hands-visual {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
    gap: 20px;
    padding: 10px;
}

.hand {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hand-shape {
    position: relative;
}

.palm {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    position: relative;
}

.fingers-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.finger-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all 0.3s ease;
}

.finger-tip, .finger-middle, .finger-base {
    width: 12px;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffd7a8 0%, #ffb88c 100%);
    border: 1px solid #d4a574;
    transition: all 0.3s ease;
}

.finger-tip {
    height: 18px;
    border-radius: 6px 6px 3px 3px;
}

.finger-middle {
    height: 15px;
    border-radius: 3px;
}

.finger-base {
    height: 12px;
    border-radius: 3px 3px 6px 6px;
}

.pinky-l-visual .finger-tip,
.pinky-l-visual .finger-middle,
.pinky-l-visual .finger-base,
.pinky-r-visual .finger-tip,
.pinky-r-visual .finger-middle,
.pinky-r-visual .finger-base {
    width: 10px;
}

.pinky-l-visual .finger-tip,
.pinky-r-visual .finger-tip {
    height: 15px;
}

.pinky-l-visual .finger-middle,
.pinky-r-visual .finger-middle {
    height: 12px;
}

.pinky-l-visual .finger-base,
.pinky-r-visual .finger-base {
    height: 10px;
}

.middle-l-visual .finger-tip,
.middle-l-visual .finger-middle,
.middle-r-visual .finger-tip,
.middle-r-visual .finger-middle {
    height: 20px;
}

.finger-visual.active .finger-tip,
.finger-visual.active .finger-middle,
.finger-visual.active .finger-base {
    transform: translateY(-5px);
}

.finger-visual.active {
    animation: pulse-finger 0.8s ease-in-out infinite;
}

@keyframes pulse-finger {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.pinky-l-visual.active .finger-tip,
.pinky-l-visual.active .finger-middle,
.pinky-l-visual.active .finger-base,
.pinky-r-visual.active .finger-tip,
.pinky-r-visual.active .finger-middle,
.pinky-r-visual.active .finger-base {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 0 15px #f5576c;
}

.ring-l-visual.active .finger-tip,
.ring-l-visual.active .finger-middle,
.ring-l-visual.active .finger-base,
.ring-r-visual.active .finger-tip,
.ring-r-visual.active .finger-middle,
.ring-r-visual.active .finger-base {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 0 15px #00f2fe;
}

.middle-l-visual.active .finger-tip,
.middle-l-visual.active .finger-middle,
.middle-l-visual.active .finger-base,
.middle-r-visual.active .finger-tip,
.middle-r-visual.active .finger-middle,
.middle-r-visual.active .finger-base {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 0 15px #38f9d7;
}

.index-l-visual.active .finger-tip,
.index-l-visual.active .finger-middle,
.index-l-visual.active .finger-base,
.index-r-visual.active .finger-tip,
.index-r-visual.active .finger-middle,
.index-r-visual.active .finger-base {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 0 15px #fee140;
}

.palm-base {
    width: 60px;
    height: 40px;
    background: linear-gradient(135deg, #ffd7a8 0%, #ffb88c 100%);
    border: 1px solid #d4a574;
    border-radius: 10px;
    margin-top: 3px;
}

.thumb {
    font-size: 1.5em;
    opacity: 0.6;
}

.left-thumb {
    transform: rotate(90deg);
    margin-right: 3px;
}

.right-thumb {
    transform: rotate(-90deg);
    margin-left: 3px;
}

.hand-label {
    font-size: 0.8em;
    font-weight: bold;
    color: #667eea;
}

.keyboard-visual {
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.keyboard-visual svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.keyboard-visual svg .key-rect {
    transition: transform 0.1s ease, fill 0.2s ease, stroke 0.2s ease, filter 0.3s ease;
}

.keyboard-visual svg .key-rect:hover {
    opacity: 0.9;
}

.keyboard-row {
    display: flex;
    gap: 2px;
    justify-content: center;
}

.keyboard-row:nth-child(2) {
    margin-left: 40px;
}

.keyboard-row:nth-child(3) {
    margin-left: 0px;
}


.space-row {
    margin-left: 0 !important;
    margin-top: 4px;
}

.key {
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px 12px;
    text-align: center;
    font-size: 0.9em;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
    min-width: 35px;
}

.key::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    border-radius: 2px;
    opacity: 0.6;
}

.key.finger-pinky-l::after,
.key.finger-pinky-r::after {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.key.finger-ring-l::after,
.key.finger-ring-r::after {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.key.finger-middle-l::after,
.key.finger-middle-r::after {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.key.finger-index-l::after,
.key.finger-index-r::after {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.key.finger-thumb::after {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.spacebar {
    min-width: 300px;
    padding: 8px 30px;
}

.enter-key {
    min-width: 80px;
    padding: 8px 16px;
    font-size: 0.7em;
}

.key.highlight {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.key.pressed {
    background: #4caf50;
    color: white;
    transform: scale(0.95);
}

.key.wrong {
    background: #f44336;
    color: white;
    animation: shake 0.5s;
}

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

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.btn {
    padding: 8px 20px;
    font-size: 0.9em;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #764ba2;
}

.btn-sound {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.btn-sound.muted {
    background: linear-gradient(135deg, #a8a8a8 0%, #6d6d6d 100%);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.instructions {
    background: #f0f0f0;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.instructions h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.instructions ol {
    margin-left: 20px;
    color: #333;
}

.instructions li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.game-over {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 20px;
}

/* Character highlighting for typing */
.target-text .char {
    display: inline-block;
    position: relative;
}

.target-text .char.correct {
    color: #4caf50;
}

.target-text .char.current {
    background: #fff59d;
    padding: 2px 5px;
    border-radius: 5px;
    animation: blink 1s ease-in-out infinite;
}

.target-text .char.incorrect {
    color: #f44336;
    animation: shake 0.3s ease-in-out;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* Lesson Start Modal */
.lesson-start-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-in;
}

.lesson-start-modal.hidden {
    display: none;
}

.lesson-start-modal-content {
    background: white;
    border-radius: 30px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 90%;
    animation: slideIn 0.5s ease-out;
}

.lesson-start-icon {
    font-size: 6em;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite;
}

.lesson-start-title {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.lesson-start-instructions {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 20px;
    line-height: 1.6;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 15px;
}

.lesson-start-keys {
    font-size: 1.8em;
    font-weight: bold;
    color: #764ba2;
    margin-bottom: 30px;
    padding: 15px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
    letter-spacing: 0.2em;
}

.btn-large {
    font-size: 1.5em;
    padding: 15px 40px;
}

/* Win Modal */
.win-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-in;
}

.win-modal.hidden {
    display: none;
}

.win-modal-content {
    background: white;
    border-radius: 30px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.5s ease-out;
}

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

.win-icon {
    font-size: 5em;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.win-title {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.win-message {
    color: #764ba2;
    font-size: 1.5em;
    margin-bottom: 20px;
}

.win-stats {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    font-size: 1.2em;
    color: #333;
}

.win-stats div {
    margin: 10px 0;
}

.win-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.win-buttons .btn {
    flex: 1;
    max-width: 200px;
}
