/* Базовые стили для приложения */

* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.2em;
}

main {
    margin-bottom: 40px;
}

.welcome-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 30px;
    border-radius: 15px;
    color: white;
    text-align: center;
}

.welcome-card h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.welcome-card p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 10px;
}

footer {
    text-align: center;
    color: #999;
    font-size: 0.9em;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Стили для каталога */

.category-section {
    margin-bottom: 40px;
}

.category-section h2 {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.asset-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asset-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.asset-key {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #999;
    background: #f5f5f5;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

.asset-text {
    font-size: 1.2em;
    color: #333;
    font-weight: 500;
    min-height: 30px;
}

.play-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.play-btn:active {
    transform: scale(0.98);
}

.play-btn.playing {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

header a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

header a:hover {
    text-decoration: underline;
}

/* Стили для игрового экрана */

.game-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.game-image {
    margin-bottom: 30px;
}

.emoji {
    font-size: 8em;
    display: block;
    animation: bounce 2s infinite;
}

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

.game-word {
    margin-bottom: 30px;
}

.game-word h2 {
    font-size: 4em;
    color: #667eea;
    letter-spacing: 0.1em;
    font-weight: bold;
}

.listen-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    font-weight: 600;
}

.listen-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.listen-btn:active {
    transform: scale(0.98);
}

.answer-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.answer-input {
    padding: 15px 25px;
    font-size: 1.5em;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    width: 300px;
    text-align: center;
    text-transform: uppercase;
    transition: border-color 0.3s ease;
}

.answer-input:focus {
    outline: none;
    border-color: #667eea;
}

.check-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 12px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.check-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.check-btn:active {
    transform: scale(0.98);
}

.feedback {
    min-height: 60px;
    font-size: 1.5em;
    font-weight: bold;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    animation: celebrate 0.5s ease;
}

.feedback.incorrect {
    background: #fff3cd;
    color: #856404;
}

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

/* Стили для блока подсказок (Леса) */

.hints-container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: fadeIn 0.5s ease;
}

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

.child-hint-box {
    background: #e3f2fd;
    border-left: 5px solid #2196f3;
    padding: 15px 20px;
    border-radius: 8px;
    color: #0d47a1;
    font-size: 1.1em;
}

.parent-hint-box {
    background: #fff3e0;
    border-left: 5px solid #ff9800;
    padding: 15px 20px;
    border-radius: 8px;
    color: #e65100;
    font-size: 1.05em;
    font-style: italic;
}

.parent-hint-box strong {
    display: block;
    margin-bottom: 5px;
    font-style: normal;
}

/* Стили для родительского дашборда */

.dashboard-section {
    margin-bottom: 50px;
}

.dashboard-section h2 {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/* Карта навыков */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.skill-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.skill-name {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
}

.skill-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.skill-level {
    font-size: 1.2em;
    color: #666;
    font-weight: 600;
}

/* Статистика по словам */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.task-stat-card {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.task-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.task-stat-card.status-mastered {
    border-color: #4caf50;
    background: #f1f8f4;
}

.task-stat-card.status-learning {
    border-color: #2196f3;
    background: #f3f9fd;
}

.task-stat-card.status-difficult {
    border-color: #ff9800;
    background: #fff8f0;
}

.task-stat-card.status-not_started {
    border-color: #9e9e9e;
    background: #fafafa;
}

.task-emoji {
    font-size: 4em;
    margin-bottom: 15px;
}

.task-word {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.task-stats {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.8;
}

.task-status {
    font-size: 1.1em;
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
}

/* Рекомендации */
.recommendations {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rec-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    border-left: 5px solid #667eea;
}

.rec-card h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
}

.rec-card ul {
    margin-left: 20px;
    line-height: 1.8;
}

.rec-card.rec-focus {
    border-left-color: #2196f3;
    background: #f3f9fd;
}

.rec-card.rec-warning {
    border-left-color: #ff9800;
    background: #fff8f0;
}

.rec-card.rec-info {
    border-left-color: #9e9e9e;
    background: #fafafa;
}

/* Стили для кнопок меню на главной странице */

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.menu-btn {
    display: block;
    background: white;
    color: #667eea;
    text-decoration: none;
    padding: 20px 30px;
    border-radius: 12px;
    font-size: 1.3em;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 3px solid white;
}

.menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.menu-btn-parent {
    background: #fff3e0;
    color: #e65100;
    border-color: #ff9800;
}

.menu-btn-catalog {
    background: #e3f2fd;
    color: #0d47a1;
    border-color: #2196f3;
}

/* Стили для кнопки "Дальше" */

.next-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.4em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 25px;
    font-weight: 600;
    display: block;
    margin-left: auto;
    margin-right: auto;
    animation: slideIn 0.5s ease;
}

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

.next-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.next-btn:active {
    transform: scale(0.98);
}

/* Стили для игры со звуками */

.sounds-game-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.listen-sound-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 50px;
    font-size: 1.4em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 40px;
    font-weight: 600;
}

.listen-sound-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.listen-sound-btn:active {
    transform: scale(0.98);
}

.sound-letter {
    font-size: 10em;
    font-weight: bold;
    color: #667eea;
    margin: 30px 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

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

.answer-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
    margin: 30px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.option-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 25px;
    border-radius: 15px;
    font-size: 2.5em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.option-btn:active {
    transform: scale(0.95);
}

.option-btn.correct {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    animation: correctPulse 0.5s ease;
}

.option-btn.incorrect {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
    animation: shake 0.5s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

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

/* В style.css добавить */
.menu-btn-sounds {
    background: #fff3e0;
    color: #e65100;
    border-color: #ff9800;
}

/* Стили для карточки-подсказки при ошибке */

.hint-card {
    background: #fff3e0;
    border: 3px dashed #ff9800;
    border-radius: 20px;
    padding: 20px;
    margin: 20px auto;
    max-width: 300px;
    text-align: center;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.hint-emoji {
    font-size: 5em;
    margin-bottom: 10px;
    animation: bounce 1s infinite;
}

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

.hint-text {
    font-size: 1.3em;
    color: #e65100;
    font-weight: 600;
}
