/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Global Styles for Dark Mode */
body {
    background-color: #121212;
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Main Container Styling */
.container, .quiz-container {
    max-width: 900px;
    width: 90%;
    background: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
    margin: 20px auto;
}

/* Heading Styles */
h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ffcc00;
}

/* Subject Card Styles */
.subjects-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.subject-card {
    background: #333;
    padding: 15px;
    border-radius: 10px;
    width: 250px;
    text-align: center;
    transition: transform 0.3s, background-color 0.3s;
}

.subject-card:hover {
    background-color: #444;
    transform: scale(1.05);
}

.subject-card h2 {
    margin-bottom: 10px;
    font-size: 1.5rem;
    color: #ffcc00;
}

/* Quiz Button Styles */
.quiz-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.quiz-button {
    background: #ff9800;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    font-size: 1rem;
}

.quiz-button:hover {
    background-color: #e68900;
    transform: scale(1.1);
}

/* Quiz Header Styles */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.quiz-controls {
    display: flex;
    gap: 10px;
}

/* Randomize Questions and Timer Button Styles */
.quiz-controls button {
    background: #3f51b5;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    font-size: 1rem;
}

.quiz-controls button:hover {
    background-color: #3949ab;
    transform: scale(1.05);
}

/* Disabled Button Styles */
button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Timer Styles */
.timer {
    background: #333;
    color: #ff5722;
    padding: 10px;
    border-radius: 5px;
    font-size: 1.2rem;
    text-align: center;
}

/* Question Container */
#question-container {
    background: #333;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

#question-text {
    font-size: 1.8rem;
}

/* Answer Options Container */
.options-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-button {
    background: #444;
    color: #ffffff;
    border: 1px solid #555;
    padding: 15px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.option-button:hover {
    background-color: #555;
    transform: scale(1.02);
}

/* Highlight Correct Answer Styles */
.correct-answer-highlight {
    background-color: #28a745 !important; /* Green background for correct answer */
    color: white;
}

/* Explanation Styles */
.explanation {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    font-size: 1.1rem;
    color: #90caf9;
}

/* Back to Home and Next Question Button Styles */
.navigation-buttons {
    margin-top: 20px;
    text-align: center;
}

.navigation-buttons button {
    background: #3f51b5;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 10px;
}

.navigation-buttons button:hover {
    background-color: #3949ab;
}

/* Next Question Button Styles */
#next-button {
    background: #28a745;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    display: none; /* Initially hidden */
}

#next-button:hover {
    background-color: #218838;
}

/* Animation for Wrong Answer (Shake) */
.shake-animation {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

/* Animation for Correct Answer (Zoom) */
.zoom-animation {
    animation: zoom 0.5s ease-in-out;
}

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

/* Styles for Correct and Wrong Answer Buttons */
.correct-answer {
    background-color: #28a745 !important; /* Green background for correct answers */
    color: white;
}

.wrong-answer {
    background-color: #d32f2f !important; /* Red background for incorrect answers */
    color: white;
}
