/* Random quiz generator styles - matched with quiz frontend design */
:root {
    /* Using the same color variables as quiz-frontend.css */
    --quiz-primary-color: #032e7d;
    --quiz-primary-light: #1a44a0;
    --quiz-primary-dark: #021d4d;
    --quiz-accent-color: #ff5c8d;
    
    --quiz-text-primary: #252525;
    --quiz-text-secondary: #505050;
    
    --quiz-bg-light: #f9f9f9;
    --quiz-bg-white: #ffffff;
    
    --quiz-success-color: #4caf50;
    --quiz-warning-color: #ff9800;
    --quiz-error-color: #e53935;
    --quiz-review-color: #ffb300;
    
    --quiz-border-radius: 8px;
    --quiz-card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --quiz-transition-speed: 0.3s;
    --quiz-font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* Full-width layout */
.future-quiz-random-generator-wrapper {
    width: 100%;
    margin: 0;
    font-family: var(--quiz-font-family);
    color: var(--quiz-text-primary);
    background-color: var(--quiz-bg-light); /* Changed to light background */
    font-size: 1.2rem; /* Increased from 1.05rem */
    line-height: 1.6;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 0;
}

.future-quiz-random-generator-wrapper h2 {
    color: var(--quiz-primary-dark);
    font-size: 2.5rem; /* Increased from 2.2rem */
    font-weight: 700;
    margin-bottom: 2rem;
    margin-top: 1rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-align: center;
}

.loading-indicator {
    text-align: center;
    padding: 50px;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--quiz-primary-color);
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.generator-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* Improved alignment for filters: question types, difficulty, and categories */
.filters-grid {
    display: grid;
    grid-template-columns: 0.8fr 2fr 1fr; /* Changed to 3 columns with question types narrower */
    gap: 24px;
    margin-bottom: 24px;
}

.filters-grid .form-section {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.filters-grid .form-section h3 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 1.4em; /* Increased from 1.2em */
    color: var(--quiz-primary-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 12px;
    font-weight: 600;
}

.filters-grid .form-section h3.count-header {
    margin-top: 20px;
}

/* Question types column */
.question-type-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px; /* Reduced from 10px */
    height: 100%;
    overflow-y: auto;
    max-height: 435px;
    padding-right: 5px; /* Reduced from 10px */
}

.question-type-options label {
    padding: 8px 12px; /* Reduced padding */
}

/* Settings column styling */
.settings-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Quiz settings in a single column */
.quiz-settings {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-section {
    width: 100%;
}

/* Form actions section */
.form-actions {
    margin-top: auto;
    padding: 15px 0 10px;
}

/* Responsive adjustments for the new layout */
@media (max-width: 1200px) {
    .filters-grid {
        grid-template-columns: 1fr 2fr 1fr;
    }
}

@media (max-width: 992px) {
    .filters-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .settings-column {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-column {
        grid-column: 1;
    }
}

/* Difficulty options */
.difficulty-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

/* Category options - adjust height to match other columns */
.category-options {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-options .categories-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 16px;
    flex: 1;
    overflow-y: auto;
    max-height: 370px;
    padding: 15px;
    background-color: var(--quiz-bg-white);
    border-radius: var(--quiz-border-radius);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

/* Category Tree View Styles - More compact with reduced padding */
.categories-tree-container {
    margin-top: 10px; /* Reduced from 15px */
}

.categories-tree {
    max-height: 600px; /* Increased from 500px */
    overflow-y: auto;
    padding: 0; /* Removed padding */
    background-color: transparent; /* Changed from white to transparent */
    border-radius: 0; /* Removed border radius */
    border: none; /* Removed border */
    box-shadow: none; /* Removed box shadow */
    margin-top: 10px; /* Reduced from 15px */
}

.tree-category {
    margin-bottom: 4px; /* Reduced from 8px */
}

.tree-category-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 5px; /* Reduced from 12px 10px */
    border-radius: 6px; /* Reduced from 8px */
    transition: background-color 0.2s;
}

.tree-category-header:hover {
    background-color: rgba(3, 46, 125, 0.08); /* Slightly darker background on hover */
    transform: translateX(2px); /* Reduced from 3px */
}

.expand-icon {
    width: 18px; /* Reduced from 24px */
    color: var(--quiz-primary-color);
    font-size: 1.5rem; /* Reduced from 1rem */
    text-align: center;
    flex-shrink: 0; /* Prevent shrinking */
}

.spacer {
    width: 18px; /* Reduced from 24px */
    flex-shrink: 0; /* Prevent shrinking */
}

.tree-category-label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    flex: 1;
    font-size: 1.15rem; /* Increased from 1.05rem */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tree-category-label span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tree-category-label input[type="checkbox"] {
    margin-right: 8px; /* Reduced from 12px */
    flex-shrink: 0; /* Prevent shrinking */
}

.tree-category-children {
    margin-left: 18px; /* Reduced from 24px */
    border-left: 1px dashed rgba(3, 46, 125, 0.15); /* Lighter border */
    padding-left: 8px; /* Reduced from 15px */
    margin-top: 2px; /* Reduced from 5px */
}

.tree-category.expanded > .tree-category-header {
    font-weight: 500;
}

/* Top-level categories - More compact */
.categories-tree > .tree-category > .tree-category-header {
    font-weight: 600;
    color: var(--quiz-primary-color);
    background-color: rgba(3, 46, 125, 0.05);
    border-radius: 6px; /* Reduced from 8px */
    padding: 8px 8px; /* Reduced from 14px 12px */
    margin-bottom: 3px; /* Reduced from 5px */
}

.categories-tree > .tree-category > .tree-category-header:hover {
    background-color: rgba(3, 46, 125, 0.1);
}

/* Second-level categories */
.categories-tree > .tree-category > .tree-category-children > .tree-category > .tree-category-header {
    font-weight: 500;
    color: var(--quiz-text-primary);
    padding: 6px 6px; /* Reduced from 12px 10px */
}

/* Leaf categories */
.tree-category:not(.expanded) .tree-category-header {
    color: var(--quiz-text-secondary);
}

/* Question count options - better alignment */
.question-count-options {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px;
}

/* Large subject buttons with icons */
.form-section {
    padding: 25px;
    background-color: var(--quiz-bg-white);
    border-radius: var(--quiz-border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all var(--quiz-transition-speed);
}

.form-section:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 1.5em; /* Increased from 1.3em */
    color: var(--quiz-primary-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 12px;
    font-weight: 600;
}

/* Subject selection buttons with icons - ENHANCED */
.subject-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.subject-options label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px; /* Increased from 180px to 200px */
    height: 200px; /* Increased from 180px to 200px */
    background-color: var(--quiz-bg-white);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.subject-options label:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--quiz-primary-light);
}

.subject-options input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

/* Subject icon styling - LARGER ICONS */
.subject-icon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 30px; /* Changed from 5rem to 30px */
    color: var(--quiz-primary-color); /* Changed from text-secondary to primary color */
    transition: all 0.3s ease;
    background-color: rgba(3, 46, 125, 0.08); /* Slightly darker background */
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(3, 46, 125, 0.1); /* Added subtle shadow */
    border: 2px solid rgba(3, 46, 125, 0.1); /* Added subtle border */
    overflow: hidden;
}

/* Subject icon styling - ADJUSTED FOR IMAGES */
.subject-icon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background-color: rgba(3, 46, 125, 0.08);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(3, 46, 125, 0.1);
    border: 2px solid rgba(3, 46, 125, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.subject-icon-img {
    width: 75%;
    height: 75%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.subject-label {
    font-size: 1.25rem; /* Increased from 1.1rem */
    font-weight: 600; /* Increased from 500 to 600 */
    text-align: center;
    transition: all 0.3s ease;
    color: var(--quiz-text-secondary);
}

/* Selection indicator - COMPLETELY REDESIGNED */
.subject-options input[type="radio"]:checked + .subject-icon-wrapper {
    color: var(--quiz-primary-color);
    background-color: rgba(3, 46, 125, 0.1);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(3, 46, 125, 0.2);
}

.subject-options input[type="radio"]:checked + .subject-icon-wrapper img {
    transform: scale(1.1);
}

.subject-options input[type="radio"]:checked + .subject-icon-wrapper + .subject-label {
    color: var(--quiz-primary-color);
    font-weight: 700;
}

/* Remove the old diamond shape */
.subject-options input[type="radio"]:checked + .subject-icon-wrapper::after,
.subject-options input[type="radio"]:checked + .subject-icon-wrapper::before {
    content: none;
}

/* Remove the blue corner indicator and enhance selection styles */
.subject-options label.selected {
    border-color: var(--quiz-primary-color);
    border-width: 3px; /* Increased from 2px to make selection more visible */
    background-color: rgba(3, 46, 125, 0.05); /* Slightly increased opacity for better visibility */
    position: relative;
    /* Keep the pulse animation */
}

/* Remove the blue triangle corner */
.subject-options label.selected::after {
    content: none; /* Remove the triangle */
}

/* Remove the checkmark that was cut off */
.subject-options label.selected::before {
    content: none; /* This removes the checkmark */
}

/* Pulse animation for selection */
@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(3, 46, 125, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(3, 46, 125, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(3, 46, 125, 0);
    }
}

.subject-options label.selected {
    animation: pulse-border 2s infinite;
}

/* Other options aligned in columns */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.options-grid .form-section {
    height: 100%;
}

/* Question types column */
.question-type-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.question-type-options label,
.difficulty-options label,
.category-options label {
    display: flex;
    align-items: center;
    gap: 12px; /* Increased from 10px */
    font-size: 1.2em; /* Increased from 1.1em */
    cursor: pointer;
    padding: 12px 15px; /* Increased padding for better touch targets */
    border-radius: 8px; /* Increased from 6px */
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.question-type-options label:hover,
.difficulty-options label:hover,
.category-options label:hover {
    background-color: rgba(3, 46, 125, 0.08); /* Darker on hover */
    transform: translateX(3px); /* Slight movement on hover */
}

.question-type-options input[type="checkbox"],
.category-options input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 24px; /* Increased from 20px */
    height: 24px; /* Increased from 20px */
    border: 2px solid var(--quiz-primary-light);
    border-radius: 6px; /* Increased from 4px */
    outline: none;
    margin: 0;
    position: relative;
    cursor: pointer;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.question-type-options input[type="checkbox"]:hover,
.category-options input[type="checkbox"]:hover {
    border-color: var(--quiz-primary-color);
    transform: scale(1.08);
    box-shadow: 0 3px 8px rgba(3, 46, 125, 0.2);
}

.question-type-options input[type="checkbox"]:checked,
.category-options input[type="checkbox"]:checked {
    background-color: var(--quiz-primary-color);
    border-color: var(--quiz-primary-color);
    box-shadow: 0 0 0 2px rgba(3, 46, 125, 0.1);
}

.question-type-options input[type="checkbox"]:checked::after,
.category-options input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 6px;
    height: 12px;
    border-right: 3px solid white;
    border-bottom: 3px solid white;
    animation: checkmarkAppear 0.2s ease-out;
}

@keyframes checkmarkAppear {
    0% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0.5); }
    50% { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1.2); }
    100% { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
}

/* Active state for checkbox label */
.question-type-options input[type="checkbox"]:checked + span,
.category-options input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--quiz-primary-color);
}

/* Special styling for "Todas" options */
.question-type-options label:first-child input[type="checkbox"],
.category-options > label input[type="checkbox"] {
    background-color: rgba(3, 46, 125, 0.03);
    border-color: var(--quiz-primary-color);
}

/* Fix for "Todas" checkbox when checked */
.question-type-options label:first-child input[type="checkbox"]:checked,
.category-options > label input[type="checkbox"]:checked {
    background-color: var(--quiz-primary-color); /* Make sure the checked state has the right background */
    border-color: var(--quiz-primary-color);
    box-shadow: 0 0 0 2px rgba(3, 46, 125, 0.1);
}

.question-type-options label:first-child,
.category-options > label {
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 15px;
    font-weight: 600;
}

/* Difficulty options */
.difficulty-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

/* === RADIO BUTTONS (Difficulty) - IMPROVED CIRCULAR DESIGN === */
.difficulty-options input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--quiz-primary-light);
    border-radius: 50%;
    outline: none;
    margin: 0;
    position: relative;
    cursor: pointer;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    padding: 0; /* Remove any padding */
    flex-shrink: 0; /* Prevent shrinking */
}

.difficulty-options input[type="radio"]:hover {
    border-color: var(--quiz-primary-color);
    transform: scale(1.08);
    box-shadow: 0 3px 8px rgba(3, 46, 125, 0.2);
}

.difficulty-options input[type="radio"]:checked {
    background-color: white;
    border: 2.5px solid var(--quiz-primary-color);
    box-shadow: 0 0 0 2px rgba(3, 46, 125, 0.1);
}

.difficulty-options input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%; /* Ensure this is 50% for a perfect circle */
    background-color: var(--quiz-primary-color);
    animation: radioPulse 0.3s ease;
}

@keyframes radioPulse {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Also update subject radio buttons for consistency */
.subject-options input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

.difficulty-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.difficulty-options label:hover {
    background-color: rgba(3, 46, 125, 0.05);
}

.difficulty-options input[type="radio"]:checked {
    background-color: white;
    border: 2px solid var(--quiz-primary-color);
    box-shadow: 0 0 0 2px rgba(3, 46, 125, 0.1);
}

.difficulty-options input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px; /* Increased from 8px */
    height: 12px; /* Increased from 8px */
    border-radius: 50%;
    background-color: var(--quiz-primary-color);
    animation: radioPulse 0.3s ease;
}

@keyframes radioPulse {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Active state for radio button label */
.difficulty-options input[type="radio"]:checked + span {
    font-weight: 600;
    color: var(--quiz-primary-color);
}

/* Category options */
.category-options .categories-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background-color: var(--quiz-bg-white);
    border-radius: var(--quiz-border-radius);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.category-item {
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.category-item:hover {
    background-color: rgba(3, 46, 125, 0.05);
}

/* Question count options */
.bottom-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    align-items: start;
}

/* Question count options - vertical layout */
.question-count-options {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 0;
}

.question-count-label {
    font-size: 1.2rem; /* Increased from 1.1rem */
    font-weight: 500;
    color: var(--quiz-primary-dark);
    margin-bottom: 5px;
}

.question-count-options input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--quiz-border-radius);
    text-align: center;
    font-size: 1.2em!important; /* Increased from 1.3em */
    font-weight: 600;
    color: var(--quiz-primary-dark);
    background-color: var(--quiz-bg-white);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
    transition: all 0.2s;
}

.time-options {
    margin-top: 15px;
    position: relative;
}

.time-unit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(5px);
    font-size: 1.1rem; /* Increased from 1rem */
    color: var(--quiz-text-secondary);
}

/* Create quiz button */
.form-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 0 10px;
}

.create-quiz-button {
    background-color: var(--quiz-primary-color);
    color: white;
    padding: 18px 40px;
    font-size: 1.4rem; /* Increased from 1.3rem */
    font-weight: 600;
    border-radius: var(--quiz-border-radius);
    box-shadow: 0 4px 12px rgba(3, 46, 125, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 300px;
    letter-spacing: 0.02em;
}

.create-quiz-button:hover {
    background-color: var(--quiz-primary-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(3, 46, 125, 0.4);
}

.create-quiz-button:disabled {
    background-color: #a7aaad;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.error-message {
    color: var(--quiz-error-color);
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
    font-size: 1.1rem; /* Added font size */
    padding: 10px 15px;
    background-color: rgba(229, 57, 53, 0.1);
    border-radius: var(--quiz-border-radius);
    border-left: 3px solid var(--quiz-error-color);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .bottom-controls {
        grid-template-columns: 1fr;
    }
    
    .category-options .categories-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-options .categories-list {
        max-height: 300px;
    }
}

@media (max-width: 992px) {
    .quiz-settings {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .future-quiz-random-generator-wrapper h2 {
        font-size: 1.8rem; /* Increased from 1.6rem */
    }
    
    .subject-options {
        gap: 10px;
    }
    
    .subject-options label {
        width: 160px; /* Adjusted from 140px to 160px */
        height: 160px; /* Adjusted from 140px to 160px */
        padding: 15px;
    }
    
    .subject-icon-wrapper {
        width: 100px; /* Increased from 80px to 100px */
        height: 100px; /* Increased from 80px to 100px */
        font-size: 4rem; /* Increased from 3rem to 4rem */
    }
    
    .subject-label {
        font-size: 1.1rem; /* Increased from 1rem */
    }
    
    .form-section {
        padding: 20px;
    }
    
    .form-section h3 {
        font-size: 1.3em; /* Increased from 1.2em */
    }
    
    .category-options .categories-list {
        grid-template-columns: 1fr;
    }
    
    .create-quiz-button {
        width: 100%;
        min-width: auto;
        padding: 15px 20px;
        font-size: 1.2rem; /* Increased from 1.1rem */
    }

    .filters-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }

    .subject-icon-wrapper {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .future-quiz-random-generator-wrapper h2 {
        font-size: 1.6rem; /* Increased from 1.4rem */
    }
    
    .subject-options {
        flex-direction: row; /* Keep as row */
        align-items: center;
        justify-content: space-around; /* Changed to space-around for even distribution */
        flex-wrap: nowrap; /* Prevent wrapping to ensure single line */
        width: 100%; /* Full width container */
    }
    
    .subject-options label {
        width: 80px; /* Reduced width to fit three in a row */
        height: 80px; /* Keep square aspect ratio */
        max-width: none;
        padding: 5px; /* Reduced padding */
        flex-direction: column;
        margin: 0; /* Remove margins to maximize space */
    }
    
    .subject-icon-wrapper {
        width: 60px; /* Smaller size to fit */
        height: 60px;
        margin: 0 auto; /* Center the icon */
        margin-bottom: 5px;
        margin-right: 0;
    }
    
    .subject-label {
        display: none; /* Keep labels hidden */
    }
    
    .form-section {
        padding: 15px;
    }
}
/* Make category section larger */
.category-section {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* New quiz settings and actions layout */
.quiz-settings-and-actions {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 0 10px;
}

.quiz-settings {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.settings-section {
    flex: 1;
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
    color: var(--quiz-primary-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 10px;
    font-weight: 600;
}
