* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none; /* Чтобы случайно не выделить текст */
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #e0f2e9 0%, #c8e6df 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.test-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.test-card {
    background: white;
    border-radius: 32px;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transition: all 0.2s ease;
}

.test-header {
    background: #2c7a4d;
    padding: 24px 30px;
    color: white;
    text-align: center;
}

.test-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.test-header p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Зона вопроса */
.question-area {
    padding: 30px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Стартовый экран */
.start-screen {
    text-align: center;
}

.start-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.start-screen h2 {
    font-size: 1.8rem;
    color: #1f3b2c;
    margin-bottom: 15px;
}

.start-screen p {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.rules-list {
    text-align: left;
    background: #f8fafc;
    padding: 20px 30px;
    border-radius: 20px;
    margin: 20px 0;
    list-style: none;
}

.rules-list li {
    margin: 12px 0;
    font-size: 1rem;
    color: #2d3748;
}

.btn-start {
    background: #2c7a4d;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 60px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 8px rgba(44, 122, 77, 0.3);
}

.btn-start:hover {
    background: #1e5938;
    transform: scale(1.02);
}

/* Карточка активного вопроса */
.question-card {
    width: 100%;
}

.question-text {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 30px;
    line-height: 1.3;
    padding-right: 80px; /* место для таймера */
    position: relative;
}

/* Таймер в правом верхнем углу */
.timer-circle {
    position: absolute;
    top: 0;
    right: 0;
    width: 65px;
    height: 65px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c7a4d;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 3px solid #2c7a4d;
}

.timer-warning {
    color: #e53e3e;
    border-color: #e53e3e;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Варианты ответов */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 30px 0 20px;
}

.option-btn {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 60px;
    padding: 14px 20px;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: #1e293b;
}

.option-btn:hover:not(:disabled) {
    background: #e6f7ef;
    border-color: #2c7a4d;
    transform: translateX(6px);
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Статусбар */
.progress-info {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #4b5563;
    border-top: 1px solid #e2e8f0;
    padding-top: 18px;
}

/* Блок объяснений снизу */
.explanation-box {
    background: #f1f9f4;
    border-top: 3px solid #2c7a4d;
    padding: 18px 30px;
    min-height: 100px;
}

.explanation-title {
    font-weight: bold;
    color: #2c7a4d;
    margin-bottom: 8px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.explanation-text {
    color: #2d3748;
    line-height: 1.45;
    font-size: 0.95rem;
}

/* Кнопка сброса / попробовать снова */
.reset-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 40px;
    cursor: pointer;
    margin-top: 20px;
    transition: 0.2s;
    width: 100%;
}

.reset-btn:hover {
    background: #c53030;
}

/* Статус-сообщения (не сдал / неплохо / респект) */
.status-message {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    padding: 40px 0;
    letter-spacing: 2px;
}

/* Адаптация */
@media (max-width: 550px) {
    .test-header h1 { font-size: 1.3rem; }
    .question-text { font-size: 1.3rem; padding-right: 70px; }
    .timer-circle { width: 50px; height: 50px; font-size: 1.3rem; }
    .options-grid { gap: 10px; }
    .option-btn { padding: 10px 16px; font-size: 0.9rem; }
}
/* Анимация красной пульсирующей вспышки */
.red-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(220, 38, 38, 0.7);
    pointer-events: none;
    z-index: 9999;
    animation: pulseRed 0.5s ease-in-out 6;
    opacity: 0;
}

@keyframes pulseRed {
    0% { opacity: 0; }
    30% { opacity: 0.9; }
    70% { opacity: 0.6; }
    100% { opacity: 0; }
}

/* Контейнер для падающих медалек */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    overflow: hidden;
}

.medal {
    position: absolute;
    font-size: 2rem;
    animation: fall linear forwards;
    z-index: 10001;
}

@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}
/* Зелёная пульсирующая вспышка */
.green-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(34, 197, 94, 0.7);
    pointer-events: none;
    z-index: 9999;
    animation: pulseGreen 0.4s ease-in-out 6;
    opacity: 0;
}

@keyframes pulseGreen {
    0% { opacity: 0; }
    30% { opacity: 0.8; }
    70% { opacity: 0.5; }
    100% { opacity: 0; }
}

/* Фейерверк */
.firework {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    animation: explode 0.8s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}