/* ============================================
   BrainBuzz Master Stylesheet
   Generic Components for Landing & Game Pages
   ============================================ */

/* CRITICAL: Info card styles - must load first for educational guide sections */
.info-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--primary-shadow);
}

.info-number {
    background: var(--primary-color);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #212529;
    font-size: 1.1rem;
}

.info-description {
    color: #495057;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.info-examples {
    background: #e8f5e9;
    border-radius: 0.25rem;
    padding: 0.75rem;
    font-size: 0.9rem;
}

.info-examples strong {
    color: #2e7d32;
}

/* CRITICAL: Answer button styles - must load first */
.answer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.answer-btn {
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 1rem;
    padding: 1.75rem 1rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #212529;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
    line-height: 1.5;
}

.answer-btn:hover:not(.disabled) {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 6px 16px var(--primary-shadow);
}

.answer-btn.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.answer-btn.correct {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
    color: white;
    animation: pulse-correct 0.5s ease;
}

.answer-btn.incorrect {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    border-color: #dc3545;
    color: white;
    animation: shake 0.5s ease;
}

@keyframes pulse-correct {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ===== HERO SECTIONS ===== */

/* Hero Section - Landing Pages (Two Column with Image) */
.hero-section {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

/* Page Hero - Settings & Game Pages (Centered, No Image) */
.page-hero {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 3rem;
    font-size: 1rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
}

/* ===== BUTTON STYLES ===== */

.btn-primary-gradient {
    background: var(--primary-color);
    border: none;
    color: var(--btn-text-color, white);
    transition: all 0.3s ease;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
}

.btn-primary-gradient:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-shadow);
    color: var(--btn-text-color, white);
}

.btn-outline-gradient {
    display: block;
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-outline-gradient:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
}

.btn-white {
    background: white;
    color: var(--primary-color);
}

.btn-white:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    color: var(--primary-color);
}

/* ===== FEATURES SECTION ===== */

.features-section {
    padding: 4rem 0;
    background: white;
}

.feature-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 1rem;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--feature-shadow);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 20%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    margin-left: auto;
    margin-right: auto;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
}

.feature-description {
    color: #6c757d;
    line-height: 1.6;
}

/* ===== HOW IT WORKS SECTION ===== */

.how-it-works-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--section-bg-start) 0%, var(--section-bg-end) 100%);
}

.carousel-item {
    padding: 2rem 0;
}

.carousel-step {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.step-description {
    font-size: 1.1rem;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.step-image-container {
    text-align: center;
    background: linear-gradient(135deg, var(--section-bg-start) 0%, var(--section-bg-end) 100%);
    border-radius: 0.75rem;
    padding: 2rem;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-step-image {
    width: 80%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 0.5rem;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--primary-hover);
}

.carousel-control-prev {
    left: -25px;
}

.carousel-control-next {
    right: -25px;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
}

.carousel-indicators {
    margin-bottom: -2rem;
}

/* Step Cards for How It Works (Alternative to Carousel) */
.steps-container {
    margin-top: 2rem;
}

.step-card {
    background: #f8f9fa;
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    height: 100%;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--feature-shadow);
}

.step-card .step-number {
    width: 3rem;
    height: 3rem;
    font-size: 1.2rem;
    margin: 0 auto 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

/* Benefits Section (Additional Info) */
.benefits-section {
    padding: 4rem 0;
    background: white;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.benefit-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-right: 1.5rem;
}

.benefit-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

.benefit-content p {
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.6;
}

/* ===== FAQ SECTION ===== */

.faq-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--section-bg-start) 0%, var(--section-bg-end) 100%);
}

.accordion-item {
    border: 2px solid #e9ecef;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-button {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    background: white;
}

.accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem var(--focus-shadow);
}

.accordion-button::after {
    filter: var(--accordion-icon-filter);
}

.accordion-button:not(.collapsed)::after {
    filter: brightness(0) saturate(100%) invert(100%);
}

/* Related Games Section */
.related-games {
    padding: 3rem 0;
}

.game-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
    height: 100%;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    color: inherit;
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.game-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ===== FINAL CTA HERO ===== */

.final-cta-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 5rem 2rem;
    margin-top: 3rem;
    text-align: center;
}

/* Settings Page Styles */
.main-row {
    padding: 2rem 0;
}

.setup-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.setup-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Game Page - Three Column Layout */
.three-column-layout {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.left-column,
.middle-column,
.right-column {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

/* --- 2. TABLET STYLES (992px and below) --- */
@media (max-width: 992px) {
    /* Keep columns side-by-side, but reduce the visual weight */
    .left-column,
    .middle-column,
    .right-column {
        padding: 1.25rem; 
        /* box-shadow: 0 1px 10px rgba(0,0,0,0.05);*/
        box-shadow: none; 
        border-radius: 1rem;
        box-shadow: 0 1px 10px rgba(0,0,0,0.08);
    }

    .carousel-control-prev {
        left: 5px;
    }

    .carousel-control-next {
        right: 5px;
    }
}

/* --- 3. MOBILE STYLES (600px and below) --- */
@media (max-width: 600px) {
    .left-column,
    .middle-column,
    .right-column {
        flex: none; 
        width: 100%;
        padding: 1rem; 
        /* Optional: Remove shadow completely for a lighter feel */
        box-shadow: none; 
        border-radius: 0rem;
    }
}

/* Left Column - Game Stats */
.stats-card {
    text-align: center;
}

.stat-box {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.stat-value {
    font-size: 1.75rem;
    color: var(--primary-color);
    font-weight: 700;
}

.progress-box {
    background: var(--primary-color);
}

.progress-box .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

.progress-box .stat-value {
    color: white;
    font-size: 2rem;
}

.timer-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
}

.timer-box .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

.timer-box .stat-value {
    color: white;
    font-size: 2.5rem;
}

.stage-indicator {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
    display: none;
}

.stage-indicator.show {
    display: block;
}

.stage-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}

.stage-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-select-activity {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    width: 100%;
    margin-top: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-select-activity:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Middle Column - Game Area */
.question-container {
    text-align: center;
    margin-bottom: 2rem;
}

.question-instruction {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.question-text {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 2rem;
}

/* Submit Button - Game Pages */
.submit-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 1rem 3rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 2rem auto;
    display: block;
    opacity: 0.5;
    cursor: not-allowed;
}

.submit-btn.enabled {
    opacity: 1;
    cursor: pointer;
}

.submit-btn.enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--btn-shadow);
}

/* Feedback Box */
.feedback-box {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
    display: none;
}

.feedback-box.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.feedback-box.correct-feedback {
    background: white;
    border-color: #e9ecef;
}

.feedback-box.incorrect-feedback {
    background: white;
    border-color: #e9ecef;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.feedback-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-align: center;
}

.feedback-box.correct-feedback .feedback-title {
    color: #28a745;
}

.feedback-box.incorrect-feedback .feedback-title {
    color: #dc3545;
}

.feedback-explanation {
    font-size: 1rem;
    color: #495057;
    line-height: 1.6;
    text-align: center;
}

.correct-answer-display {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid #dee2e6;
}

/* Next Button */
.next-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    margin: 1rem auto 0;
    width: 100%;
}

.next-btn.show {
    display: block;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--btn-shadow);
}

/* Right Column - Attempts List */
.attempts-header {
    background: transparent;
    color: #212529;
    padding: 0 0 1rem 0;
    border-bottom: 2px solid #e9ecef;
    text-align: left;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.attempts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.attempt-item {
    background: white;
    border: none;
    border-radius: 0;
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.attempt-item.active {
    background: rgba(40, 167, 69, 0.05);
    border-left: 3px solid #28a745;
    padding-left: 0.75rem;
    border-radius: 0.5rem;
    border-bottom: none;
}

.attempt-number {
    background: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.attempt-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.attempt-details {
    flex-grow: 1;
    font-size: 0.95rem;
    color: #495057;
    overflow: hidden;
    font-weight: 500;
}

.attempt-item.correct {
    border-bottom-color: rgba(40, 167, 69, 0.2);
}

.attempt-item.correct .attempt-icon {
    color: #28a745;
}

.attempt-item.incorrect {
    border-bottom-color: rgba(220, 53, 69, 0.2);
}

.attempt-item.incorrect .attempt-icon {
    color: #dc3545;
}

/* Config Display - Generic classes for settings/configuration display in right column */
.config-header {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.config-item {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

.config-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.config-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Results Screen */
.results-container {
    background: white;
    border-radius: 1rem;
    padding: 3rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
    display: none;
}

.results-container.show {
    display: block;
}

.results-trophy {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.results-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.results-score {
    font-size: 4rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

.results-message {
    font-size: 1.25rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.result-stat {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.result-stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.result-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Question Review */
.question-review {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 3px solid #e9ecef;
    text-align: left;
}

.review-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1.5rem;
    text-align: center;
}

.review-list {
    display: grid;
    gap: 1rem;
}

.review-list-1col {
    grid-template-columns: 1fr;
}

.review-list-2col {
    grid-template-columns: repeat(2, 1fr);
}

.review-list-3col {
    grid-template-columns: repeat(3, 1fr);
}

.review-list-4col {
    grid-template-columns: repeat(4, 1fr);
}

.review-item {
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.review-item.correct-review {
    border-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(32, 201, 151, 0.05) 100%);
}

.review-item.incorrect-review {
    border-color: #dc3545;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05) 0%, rgba(253, 126, 20, 0.05) 100%);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.review-number {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.review-status {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.review-question-text {
    flex-grow: 1;
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

.review-details {
    padding-left: 3.5rem;
    font-size: 1rem;
    color: #495057;
    line-height: 1.6;
}

.review-answer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.review-label {
    font-weight: 600;
    color: #495057;
}

.review-value {
    font-weight: 700;
    font-size: 1.05rem;
}

.correct-answer {
    color: #28a745;
}

.incorrect-answer {
    color: #dc3545;
}

.review-explanation {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.review-your-answer {
    margin-bottom: 0.5rem;
}

.review-correct-answer {
    color: #28a745;
    font-weight: 600;
}

/* Settings Page Additional Styles */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-description {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Selection Pills - Generic */
.mode-pills,
.difficulty-pills,
.count-pills,
.scaffolding-pills {
    display: grid;
    gap: 1rem;
}

.mode-pills {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.difficulty-pills {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.count-pills {
    grid-template-columns: repeat(auto-fit, minmax(40px, 0.5fr));
}

.scaffolding-pills {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.mode-pill,
.difficulty-pill,
.count-pill,
.scaffolding-pill {
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 1rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.mode-pill:hover,
.difficulty-pill:hover,
.count-pill:hover,
.scaffolding-pill:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px var(--mode-shadow);
    transform: translateY(-3px);
}

.mode-pill.selected,
.difficulty-pill.selected,
.count-pill.selected,
.scaffolding-pill.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    box-shadow: 0 8px 20px var(--mode-shadow);
}

/* Game Features Grid - Small Feature Cards */
.game-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.game-feature-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ===== PROGRESS STEPPER (GAME PAGES) ===== */

.progress-stepper {
    max-width: 600px;
    margin: 2rem auto 3rem;
    padding: 0 1rem;
}

.stepper-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.stepper-line {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e9ecef;
    z-index: 0;
}

.stepper-line-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #17a2b8 100%);
    transition: width 0.5s ease;
    width: 0%;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 1;
    flex: 1;
}

.step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    color: #adb5bd;
}

.step.active .step-circle {
    background: linear-gradient(135deg, var(--primary-color) 0%, #17a2b8 100%);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px var(--primary-shadow);
}

.step.completed .step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step-label {
    font-weight: 600;
    color: #adb5bd;
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.3s ease;
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 700;
}

.step.completed .step-label {
    color: var(--primary-color);
}

/* ===== MAIN CONTENT AREA (GAME PAGES) ===== */

.quiz-content {
    margin: 0 auto;
    padding: 0 0.5rem 2rem;
}

.content-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

/* Container Flash Effects */
.content-card.flash-correct {
    animation: flashGreen 0.8s ease;
}

.content-card.flash-incorrect {
    animation: flashRed 0.8s ease;
}

@keyframes flashGreen {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        background: white;
    }
    50% { 
        box-shadow: 0 0 30px rgba(40, 167, 69, 0.6), 0 4px 20px rgba(40, 167, 69, 0.4);
        background: rgba(40, 167, 69, 0.08);
    }
}

@keyframes flashRed {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        background: white;
    }
    50% { 
        box-shadow: 0 0 30px rgba(220, 53, 69, 0.6), 0 4px 20px rgba(220, 53, 69, 0.4);
        background: rgba(220, 53, 69, 0.08);
    }
}

/* ===== SETTINGS VIEW ===== */

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-description {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.quick-select-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    justify-content: center;
}

.btn-quick {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-quick:hover {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    transform: translateY(-2px);
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.table-pill {
    aspect-ratio: 1;
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.table-pill:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--feature-shadow);
}

.table-pill.selected {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-shadow);
}

.table-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.table-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.summary-box {
    background: linear-gradient(135deg, var(--summary-bg-start) 0%, var(--summary-bg-end) 100%);
    border: 2px solid rgba(40, 167, 69, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.summary-label {
    font-weight: 600;
    color: #495057;
}

.summary-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.btn-start-quiz {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--btn-shadow) 100%);
    color: white;
    border: none;
    border-radius: 3rem;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--btn-shadow);
}

.btn-start-quiz:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--btn-shadow);
}

.btn-start-quiz:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error-message {
    color: #dc3545;
    text-align: center;
    margin-top: 1rem;
    font-weight: 600;
    display: none;
}

/* ===== GAME VIEW ===== */

.game-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--section-bg-start) 0%, var(--section-bg-end) 100%);
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    text-align: center;
    border: 2px solid rgba(40, 167, 69, 0.1);
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, #17a2b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-area {
    text-align: center;
    padding: 2rem 0;
}

.question-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.question-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.feedback-icon {
    font-size: 2.5rem;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.feedback-icon.show {
    opacity: 1;
    transform: scale(1);
}

.feedback-icon.correct {
    color: #28a745;
}

.feedback-icon.incorrect {
    color: #dc3545;
}

.answer-box {
    max-width: 300px;
    margin: 0 auto 1.5rem;
}

.answer-input {
    width: 100%;
    padding: 1.25rem;
    font-size: 2rem;
    text-align: center;
    border: 3px solid #e9ecef;
    border-radius: 1rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.answer-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--focus-shadow);
}

.answer-input.correct-flash {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
    animation: correctPulse 0.5s ease;
}

.answer-input.incorrect-flash {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    animation: shake 0.5s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.btn-submit {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #17a2b8 100%);
    color: white;
    border: none;
    border-radius: 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--btn-shadow);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--btn-shadow);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.instructions-box {
    text-align: center;
    padding: 1rem;
}

.instructions-box h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.instructions-box p {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.btn-play {
    padding: 1.25rem 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #17a2b8 100%);
    color: white;
    border: none;
    border-radius: 3rem;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--btn-shadow);
}

.btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--btn-shadow);
}

/* ===== RESULTS VIEW ===== */

.results-trophy {
    font-size: 5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.results-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.results-accuracy {
    text-align: center;
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.results-message {
    text-align: center;
    font-size: 1.25rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Default: 3 columns */
    gap: 1.5rem;
    margin: 2rem 0;
}

/* When there are exactly 4 items, show 4 columns */
.results-grid:has(.result-stat:nth-child(4):last-child) {
    grid-template-columns: repeat(4, 1fr);
}

/* When there are exactly 2 items, show 2 columns */
.results-grid:has(.result-stat:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
}

/* Responsive: 2 columns on mobile/tablet */
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.result-stat {
    background: linear-gradient(135deg, var(--section-bg-start) 0%, var(--section-bg-end) 100%);
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    text-align: center;
    border: 2px solid var(--primary-color);
    opacity: 0.3;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.result-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-primary {
    flex: 1;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--btn-shadow);
}

.btn-secondary {
    flex: 1;
    padding: 1rem;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    transform: translateY(-2px);
}

.review-section {
    margin-top: 2rem;
}

.review-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.review-list {
    display: grid;
    /* grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));*/
    gap: 1rem;
}

.review-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 1rem;
    padding: 1rem;
}

.review-item.correct-review {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.review-item.incorrect-review {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.05);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.review-number {
    width: 30px;
    height: 30px;
    background: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.review-question {
    flex: 1;
    font-weight: 600;
    color: #2c3e50;
}

.review-details {
    font-size: 0.95rem;
}

.review-your-answer {
    margin-bottom: 0.5rem;
}

.review-correct-answer {
    color: #28a745;
    font-weight: 600;
}

/* ===== UTILITY CLASSES ===== */

.view {
    display: none;
}

.view.active {
    display: block;
}

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 1rem;
}

/* ===== RESPONSIVE - TABLET ===== */

@media (max-width: 768px) {
    .content-card {
        padding: 1.5rem;
    }

    .stepper-container {
        padding: 0;
    }

    .step-circle {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .step-label {
        font-size: 0.8rem;
    }

    .tables-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 0.75rem;
    }

    .table-number {
        font-size: 1.5rem;
    }

    .quick-select-buttons {
        gap: 0.5rem;
    }

    .btn-quick {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .game-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .review-list {
        grid-template-columns: 1fr;
    }

    .question-display {
        font-size: 2rem;
    }

    .question-container {
        gap: 0.75rem;
    }

    .feedback-icon {
        font-size: 2rem;
    }

    .results-accuracy {
        font-size: 3rem;
    }

    .carousel-step-image {
        max-height: 300px;
    }

    .step-image-container {
        min-height: 200px;
        padding: 1.5rem;
    }

    .carousel-control-prev {
        left: 0;
    }

    .carousel-control-next {
        right: 0;
    }
}

/* ===== RESPONSIVE - MOBILE ===== */

@media (max-width: 480px) {
    .step-circle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .tables-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .question-display {
        font-size: 1.75rem;
    }

    .feedback-icon {
        font-size: 1.75rem;
    }

    .carousel-control-prev {
        left: 0;
    }

    .carousel-control-next {
        right: 0;
    }

    .carousel-step-image {
        max-height: 200px;
    }

    .step-image-container {
        min-height: 180px;
        padding: 1rem;
    }
}

/* ============================================
   GAME INFORMATION PAGE STYLES
   Add these to brainbuzz.css
   ============================================ */

/* Info Boxes - Feature highlights in info view */
.info-box {
    background: linear-gradient(135deg, var(--section-bg-start), var(--section-bg-end));
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--feature-shadow);
}

.info-box h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
}

.info-box p {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.6;
}

/* How To Play Steps */
.how-to-play {
    margin-top: 2rem;
}

.play-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--section-bg-start), var(--section-bg-end));
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.play-step:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px var(--feature-shadow);
}

.play-step-number {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 1.5rem;
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.play-step-content {
    flex: 1;
}

.play-step-content h5 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.75rem;
}

.play-step-content p {
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Benefit Cards - Why practice section */
.benefit-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--feature-shadow);
}

.benefit-card .benefit-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.benefit-card h5 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
}

.benefit-card p {
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.6;
}