@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #111;
    color: #fff;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.quiz-container {
    background: #222;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 400px;
    transition: background-color 0.3s ease-in-out;
}

h1 {
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 600;
}

.btn-container {
    display: flex;
    flex-direction: column;
}
.navbar {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 15px 0;
    background: #222; /* Optional: adds a background */
}

button {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 500;
    background-color: #ff5e99;
    color: white;
    border: none;
    padding: 12px;
    margin: 6px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
}

button:hover {
    background-color: #ff85b0;
    transform: translateY(-2px);
}

/* Animation for correct answer */
.correct {
    background-color: #4CAF50 !important; /* Green */
    animation: correctFlash 0.5s ease-in-out;
}

@keyframes correctFlash {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Animation for wrong answer */
.wrong {
    background-color: #ff4d4d !important; /* Red */
    animation: wrongShake 0.5s ease-in-out;
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

/* Hides elements */
.hidden {
    display: none;
}
.navbar ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 30px;
    margin-top: 15px;
}

.nav-link {
    font-size: 1.2rem;
    color: #c9d1d9;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: rgba(88, 166, 255, 0.1);
    border-color: #58a6ff;
    color: #58a6ff;
}
