* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #84fab0, #8fd3f4);
    padding: 20px;
}

.card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 900px;
    max-width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.title {
    font-size: 22px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 16px;
    margin-bottom: 25px;
    color: #555;
}

/* Header with level and lives */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.level-badge {
    font-weight: bold;
    font-size: 14px;
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border-radius: 20px;
}

.lives {
    font-size: 24px;
    letter-spacing: 4px;
}

.progress-counter {
    font-size: 14px;
    color: #666;
}

.word {
    display: inline-flex;
    align-items: center;
    font-size: 44px;
    margin-bottom: 30px;
    white-space: nowrap;
    /* запрещаем перенос */
}

.letter-slot {
    display: inline-flex;
    align-items: center;
}

.letter {
    padding: 8px 4px;
}

.divider {
    width: 6px;
    height: 50px;
    margin: 0 4px;
    background: #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: 0.2s;
}

.divider.active {
    background: #e53935;
}

.syllable-highlight {
    background: #c8e6c9;
    border-radius: 10px;
    padding: 6px 4px;
}

button {
    padding: 10px 18px;
    margin: 8px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    background: #667eea;
    color: white;
    transition: 0.2s;
}

button:hover {
    background: #5568d3;
}

button:active {
    transform: scale(0.98);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.result {
    font-size: 20px;
    min-height: 28px;
    margin: 15px 0;
}

.correct-text {
    color: #2e7d32;
}

.wrong-text {
    color: #c62828;
}

.stats {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

.syllable {
    padding: 10px 16px;
    border-radius: 12px;
    transition: 0.2s;
}

.color-0 {
    background: #c8e6c9;
}

.color-1 {
    background: #bbdefb;
}

.color-2 {
    background: #ffe0b2;
}

.color-3 {
    background: #f8bbd0;
}

/* Game Over / Level Complete screens */
.screen {
    display: none;
    text-align: center;
    animation: fadeIn 0.3s;
}

.screen.active {
    display: block;
}

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

.screen-title {
    font-size: 40px;
    margin-bottom: 20px;
    font-weight: bold;
}

.screen-title.victory {
    color: #2e7d32;
}

.screen-title.defeat {
    color: #c62828;
}

.screen-subtitle {
    font-size: 20px;
    color: #666;
    margin-bottom: 30px;
}

.game-screen {
    display: block;
}

.hidden {
    display: none !important;
}

