/* style.css */

/* Define a set of CSS variables for colors, spacing, and fonts */
:root {
    --primary-color: #3f51b5; /* Indigo - Modern and Trustworthy */
    --primary-hover: #303f9f;
    --secondary-color: #ffc107; /* Amber - For highlights */
    --background-light: #f5f5f5; /* Lighter background */
    --background-card: #ffffff;
    --text-dark: #212121;
    --text-light: #757575;
    --success-color: #4caf50; /* Green */
    --error-color: #f44336; /* Red */
    --border-radius-sm: 8px;
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 6px 18px rgba(0, 0, 0, 0.15);
}

body {
    background-color: var(--background-light);
    font-family: 'Roboto', sans-serif; /* Modern, readable font */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px; /* Add some padding for small screens */
    box-sizing: border-box; /* Include padding/border in element's total width and height */
}

.quiz-container {
    background-color: var(--background-card);
    padding: clamp(20px, 5vw, 40px); /* Responsive padding */
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
    transition: transform 0.3s ease-in-out;
}

/* Header Styling */
h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
}

/* Category Selection */
.category-selection {
    text-align: center;
    padding-top: 15px;
}

.category-selection h2 {
    color: var(--text-dark);
    margin-bottom: 35px;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 500;
}

.category-btn {
    display: block;
    width: 90%; /* A bit wider for better tap targets on mobile */
    max-width: 400px;
    margin: 20px auto;
    padding: 18px;
    font-size: 1.15rem;
    font-weight: 500;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.category-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
@media (max-width: 480px) {
    .category-btn {
        width: 100%;
        margin: 15px 0;
    }
}


/* Question Styling */
#question {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--text-dark);
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
    line-height: 1.5;
}

/* Answer Buttons Grid */
.btn-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 25px;
}

.btn {
    background-color: var(--background-card);
    color: var(--text-dark);
    border: 1px solid #ccc;
    padding: 15px 20px;
    text-align: left;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s, box-shadow 0.2s;
    line-height: 1.3;
}

.btn:hover:not([disabled]) {
    background-color: #e8e8e8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Styles for correct and incorrect answers */
.btn.correct {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5); /* Glowing effect */
}

.btn.incorrect {
    background-color: var(--error-color);
    color: white;
    border-color: var(--error-color);
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.5); /* Glowing effect */
}

/* Next Button */
.next-btn {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    padding: 14px 25px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s, transform 0.1s;
}

.next-btn:hover:not([disabled]) {
    background-color: #ffb300;
    transform: translateY(-1px);
}

.next-btn:disabled {
    background-color: #bdbdbd; /* Grayed out when disabled */
    color: #f5f5f5;
    cursor: not-allowed;
    box-shadow: none;
}

