/* Combined CSS for CurdsPro Quiz pages - Educational Theme */

/* Subtle Animations */
@keyframes gentle-float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

@keyframes subtle-shadow {
    0% { box-shadow: 0 0 5px rgba(65, 105, 225, 0.3); }
    50% { box-shadow: 0 0 10px rgba(65, 105, 225, 0.4); }
    100% { box-shadow: 0 0 5px rgba(65, 105, 225, 0.3); }
}

@keyframes gentle-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Base Styles */
body {
    font-family: 'Open Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #0f1220;
    color: #e5e7eb;
    margin: 0;
    padding: 2rem;
    background-image: none;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e5eb;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #b6dbfd;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-family: 'Georgia', 'Times New Roman', serif;
}

h1 {
    color: #f1f3f5;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    font-size: 2.2rem;
    border-bottom: 2px solid #e0e5eb;
    padding-bottom: 0.5rem;
}

p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #ffffff;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px dotted #3498db;
}

a:hover {
    color: #2980b9;
    border-bottom: 1px solid #2980b9;
}

/* Quiz List Page Styles */
.quiz-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.quiz-card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: #333333;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    min-height: 280px;
    border: 1px solid #e0e5eb;
    position: relative;
    overflow: visible;
}

.quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: #3498db;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: gentle-float 4s ease-in-out infinite;
}

.quiz-card:hover::before {
    opacity: 1;
}

.quiz-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: #1e5180;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.card-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e5eb;
    min-height: 80px;
    align-items: flex-start;
}

.card-options a {
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    transition: all 0.3s;
    background-color: #f5f7fa;
    position: relative;
    border: 1px solid #e0e5eb;
    z-index: 1;
    font-size: 0.9rem;
}

.card-options a:hover {
    color: #ffffff;
    background-color: #3498db;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.card-options a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #2980b9;
    transition: width 0.3s ease;
    z-index: -1;
}

.card-options a:hover::before {
    width: 100%;
}

/* Quiz Page Styles */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e5eb;
}

.question {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e5eb;
    transition: all 0.3s ease;
}

.question:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: bold;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.choices label {
    display: block;
    padding: 1rem;
    background-color: #ffffff;
    border: 1px solid #e0e5eb;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.choices label:hover {
    transform: translateX(5px);
    background-color: #f5f7fa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.choices label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: rgba(52, 152, 219, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.choices label:hover::before {
    width: 100%;
}

.choices input[type="radio"] {
    margin-right: 10px;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.submit-btn:hover {
    transform: translateY(-2px);
    background-color: #2980b9;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.submit-btn:hover::after {
    left: 100%;
}

/* Card Styles */
.card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e5eb;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-body {
    padding: 1.5rem;
    color: #333333;
    background-color: #ffffff;
}

/* Quiz Results Styles */
.results-summary {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-weight: bold;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.result-item {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid #e0e5eb;
}

.result-item.correct {
    background-color: rgba(76, 175, 80, 0.05);
    border-left: 5px solid #4caf50;
}

.result-item.incorrect {
    background-color: rgba(231, 76, 60, 0.05);
    border-left: 5px solid #e74c3c;
}

.result-item p {
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #2c3e50;
}

.result-item ul {
    list-style-type: none;
    padding-left: 0;
}

.result-item li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e5eb;
}

.result-item li:last-child {
    border-bottom: none;
}

.explanation {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f5f7fa;
    border-radius: 4px;
    font-style: italic;
    border: 1px dashed #e0e5eb;
}

.correct-choice {
    font-weight: bold;
    color: #27ae60;
}

.result-item .user-answer {
    font-weight: bold;
    color: #e74c3c;
}

.result-item .correct-answer {
    font-weight: bold;
    color: #27ae60;
}

.research-link, .try-again-link {
    margin-top: 2rem;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
}

.research-link:hover, .try-again-link:hover {
    transform: translateY(-2px);
    background-color: #2980b9;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    color: white;
}

.research-link::after, .try-again-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.try-again-link:hover::after, .research-link:hover::after {
    left: 100%;
}

/* Quiz Button Styles */
.quiz-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.quiz-button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #7b68ee, #00f2fe);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(123, 104, 238, 0.4);
    text-align: center;
    min-width: 180px;
}

.quiz-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(123, 104, 238, 0.6);
    color: white;
}

.quiz-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.quiz-button:hover::after {
    left: 100%;
}

.research-button {
    background: linear-gradient(90deg, #7b68ee, #00f2fe);
}

.try-again-button {
    background: linear-gradient(90deg, #f0a6ca, #7b68ee);
}

.back-button {
    background: linear-gradient(90deg, #00f2fe, #4caf50);
}

/* Research Paper Page Styles */
.card {
    background-color: #1e1e2e;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(123, 104, 238, 0.3);
    border: 1px solid rgba(123, 104, 238, 0.2);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-body {
    padding: 2rem;
}

blockquote {
    border-left: 4px solid #7b68ee;
    padding-left: 1rem;
    margin-left: 0;
    color: #b8b8d4;
    font-style: italic;
    background-color: rgba(123, 104, 238, 0.1);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

code {
    background-color: #252538;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    color: #00f2fe;
}

pre {
    background-color: #252538;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid rgba(123, 104, 238, 0.2);
}

pre code {
    background-color: transparent;
    padding: 0;
    color: #e0e0e0;
}

img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(123, 104, 238, 0.2);
}

th {
    background-color: #2d2d42;
    color: #f0a6ca;
}

tr:nth-child(even) {
    background-color: #252538;
}

tr:hover {
    background-color: #2d2d4a;
}

.back-to-quiz {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #7b68ee, #00f2fe);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(123, 104, 238, 0.4);
}

.back-to-quiz:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(123, 104, 238, 0.6);
    color: white;
}

/* Navigation Styles */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.nav-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #7b68ee, #00f2fe);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(123, 104, 238, 0.4);
}

.nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(123, 104, 238, 0.6);
    color: white;
}

/* Error Styles */
.error {
    padding: 1.5rem;
    background-color: rgba(231, 76, 60, 0.15);
    border-left: 5px solid #e74c3c;
    border-radius: 8px;
    margin-bottom: 2rem;
}


        /* Custom tab styling */
        .custom-tabs {
            display: flex;
            list-style: none;
            padding: 0;
            margin: 0;
            border-bottom: 1px solid #dee2e6;
        }
        .custom-tabs li {
            margin-bottom: -1px;
        }
        .custom-tab-button {
            position: relative;
            display: block;
            padding: 0.5rem 1rem;
            border: 1px solid transparent;
            border-top-left-radius: 0.25rem;
            border-top-right-radius: 0.25rem;
            cursor: pointer;
            background-color: transparent;
            font-size: 1rem;
            font-weight: 400;
            color: #495057;
        }
        .custom-tab-button:hover {
            border-color: #e9ecef #e9ecef #dee2e6;
            background-color: #f8f9fa;
        }
        .custom-tab-button.active {
            color: #495057;
            background-color: #fff;
            border-color: #dee2e6 #dee2e6 #fff;
        }
        .custom-tab-content {
            display: none;
            padding: 1rem 0;
        }
        .custom-tab-content.active {
            display: block;
        }
        /* Card styling */
        .card {
            position: relative;
            display: flex;
            flex-direction: column;
            min-width: 0;
            word-wrap: break-word;
            background-color: #fff;
            background-clip: border-box;
            border: 1px solid rgba(0,0,0,.125);
            border-radius: 0.25rem;
        }
        .card-body {
            flex: 1 1 auto;
            padding: 1rem;
        }
        .mt-3 {
            margin-top: 1rem;
        }
        .mb-4 {
            margin-bottom: 1.5rem;
        }
        .text-muted {
            color: #6c757d;
        }
        .card-title {
            margin-bottom: 0.75rem;
            font-size: 1.25rem;
        }
        .list-group {
            display: flex;
            flex-direction: column;
            padding-left: 0;
            margin-bottom: 0;
            border-radius: 0.25rem;
        }
        .list-group-item {
            position: relative;
            display: block;
            padding: 0.75rem 1.25rem;
            background-color: #fff;
            border: 1px solid rgba(0,0,0,.125);
        }
        .list-group-item:first-child {
            border-top-left-radius: inherit;
            border-top-right-radius: inherit;
        }
        .list-group-item:last-child {
            border-bottom-right-radius: inherit;
            border-bottom-left-radius: inherit;
        }

        
        body {
            font-family: 'Open Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background-color: #2a1f0f;
            color: #fff8e6;
            margin: 0;
            padding: 2rem;
            background-image: url('/images/bg-wide-1.jpg');
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
        }
            /* Cheese-themed styling */
            .millionaire-container { max-width: 1200px; margin: auto; background-color: rgba(58, 40, 12, 0.92); color: #fff8e6; padding: 20px; border-radius: 12px; font-family: sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
            .millionaire-question { background-color: #5a3d12; padding: 20px; border-radius: 10px; text-align: center; font-size: 1.5em; margin-bottom: 20px; border: 2px solid #f5c451; }
            .millionaire-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
            .millionaire-choice { display: flex; flex-grow: 1; background-color: #5a3d12; border-radius: 8px; padding: 15px; cursor: pointer; transition: background-color 0.2s, transform 0.1s; border: 2px solid #f5c451; }
            .millionaire-choice:hover { background-color: #6a4b17; transform: translateY(-1px); }
            .millionaire-choice button { background: none; border: none; color: #fff8e6; font-size: 1.2em; width: 100%; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 12px; }
            .choice-letter { display: inline-flex; width: 34px; height: 34px; min-width: 34px; border-radius: 50%; background: #f5c451; color: #2a1f0f; font-weight: 800; align-items: center; justify-content: center; border: 2px solid #fff8e6; box-shadow: 0 1px 0 rgba(0,0,0,0.3) inset; }
            .choice-text { flex: 1; }
            
            .game-over-screen { text-align: center; }
            .game-over-screen h2 { font-size: 2.5em; color: #ffd166; }
            .game-over-screen p { font-size: 1.5em; }
            .final-answer { border-color: #f5c451 !important; background-color: #6a4b17 !important; }
    
            /* Layout and Cheese Board */
            .game-board { display: flex; flex-wrap: wrap; gap: 20px; }
            .question-panel { flex: 3; min-width: 400px; }
            .money-tree-panel { flex: 1; min-width: 200px; background-color: #3f2c0e; padding: 15px; border-radius: 10px; }
            
            .money-tree-panel h3 { text-align: center; margin-top: 0; color: #ffd166; }
            .millionaire-money-tree { text-align: center; list-style-type: none; padding: 0; margin: 0; display: flex; flex-direction: column-reverse; }
            .millionaire-money-tree li { padding: 8px 5px; border-radius: 5px; margin-bottom: 5px; font-weight: bold; transition: all 0.3s; }
            
            /* Style for future levels */
            .millionaire-money-tree li { background-color: #5a3d12; color: #ffe8a3; }
            
            /* Style for completed levels */
            .millionaire-money-tree .level-cleared { background-color: #4d3712; color: #d9c8a2; }
            
            /* Style for the current, active level */
            .millionaire-money-tree .current-level { background-color: #ffd166; color: #2a1f0f; transform: scale(1.05); }
    
            /* Style for safety net levels */
            .millionaire-money-tree .safety-net { color: #ffffff; border: 1px solid #fff; }
    
            /* Final answer modal */
            .final-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: none; align-items: center; justify-content: center; z-index: 1000; }
            .final-modal { background: #3f2c0e; color: #fff8e6; padding: 24px; border-radius: 12px; width: min(520px, 92vw); border: 2px solid #f5c451; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
            .final-modal h3 { margin: 0 0 8px; color: #ffd166; }
            .final-modal p { margin: 0 0 16px; }
            .final-modal .actions { display: flex; gap: 10px; justify-content: flex-end; }
            .btn { appearance: none; border: 0; padding: 10px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; }
            .btn-secondary { background: #6a4b17; color: #fff8e6; border: 2px solid #f5c451; }
            .btn-primary { background: #ffd166; color: #2a1f0f; }

            /* Make the page title stand out more on millionaire pages */
            .millionaire-container h1 {
                color: #ffd166; /* bright cheese gold */
                text-shadow: 0 2px 0 #2a1f0f, 0 0 12px rgba(255, 209, 102, 0.6);
                font-size: 2.6rem;
                border-bottom: none; /* override generic h1 underline */
                margin-bottom: 1rem;
            }
            
            /* Mobile responsiveness for small phones */
            @media (max-width: 600px) {
                body { 
                    padding: 0.75rem; 
                    background-attachment: scroll; /* avoid jank on mobile */
                }
                .millionaire-container { 
                    max-width: 100%; 
                    padding: 12px; 
                    border-radius: 10px; 
                }
                .millionaire-container h1 { 
                    font-size: 1.8rem; 
                    margin-bottom: 0.75rem;
                }
                .game-board { 
                    flex-direction: column; 
                    gap: 12px; 
                }
                .question-panel, 
                .money-tree-panel { 
                    min-width: 0; 
                    width: 100%; 
                }
                .money-tree-panel { 
                    padding: 12px; 
                }
                .millionaire-question { 
                    font-size: 1.1rem; 
                    padding: 14px; 
                }
                .millionaire-choices { 
                    grid-template-columns: 1fr; 
                    gap: 10px; 
                }
                .millionaire-choice { 
                    padding: 10px; 
                }
                .millionaire-choice button { 
                    font-size: 1rem; 
                }
                .final-modal { 
                    width: 94vw; 
                }
            }