#bulk-quiz-form {
    max-width: 700px;
    margin: 40px auto;
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
}
#bulk-quiz-form select,
#bulk-quiz-form textarea,
#bulk-quiz-form button {
    width: 100%;
    margin-bottom: 20px;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
#bulk-quiz-form select:focus,
#bulk-quiz-form textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}
#bulk-quiz-form button {
    background: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
}
#bulk-quiz-form button:hover {
    background: #005f8a;
}
#quiz-response {
    margin-top: 15px;
    font-weight: bold;
    color: #0073aa;
}
:root {
    --quiz-primary-grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --quiz-bg: #ffffff;
    --quiz-text: #2d3748;
    --quiz-radius: 16px;
    --timer-danger: #e53e3e;
    /* Status Colors */
    --color-success: #48bb78;
    --color-success-grad: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    --color-error: #f56565;
    --color-error-grad: linear-gradient(135deg, #f56565 0%, #c53030 100%);
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--quiz-bg);
    padding: 40px;
    border-radius: var(--quiz-radius);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.quiz-container h2 {
    background: var(--quiz-primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 800;
    text-align: center;
}

.quiz-step { display: none; }
.quiz-step.active {
    display: block;
    animation: fadeSlideUp 0.5s ease forwards;
}
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-grid { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }

.quiz-btn {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 50px;
    background: #edf2f7;
    color: #4a5568;
    transition: all 0.2s ease;
    display: flex; align-items: center; gap: 8px;
}
.quiz-btn:hover {
    background: var(--quiz-primary-grad);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.quiz-btn.mode-btn { width: 45%; justify-content: center; min-width: 200px; }

/* Timer Styles */
.timer-wrapper {
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    font-weight: bold;
    color: #718096;
    background: #f7fafc;
    padding: 10px;
    border-radius: 12px;
}
.timer-display {
    color: var(--quiz-text);
    font-size: 20px;
    font-variant-numeric: tabular-nums;
    margin-left: 10px;
}
.timer-display.danger {
    color: var(--timer-danger);
    animation: pulse 0.5s infinite;
}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

#global-progress-wrapper { display: none; width: 100%; margin-bottom: 25px; }
.progress-bar { width: 100%; background: #e2e8f0; height: 10px; border-radius: 10px; overflow: hidden; }
.progress-bar-inner { height: 100%; background: var(--quiz-primary-grad); width: 0%; transition: width 0.4s ease; border-radius: 10px; }

.quiz-card h4 { margin-bottom: 20px; font-size: 22px; color: var(--quiz-text); line-height: 1.4; font-weight: 700; }
.quiz-card .answers { display: flex; flex-direction: column; gap: 12px; }

.quiz-card .answers label {
    display: flex; align-items: center; padding: 16px 20px;
    border-radius: 12px; border: 2px solid #e2e8f0;
    cursor: pointer; background: #fff; transition: all 0.2s ease;
    font-size: 16px; color: #4a5568;
    position: relative;
}
.quiz-card .answers input[type="radio"] { position: absolute; opacity: 0; }

/* Standard Hover */
.quiz-card .answers label:not(.correct-selection):not(.wrong-selection):hover {
    border-color: #667eea; background: #f7fafc;
}

/* --- CORRECT ANSWER STYLE (Green) --- */
.quiz-card .answers label.correct-selection {
    background: var(--color-success-grad);
    border-color: transparent;
    color: white;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}
/* Add checkmark */
.quiz-card .answers label.correct-selection::after {
    content: '✔'; position: absolute; right: 20px; font-weight: bold; font-size: 18px;
}

/* --- WRONG ANSWER STYLE (Red) --- */
.quiz-card .answers label.wrong-selection {
    background: var(--color-error-grad);
    border-color: transparent;
    color: white;
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}
.quiz-card .answers label.wrong-selection::after {
    content: '✖'; position: absolute; right: 20px; font-weight: bold; font-size: 18px;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Disable clicks after selection */
.quiz-card .answers.locked { pointer-events: none; }

/* Results */
.result-item { background: #f8f9fa; border-radius: 8px; padding: 15px; margin-bottom: 12px; border-left: 5px solid #ccc; }
.result-item.correct { border-left-color: var(--color-success); background: #f0fff4; }
.result-item.wrong { border-left-color: var(--color-error); background: #fff5f5; }
.result-item.timeout { border-left-color: #ed8936; background: #fffaf0; }

#retake-quiz {
    display: block; margin: 30px auto 0; padding: 14px 35px;
    background: var(--quiz-primary-grad); color: white; border: none;
    border-radius: 50px; cursor: pointer; font-size: 16px; font-weight: bold;
}

@media screen and (max-width: 768px) {
    .quiz-container { margin: 20px auto; padding: 25px 20px; width: 95%; }
    .quiz-btn.mode-btn { width: 100%; }
    .quiz-container h2 {
      font-size: 22px;
    }

}






















:root {
    --h-primary: #4e54c8;
    --h-secondary: #8f94fb;
    --h-bg: #f8f9fa;
    --h-text: #333;
    --h-danger: #ff6b6b;
}

/* Main Container */
.history-container {
    max-width: 800px;
    margin: 40px auto;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.history-header {
    text-align: center;
    margin-bottom: 30px;
}
.history-header h3 {
    font-size: 28px;
    background: linear-gradient(to right, var(--h-primary), var(--h-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    margin: 0;
}

/* Accordion Item */
.history-group {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
    overflow: hidden;
    transition: transform 0.2s;
}

/* Header of the Accordion */
.group-header {
    padding: 20px 25px;
    background: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}
.group-header:hover {
    background: #fafafa;
}
.history-group.open .group-header {
    border-bottom: 1px solid #eee;
    background: #fdfdfd;
}

.group-title {
    display: flex;
    align-items: center;
    gap: 15px;
}
.cat-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--h-primary), var(--h-secondary));
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 18px;
}
.cat-info h4 { margin: 0; font-size: 18px; color: #2d3748; }
.cat-info span { font-size: 13px; color: #a0aec0; }

.toggle-icon {
    font-size: 20px; color: #ccc; transition: transform 0.3s;
}
.history-group.open .toggle-icon { transform: rotate(180deg); color: var(--h-primary); }

/* The Scrollable List Content */
.group-content {
    display: none; /* Hidden by default */
    background: #f8f9fa;
}

/* Scrollable Area Limiter */
.quiz-list-scroll {
    max-height: 400px; /* Limits height if user took 100 quizzes */
    overflow-y: auto;
    padding: 20px;
}

/* Custom Scrollbar styling */
.quiz-list-scroll::-webkit-scrollbar { width: 6px; }
.quiz-list-scroll::-webkit-scrollbar-track { background: #f1f1f1; }
.quiz-list-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
.quiz-list-scroll::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* Individual Quiz Items */
.history-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--h-secondary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.history-item:last-child { margin-bottom: 0; }

.q-text { font-weight: 600; font-size: 15px; color: #4a5568; line-height: 1.4; }

.a-wrapper {
    display: flex;
    align-items: center;
    font-size: 14px;
    background: #edf2f7;
    padding: 8px 12px;
    border-radius: 6px;
    width: fit-content;
}
.a-label { margin-right: 8px; font-weight: 600; color: #718096; }
.a-text { color: #2d3748; }

/* Footer Action (Delete) */
.group-footer {
    padding: 15px 25px;
    background: #fff;
    border-top: 1px solid #eee;
    text-align: right;
}

.btn-clear {
    background: transparent;
    color: var(--h-danger);
    border: 1px solid var(--h-danger);
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex; align-items: center; gap: 5px;
}
.btn-clear:hover { background: var(--h-danger); color: #fff; }

/* Empty/Alert States */
.quiz-alert-login { text-align: center; color: var(--h-danger); background: #fff5f5; padding: 20px; border-radius: 8px; border: 1px solid #feb2b2; }
.quiz-empty-state { text-align: center; padding: 50px; color: #a0aec0; }
.empty-icon { font-size: 40px; margin-bottom: 15px; opacity: 0.5; }

/* Mobile Responsive */
@media(max-width: 600px) {
    .group-header { padding: 15px; }
    .cat-icon { width: 35px; height: 35px; font-size: 14px; }
    .cat-info h4 { font-size: 16px; }
    .q-text { font-size: 14px; }
}
/* FULLSCREEN & LAYOUT STYLING */
.quiz-container:fullscreen {
    width: 100vw; height: 100vh;
    padding: 40px; background: #f8fafc;
    overflow-y: auto; display: flex; flex-direction: column;
    justify-content: center; align-items: center; z-index: 999999;
}

.quiz-container.is-fullscreen-manual {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 99999; background: #f8fafc;
    padding: 20px; overflow-y: auto;
    display: flex; flex-direction: column;
}

.quiz-top-bar {
   width: 100%; max-width: 800px;
    margin: 0 auto 20px auto;
}

/* BUTTON STYLING */
.fullscreen-controls {
    position: absolute;
    top: 0;
    right: 0;
}
.fs-btn {
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.re-enter-fullscreen {
    background: #4f46e5; color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}
.re-enter-fullscreen:hover { background: #4338ca; transform: translateY(-1px); }

.exit-quiz-view {
    background: #ef4444; color: white;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2);
}
.exit-quiz-view:hover { background: #dc2626; transform: translateY(-1px); }

/* Hiding Logic Classes */
.hide-page-title h1, .hide-page-title .entry-title, .hide-page-title .page-title {
    display: none !important;
}
/* Category Selection Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.cat-select-btn {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    padding: 15px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #4a5568;
}

.cat-select-btn:hover {
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

/* The "Selected" State */
.cat-select-btn.selected {
    background: #48bb78 !important; /* Green */
    color: white !important;
    border-color: #38a169 !important;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

/* Results Styling */
.quiz-results-header {
    text-align: center;
    padding: 20px;
    background: #edf2f7;
    border-radius: 15px;
    margin-bottom: 20px;
}

.result-score-big {
    font-size: 3rem;
    font-weight: 800;
    color: #2d3748;
    display: block;
}
