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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

h1 {
    text-align: center;
    color: #fa709a;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

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

.stat-box {
    background: #f8f9fa;
    padding: 15px 25px;
    border-radius: 10px;
    text-align: center;
    flex: 1;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #fa709a;
}

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

.diff-btn {
    padding: 10px 25px;
    font-size: 1em;
    border: 2px solid #fa709a;
    background: white;
    color: #fa709a;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    font-family: inherit;
}

.diff-btn.active {
    background: #fa709a;
    color: white;
}

.diff-btn:hover {
    transform: translateY(-2px);
}

.question-box {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(250, 112, 154, 0.3);
}

.question {
    color: white;
    font-size: 3em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.choices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.choice-btn {
    padding: 20px;
    font-size: 1.4em;
    background: white;
    border: 3px solid #fa709a;
    color: #fa709a;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    font-family: inherit;
}

.choice-btn:hover:not(:disabled) {
    background: #fa709a;
    color: white;
    transform: translateY(-2px);
}

.choice-btn:disabled {
    cursor: not-allowed;
}

.choice-btn.correct {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.choice-btn.incorrect {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.feedback {
    text-align: center;
    min-height: 30px;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
}

.feedback-correct {
    color: #28a745;
}

.feedback-incorrect {
    color: #dc3545;
}

.buttons {
    display: flex;
    justify-content: center;
}

#restartBtn {
    padding: 12px 30px;
    font-size: 1.1em;
    background: #fa709a;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    font-family: inherit;
}

#restartBtn:hover {
    background: #e85a82;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(250, 112, 154, 0.4);
}

.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.result-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
}

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

.result-content h2 {
    color: #fa709a;
    margin-bottom: 20px;
}

.result-stats {
    margin: 20px 0;
}

.result-stat {
    margin: 15px 0;
    font-size: 1.2em;
}

.result-stat span {
    font-weight: bold;
    color: #fa709a;
    font-size: 1.5em;
}

#closeResult {
    background: #28a745;
    color: white;
    border: none;
    margin-top: 20px;
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
}

@media (max-width: 600px) {
    body {
        padding: 8px;
        align-items: flex-start;
    }

    .container {
        min-width: 0;
        padding: 20px 12px;
    }

    .stats {
        gap: 8px;
    }

    .stat-box {
        min-width: 0;
        padding: 12px 4px;
    }

    .stat-label {
        font-size: 0.75em;
        overflow-wrap: anywhere;
    }

    .stat-value {
        font-size: 1.45em;
    }

    .difficulty {
        flex-wrap: wrap;
    }

    .diff-btn,
    #restartBtn,
    #closeResult {
        min-height: 44px;
    }

    .question-box {
        padding: 24px 12px;
    }

    .result-content {
        width: calc(100% - 24px);
        padding: 24px 16px;
    }

    .question {
        font-size: 2em;
    }

    .choice-btn {
        font-size: 1.1em;
        padding: 15px;
    }

    h1 {
        font-size: 2em;
    }

    .choices {
        grid-template-columns: 1fr;
    }
}
