/* General body styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f9f9f9;
}

/* Page Title */
h1 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
}

/* Controls Section */
.controls {
    display: flex; /* Arrange elements in a row */
    justify-content: space-between; /* Space buttons on opposite sides */
    align-items: center; /* Align elements vertically */
    flex-wrap: wrap; /* Ensure responsiveness */
    margin-bottom: 20px;
}

/* Individual control groups */
.left-controls, .right-controls {
    display: flex;
    align-items: center;
    gap: 10px; /* Spacing between elements */
}

/* Input field styling */
input[type="number"], input[type="text"] {
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 4px;
    width: 120px;
    font-size: 16px;
}

/* Button Styling */
button {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

/* Hover effect for buttons */
button:hover {
    background-color: #45a049;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Table Styling */
table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
}

/* Table Headers & Cells */
th, td {
    border: 1px solid #ddd;
    text-align: center;
    padding: 8px 25px;
    font-size: 14px;
    white-space: nowrap;
}

/* Sticky Headers */
th {
    background-color: #f2f2f2;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Sticky First Column */
th:first-child, td:first-child {
    position: sticky;
    left: 0;
    background-color: #f2f2f2;
    z-index: 1;
}

/* Highlighting Styles */
tr:hover {
    background-color: rgba(255, 255, 204, 0.7);
}

td.highlight {
    background-color: rgba(255, 255, 204, 0.7);
}

td.highlight-cell {
    background-color: rgba(255, 215, 0, 0.7);
}

td.highlight-square-root {
    background-color: rgba(21, 163, 253, 0.1);
}
/* QUIZ SECTION */
#quiz-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    margin: 30px auto;
}

/* Quiz Settings */
.quiz-settings {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    margin-bottom: 15px;
}

/* Quiz Type Dropdown */
#quiz-type {
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 4px;
    width: 380px;
    font-size: 16px;
    text-align: center;
  /* Add more space above and below */
    margin-top: 10px;  /* Space above */
    margin-bottom: 10px;  /* Space below */
}

/* Start Quiz Button - Same as Generate Table */
.quiz-btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 180px;
    text-align: center;
}

.quiz-btn:hover {
    background-color: #45a049;
}

/* Quiz Question */
.quiz-question {
    font-size: 18px;
    font-weight: bold;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
}

/* Quiz Answers in 2x2 Grid */
.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

/* Answer Buttons */
.quiz-options button {
    background-color: rgba(21, 163, 253, 0.1); /* Light pale blue */
    border: 2px solid #ccc;
    color: #000;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    width: 180px; /* Matches Generate Table button */
    height: 50px;
    cursor: pointer;
    text-align: center;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover Effect */
.quiz-options button:hover {
    background-color: rgba(21, 163, 253, 0.3);
}

/* Correct Answer (Green ✅) */
.quiz-options button.correct {
    background-color: #c8e6c9;
    border-color: #2e7d32;
    color: #2e7d32;
}

/* Incorrect Answer (Red ❌) */
.quiz-options button.wrong {
    background-color: #ffcdd2;
    border-color: #d32f2f;
    color: #d32f2f;
}

/* Result Message */
.quiz-result {
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
}
