/**
 * Quiz Standalone CSS - Foundation styles for individual quiz pages
 * Independent of main site theming, provides clean base for series themes
 */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* Quiz Node Container */
.quiz-node-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
   background-color: #f9f7f2;
    transition: background-color 1.5s ease;
}

/* Quiz Node Header */
.quiz-node-header {
    background-color: #ffffff;
    border-bottom: 2px solid #e0e0e0;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quiz-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    text-align: center;
    flex-grow: 1;
}

.site-title h1 {
    margin: 0;
    font-size: 1.8em;
    color: #5d4777;
    font-weight: bold;
}

.site-title .subtitle {
    font-size: 0.9em;
    color: #888;
    font-style: italic;
}

.nav-link {
    color: #5d4777;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #f0f0f0;
    color: #333;
}

.back-link::before {
    content: "← ";
}

/* Main Quiz Content Area */
.quiz-main {
    flex-grow: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

/* Quiz Content Styles */
.quiz-container {
    background-color: var(--container-bg, #ffffff); 
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.quiz-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
}

.quiz-header h1 {
    color: #333;
    font-size: 2.5em;
    margin: 0 0 15px 0;
    font-weight: bold;
}

.quiz-description {
    color: #666;
    font-size: 1.2em;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* Question Blocks */
.question-block {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.question-text {
    color: #333;
    font-size: 1.4em;
    font-weight: bold;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

/* Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background-color: var(--option-bg, #ffffff);
    border: 1px solid var(--option-border, #ddd);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-label:hover {
    background-color: var(--option-hover-bg, #f0f0f0);
    border-color: var(--option-hover-border, #999);
}

.option-label input[type="radio"] {
    margin: 4px 0 0 0;
    transform: scale(1.2);
}

.option-text {
    color: #333;
    font-size: 1em;
    line-height: 1.4;
    flex-grow: 1;
}

/* Submit Button */
.quiz-submit-section {
    text-align: center;
    margin: 40px 0 20px 0;
}

.quiz-submit-btn {
    background-color: #5d4777;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.quiz-submit-btn:hover {
    background-color: #4a3866;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.3);
}

/* Results Display */
.quiz-results {
    text-align: center;
}

.results-header h2 {
    color: #333;
    font-size: 2.2em;
    margin-bottom: 30px;
}

.results-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.result-image {
    max-width: 500px;
    width: 100%;
}

.result-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.result-text {
    max-width: 700px;
    text-align: left;
}

.result-narrative {
    font-size: 1.4em;
    color: #333;
    font-weight: bold;
    margin-bottom: 25px;
    line-height: 1.5;
    text-align: center;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 8px;
    border-left: 4px solid #5d4777;
}

.result-description {
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

.score-breakdown {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-top: 25px;
}

.score-breakdown h4 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 1.3em;
}

.score-breakdown p {
    margin: 10px 0;
    font-size: 1em;
    color: #333;
}

/* Action Buttons */
.quiz-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn {
    padding: 12px 25px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: #5d4777;
    color: white;
}

.btn-primary:hover {
    background-color: #4a3866;
}

.btn-secondary {
    background-color: transparent;
    color: #5d4777;
    border-color: #5d4777;
}

.btn-secondary:hover {
    background-color: #5d4777;
    color: white;
}

/* Quiz Node Footer */
.quiz-node-footer {
    background-color: #333;
    color: white;
    padding: 20px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    margin: 0 5px;
}

.footer-links a:hover {
    color: white;
}

.footer-links span {
    color: #666;
    margin: 0 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-nav {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .site-title {
        order: -1;
    }
    
    .quiz-main {
        padding: 20px 10px;
    }
    
    .quiz-container {
        padding: 20px;
    }
    
    .quiz-header h1 {
        font-size: 2em;
    }
    
    .quiz-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
        text-align: center;
    }
}
