/* ===== ОБЩИЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #00D4E8;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* ===== ЭКРАНЫ ===== */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

#question-screen.active {
    display: flex;
    align-items: center;
}

#results-screen.active {
    display: block;
    padding: 40px 20px;
}

/* ===== КНОПКА ЗВУКА ===== */
.sound-button {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #000;
    background-color: #FFD700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 40px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
    z-index: 10;
    animation: pulse 2s infinite;
}

.sound-button:hover {
    transform: scale(1.1);
}

.sound-button.disabled {
    background-color: #CCC;
    animation: none;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); 
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0); 
    }
}

/* ===== КРЕСТИК ===== */
.close-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 100px;
    height: 100px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 100px;
    color: #FF0000;
    line-height: 1;
    font-weight: bold;
    z-index: 10;
    transition: transform 0.2s;
}

.close-button:hover {
    transform: rotate(90deg);
}

/* ===== СТАРТОВЫЙ ЭКРАН ===== */
.card-large {
    background-color: #FFF;
    border-radius: 40px;
    padding: 80px 100px;
    max-width: 1000px;
    width: 100%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 5px solid #000;
    text-align: center;
}

.emoji-large {
    font-size: 80px;
    margin-bottom: 30px;
    animation: bounce 1.5s infinite;
}

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

.title-large {
    font-size: 56px;
    font-weight: bold;
    margin-bottom: 40px;
    color: #000;
    line-height: 1.3;
}

.subtitle-large {
    font-size: 36px;
    margin-bottom: 60px;
    color: #000;
}

.start-button {
    padding: 30px 100px;
    font-size: 48px;
    font-weight: bold;
    background-color: #FFD700;
    border: 5px solid #000;
    border-radius: 60px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    color: #000;
}

.start-button:hover {
    transform: scale(1.1);
    background-color: #FFA500;
}

/* ===== БОКОВАЯ ПАНЕЛЬ С НОМЕРАМИ ===== */
.sidebar {
    width: 100px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding-top: 120px;
    margin-right: 30px;
    flex-shrink: 0;
}

.sidebar-number {
    width: 80px;
    height: 80px;
    border: 4px solid #000;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.sidebar-number.current {
    background-color: #FF1493;
    color: #FFF;
}

.sidebar-number.completed {
    background-color: #90EE90;
    color: #000;
}

.sidebar-number.pending {
    background-color: #FFF;
    color: #000;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ВОПРОСОВ ===== */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-question {
    background-color: #FFF;
    border-radius: 40px;
    padding: 80px;
    max-width: 1200px;
    width: 100%;
    border: 5px solid #000;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

.badge-label {
    position: absolute;
    top: -30px;
    left: 50px;
    background-color: #000;
    color: #FFF;
    padding: 12px 35px;
    border-radius: 25px;
    font-size: 28px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 15px;
}

.badge-icon {
    width: 40px;
    height: 40px;
    background-color: #FFF;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.question-emoji {
    text-align: center;
    font-size: 120px;
    margin-bottom: 40px;
    animation: bounce 1s infinite;
}

.question-text {
    font-size: 44px;
    font-weight: bold;
    margin-bottom: 60px;
    text-align: center;
    color: #000;
    line-height: 1.4;
}

/* ===== ВАРИАНТЫ ОТВЕТОВ ===== */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 60px;
}

.option-button {
    padding: 35px 40px;
    font-size: 36px;
    text-align: left;
    background-color: #FFF;
    border: 4px solid #DDD;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
}

.option-button:hover {
    transform: scale(1.03);
    background-color: #F5F5F5;
}

.option-button.selected {
    background-color: #FFE082;
    border: 5px solid #FFA000;
    font-weight: bold;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* ===== КНОПКА ДАЛЕЕ (ОГРОМНАЯ СТРЕЛКА) ===== */
.button-container {
    text-align: center;
}

.next-button {
    width: 200px;
    height: 200px;
    font-size: 120px;
    font-weight: bold;
    background-color: #CCC;
    color: #FFF;
    border: 6px solid #000;
    border-radius: 50%;
    cursor: not-allowed;
    box-shadow: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.next-button:enabled {
    background-color: #4CAF50;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.next-button:enabled:hover {
    transform: scale(1.1);
    background-color: #45a049;
}

/* ===== АНИМАЦИЯ УСПЕХА ===== */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 255, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.3s;
}

.success-overlay.show {
    display: flex;
}

.success-emoji {
    font-size: 200px;
    animation: bounce 0.5s;
}

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

/* ===== ЭКРАН РЕЗУЛЬТАТОВ ===== */
.results-container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: #FFF;
    border-radius: 40px;
    padding: 60px;
    border: 5px solid #000;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

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

.results-emoji {
    font-size: 100px;
    margin-bottom: 20px;
}

.results-title {
    font-size: 48px;
    font-weight: bold;
    color: #000;
    margin-bottom: 20px;
}

.results-score {
    font-size: 36px;
    color: #000;
}

.results-score .score-number {
    color: #4CAF50;
    font-weight: bold;
}

/* ===== ТАБЛИЦА РЕЗУЛЬТАТОВ ===== */
.table-wrapper {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 24px;
}

.results-table thead tr {
    background-color: #FFD700;
}

.results-table th {
    border: 3px solid #000;
    padding: 20px;
    font-weight: bold;
    font-size: 28px;
}

.results-table th:first-child {
    text-align: center;
}

.results-table th:last-child {
    text-align: center;
}

.results-table td {
    border: 3px solid #000;
    padding: 20px;
    font-size: 26px;
}

.results-table td:first-child {
    font-weight: bold;
    text-align: center;
    font-size: 32px;
}

.results-table td:last-child {
    text-align: center;
}

.results-table tbody tr.correct {
    background-color: #C8E6C9;
}

.results-table tbody tr.incorrect {
    background-color: #FFCDD2;
}

.correct-answer-hint {
    color: #2E7D32;
    font-size: 22px;
    margin-top: 8px;
    font-weight: bold;
}

.result-icon {
    font-size: 48px;
    font-weight: bold;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ ===== */
@media (max-width: 1400px) {
    .card-large {
        padding: 60px 80px;
    }
    
    .card-question {
        padding: 60px;
    }
    
    .title-large {
        font-size: 48px;
    }
    
    .question-text {
        font-size: 38px;
    }
    
    .option-button {
        font-size: 32px;
    }
}

/* ===== АДАПТИВНОСТЬ ДЛЯ СМАРТФОНОВ ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        padding-top: 80px;
        gap: 15px;
        margin-right: 15px;
    }
    
    .sidebar-number {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }
    
    .card-large {
        padding: 40px 30px;
    }
    
    .emoji-large {
        font-size: 60px;
    }
    
    .title-large {
        font-size: 36px;
    }
    
    .subtitle-large {
        font-size: 24px;
        margin-bottom: 40px;
    }
    
    .start-button {
        padding: 20px 60px;
        font-size: 32px;
    }
    
    .sound-button {
        width: 60px;
        height: 60px;
        font-size: 28px;
        top: 15px;
        right: 15px;
    }
    
    .close-button {
        width: 70px;
        height: 70px;
        font-size: 70px;
        bottom: 15px;
        right: 15px;
    }
    
    .card-question {
        padding: 40px 30px;
    }
    
    .badge-label {
        font-size: 20px;
        padding: 8px 20px;
        left: 20px;
    }
    
    .badge-icon {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
    
    .question-emoji {
        font-size: 80px;
        margin-bottom: 30px;
    }
    
    .question-text {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .options-container {
        gap: 15px;
        margin-bottom: 40px;
    }
    
    .option-button {
        padding: 20px 25px;
        font-size: 24px;
    }
    
    .next-button {
        width: 150px;
        height: 150px;
        font-size: 90px;
    }
    
    .results-container {
        padding: 30px 20px;
    }
    
    .results-emoji {
        font-size: 70px;
    }
    
    .results-title {
        font-size: 32px;
    }
    
    .results-score {
        font-size: 24px;
    }
    
    .results-table {
        font-size: 16px;
    }
    
    .results-table th {
        padding: 12px 8px;
        font-size: 18px;
    }
    
    .results-table td {
        padding: 12px 8px;
        font-size: 16px;
    }
    
    .results-table td:first-child {
        font-size: 20px;
    }
    
    .correct-answer-hint {
        font-size: 14px;
    }
    
    .result-icon {
        font-size: 32px;
    }
    
    .success-emoji {
        font-size: 120px;
    }
}

/* ===== АДАПТИВНОСТЬ ДЛЯ БОЛЬШИХ ЭКРАНОВ (4K) ===== */
@media (min-width: 2560px) {
    .card-large {
        max-width: 1400px;
        padding: 120px 140px;
    }
    
    .title-large {
        font-size: 72px;
    }
    
    .subtitle-large {
        font-size: 48px;
    }
    
    .start-button {
        font-size: 60px;
    }
    
    .card-question {
        max-width: 1800px;
        padding: 120px;
    }
    
    .question-emoji {
        font-size: 160px;
    }
    
    .question-text {
        font-size: 56px;
    }
    
    .option-button {
        font-size: 44px;
        padding: 45px 50px;
    }
    
    .next-button {
        width: 250px;
        height: 250px;
        font-size: 150px;
    }
    
    .results-title {
        font-size: 64px;
    }
    
    .results-score {
        font-size: 48px;
    }
}