@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

html,
body {
    height: 100%;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-container {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border-radius: 20px;
    padding: 40px 30px;
    width: 90vw;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(8px);
    animation: fadeIn 1s;
}

.quiz-title {
    color: #fff;
    font-size: 2.2rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px #3333;
}

.quiz-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.question {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 18px;
    min-height: 60px;
    transition: color 0.3s;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px #3331;
}

.option-btn:hover {
    background: #667eea;
    color: #fff;
    transform: scale(1.04);
}

.option-btn.correct {
    background: #4fd1c5;
    color: #fff;
    animation: correctPulse 0.5s;
}

.option-btn.wrong {
    background: #f56565;
    color: #fff;
    animation: wrongShake 0.5s;
}

.next-btn {
    background: #764ba2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 1rem;
    cursor: pointer;
    margin: 0 auto 10px auto;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px #3331;
    display: none;
}

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

.score {
    color: #fff;
    font-size: 1.1rem;
    margin-top: 10px;
    text-align: center;
    min-height: 24px;
    letter-spacing: 1px;
}

.result-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px 0 20px 0;
}
.loader-spinner {
    border: 6px solid #eee;
    border-top: 6px solid #764ba2;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin-bottom: 18px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result-card {
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    box-shadow: 0 4px 24px #764ba244;
    padding: 32px 18px 24px 18px;
    text-align: center;
    margin: 0 auto;
    max-width: 320px;
    animation: fadeIn 0.7s;
}
.result-title {
    font-size: 1.7rem;
    color: #764ba2;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}
.result-score {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}
.result-message {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .quiz-container {
        padding: 20px 5px;
        max-width: 98vw;
    }

    .quiz-title {
        font-size: 1.3rem;
    }

    .question {
        font-size: 1rem;
    }

    .option-btn {
        font-size: 0.95rem;
        padding: 10px 8px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes correctPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes wrongShake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    50% {
        transform: translateX(8px);
    }

    75% {
        transform: translateX(-8px);
    }

    100% {
        transform: translateX(0);
    }
}
