* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

.container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1100px;
    padding: 30px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Главный экран */
h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.2rem;
}

h1 i {
    color: #3498db;
    margin-right: 15px;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.trainer-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .trainer-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .trainer-options {
        grid-template-columns: 1fr;
    }
}

.option {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
}

.option:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.option.active-option {
    border-color: #3498db;
    background-color: #e8f4fc;
}

.option-icon {
    font-size: 2.2rem;
    color: #3498db;
    margin-bottom: 15px;
}

.option h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.option p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.4;
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge.active-badge {
    background-color: #2ecc71;
}

.start-section {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-bottom: 30px;
}

#selected-trainer {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

#selected-trainer span {
    color: #3498db;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.stats {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
    padding: 10px;
}

.stats i {
    color: #3498db;
    margin-right: 8px;
}

/* Экран тренировки */
.training-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-back {
    background-color: #f8f9fa;
    color: #3498db;
    border: 2px solid #3498db;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-back:hover {
    background-color: #3498db;
    color: white;
}

.progress-info {
    flex-grow: 1;
    min-width: 300px;
}

.progress-info h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.6rem;
}

.progress-container {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
}

.progress-bar {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #3498db, #2980b9);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.score-container {
    min-width: 140px;
}

.score-box {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
}

.score-label {
    font-size: 0.85rem;
    margin-bottom: 5px;
    opacity: 0.9;
}

.score-value {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.score-percent {
    font-size: 1.1rem;
    font-weight: bold;
}

.task-container {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
}

.task-instruction {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
    text-align: center;
    color: #2c3e50;
    border-left: 4px solid #3498db;
}

.task-instruction i {
    color: #f39c12;
    margin-right: 10px;
}

.cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.card {
    flex: 1;
    min-width: 320px;
    max-width: 380px;
    background-color: white;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card:hover:not(.correct):not(.incorrect) {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.card.correct {
    border-color: #2ecc71;
    background-color: #eafaf1;
}

.card.incorrect {
    border-color: #e74c3c;
    background-color: #fdedec;
}

.word {
    font-size: 2.8rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    line-height: 1.2;
    word-break: break-word;
}

.word .stress {
    color: #2c3e50;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 5px;
}

.hint {
    color: #95a5a6;
    font-size: 0.85rem;
}

.divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #95a5a6;
    font-weight: bold;
    min-width: 80px;
}

.divider span {
    background-color: #f8f9fa;
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #ddd;
    font-size: 0.9rem;
}

.feedback {
    background-color: white;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
    text-align: center;
    display: none;
    border-left: 4px solid #f39c12;
}

.feedback.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

#feedback-text {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
}

#feedback-text.correct {
    color: #27ae60;
}

#feedback-text.incorrect {
    color: #e74c3c;
}

#explanation {
    color: #7f8c8d;
    font-size: 0.95rem;
    line-height: 1.4;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-secondary {
    background-color: white;
    color: #3498db;
    border: 2px solid #3498db;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background-color: #e8f4fc;
}

.words-counter {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
    padding: 10px;
}

.words-counter i {
    color: #3498db;
    margin-right: 8px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .training-header {
        flex-direction: column;
        text-align: center;
    }
    
    .cards-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .card {
        min-width: 100%;
        max-width: 100%;
        padding: 30px 15px;
    }
    
    .word {
        font-size: 2.4rem;
    }
    
    .divider {
        min-width: auto;
        padding: 10px 0;
    }
    
    .divider span {
        padding: 6px 14px;
    }
}
