/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}
h1{
    padding: 20px;
}
body {
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
    text-align: center;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
}
.hidden {
    display: none !important;
}

body.dark-mode {
    background-color: #121212;
    color: #dcdcdc;
}

#theme-toggle{
border: 1px solid #56a6eb42;
border-radius: 50%;
padding: 10px;
}
p {
    text-decoration: solid;
    color: #046e07;
}

/* Quiz Container */
#quiz-container {
    background-color: white;
    width: 90%;
    max-width: 600px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Choice Buttons */
.choice-container button {
    background-color: white;
    border: 2px solid #56a5eb;
    color: #56a5eb;
    font-size: 1.2rem;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 10px;
    transition: background-color 0.3s, color 0.3s;
    text-align: left;
}

#quiz-container button:hover {
    cursor: pointer;
    box-shadow: 0 0.4rem 1.4rem 0 rgba(28, 132, 184, 0.5);
    transform: translateY(-0.1rem);
    transition: transform 150ms;
}

/* HUD Styles */
#hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}


.hud-prefix {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #000000;
    text-align: center;
    font-weight: bold;
}

.hud-main-text {
    font-size: 2rem;
    font-weight: bold;
    color: #000000;
}

/* Progress Bar */
#progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

#progressBar {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    overflow: hidden;
    margin-bottom: 10px;
    margin-top: 10px;
}

#progressBarFull {
    height: 100%;
    width: 0;
    background-color: #4caf5c;
}

#progress-text {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

h2#question {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
}

.choice-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.choice-container button {
    background-color: #ffffff;
    border: 2px solid #56a5eb;
    color: #56a5eb;
    font-size: 1.2rem;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.choice-container button:hover {
    background-color: #56a5eb;
    color: white;
}

body.dark-mode .choice-container button {
    background-color: #3e3e3e;
    border-color: #000000;
    color: #f0f0f0;
}

body.dark-mode .choice-container button:hover {
    background-color: #56a5eb;
    color: white;
}

/* Restart Button */
#restart-btn {
    background-color: #56a5eb;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.4rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#restart-btn:hover {
    background-color: #2e8bb8;
}

body.dark-mode #restart-btn {
    background-color: #3e3e3e;
}

body.dark-mode #restart-btn:hover {
    background-color: #56a5eb;
}

/* Login & Register Container */
#auth-container {
    background-color: white;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

body.dark-mode #auth-container {
    background-color: #1e1e1e;
}

.auth-title {
    font-size: 2rem;
    margin-bottom: 20px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form input {
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    border-color: #56a5eb;
}

body.dark-mode .auth-form input {
    background-color: #333;
    border-color: #555;
    color: #f0f0f0;
}


/* Shake animation for incorrect answer */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
  }
  
  /* Flash animation for correct answer */
  @keyframes flash {
    0% { background-color: #28a745; }
    50% { background-color: #7cd38a; }
    100% { background-color: #28a745; }
  }
  
  .correct {
    background-color: #28a745;
    animation: flash 0.5s ease;
  }
  
  .incorrect {
    
    animation: shake 0.4s ease;
   
        background-color: #dc3545 !important;
        color: white;
        animation: shake 0.4s ease !important; /* Added !important */
     
  }
  
.auth-btn {
    background-color: #56a5eb;
    color: white;
    border: none;
    padding: 12px;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-btn:hover {
    background-color: #2e8bb8;
}

body.dark-mode .auth-btn {
    background-color: #3e3e3e;
}

body.dark-mode .auth-btn:hover {
    background-color: #56a5eb;
}

.auth-link {
    font-size: 0.9rem;
    color: #333;
    margin-top: 10px;
}

body.dark-mode .auth-link {
    color: #dcdcdc;
}

.hidden {
    display: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    #quiz-container, #auth-container {
        padding: 15px;
    }

    h2#question {
        font-size: 1.6rem;
    }

    .choice-container button {
        font-size: 1rem;
        padding: 10px 15px;
    }

    #hud-item {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    #quiz-container, #auth-container {
        width: 95%;
        padding: 10px;
    }

    h2#question {
        font-size: 1.4rem;
    }

    .choice-container button {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    #hud-item {
        font-size: 1rem;
    }
}
