:root {
    --primary-color: #8B0000;
    --secondary-color: #FFD700;
    --text-dark: #2C2C2C;
    --text-light: #666;
    --bg-light: #F5F5F5;
    --border-color: #DDD;
    --success-color: #2E7D32;
    --warning-color: #F57C00;
    --core-color: #8B0000;
    --supporting-color: #FF9800;
    --emergent-color: #2E7D32;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Screens */
.screen {
    display: none;
    padding: 40px;
    min-height: 500px;
}

.screen.active {
    display: block;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1em;
}

/* Intro Screen */
.content {
    max-width: 700px;
    margin: 0 auto;
}

.lead {
    font-size: 1.15em;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--text-light);
}

.layers-preview {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
}

.layers-preview h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.layers-preview ol {
    margin-left: 20px;
}

.layers-preview li {
    margin: 8px 0;
    font-size: 1.05em;
}

.info-box {
    border-left: 4px solid var(--secondary-color);
    background: #FFF9E6;
    padding: 20px;
    margin: 25px 0;
}

.info-box h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.info-box ul {
    margin-left: 20px;
}

.privacy-note {
    font-size: 0.9em;
    color: var(--text-light);
    font-style: italic;
    margin: 20px 0;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 15px 40px;
    font-size: 1.1em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #6B0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139,0,0,0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

.btn-primary:disabled, .btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#start-btn {
    display: block;
    margin: 30px auto 0;
}

/* Progress Bar */
.progress-bar {
    height: 6px;
    background: var(--border-color);
    width: 100%;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

/* Quiz Screen */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.layer-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1em;
}

.question-counter {
    color: var(--text-light);
    font-size: 0.9em;
}

.question-container {
    min-height: 300px;
    margin-bottom: 30px;
}

.question {
    margin-bottom: 25px;
}

.question-text {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 500;
}

/* Scale Questions */
.scale-options {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

.scale-option {
    flex: 1;
    text-align: center;
}

.scale-option input[type="radio"] {
    display: none;
}

.scale-option label {
    display: block;
    padding: 15px 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.scale-option input[type="radio"]:checked + label {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.scale-option label:hover {
    border-color: var(--primary-color);
}

.scale-label {
    font-size: 0.85em;
    color: var(--text-light);
    margin-top: 5px;
    display: block;
}

.scale-option input[type="radio"]:checked + label .scale-label {
    color: white;
}

/* Yes/No Questions */
.yesno-options {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.yesno-option {
    flex: 1;
}

.yesno-option input[type="radio"] {
    display: none;
}

.yesno-option label {
    display: block;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.yesno-option input[type="radio"]:checked + label {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.yesno-option label:hover {
    border-color: var(--primary-color);
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

/* Results Screen */
.results-summary {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

#results-chart {
    max-width: 600px;
    max-height: 400px;
    margin: 0 auto;
}

/* Chart Explanation */
.chart-explanation {
    background: #FFF9E6;
    border-left: 4px solid var(--secondary-color);
    padding: 15px;
    margin-top: 20px;
    border-radius: 6px;
    font-size: 0.9em;
}

.chart-explanation p {
    margin: 5px 0;
}

.chart-explanation strong {
    color: var(--primary-color);
}

/* Assessment Messages */
.assessment-message {
    margin: 30px 0;
    padding: 25px;
    border-radius: 8px;
    line-height: 1.8;
}

.assessment-message h2 {
    margin-bottom: 15px;
    font-size: 1.6em;
    color: var(--primary-color);
}

.assessment-message p {
    margin-bottom: 10px;
}

.excellence-message {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border: 3px solid var(--success-color);
}

.progress-message {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border: 3px solid var(--warning-color);
}

.journey-message {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border: 3px solid #1976D2;
}

/* Results Sections */
.results-section {
    margin: 30px 0;
}

.results-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* Layer Results */
.layer-result {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.layer-result.strength {
    border-left: 4px solid var(--success-color);
}

.layer-result.development {
    border-left: 4px solid var(--warning-color);
}

.layer-result.development.critical {
    border-left: 4px solid var(--primary-color);
    background: #FFF5F5;
}

.layer-result h3 {
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.layer-score {
    color: var(--text-light);
    font-size: 0.9em;
    margin-bottom: 8px;
}

/* Priority Badges */
.priority-badge {
    display: inline-block;
    background: var(--warning-color);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
}

/* Score Badges */
.score-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

/* Safety Warning */
.safety-warning {
    background: #FFF3E0;
    border-left: 4px solid #FF6F00;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 0.9em;
}

.safety-warning strong {
    color: #E65100;
}

/* Action Steps */
.action-steps {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
}

.action-steps h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Priority Sections */
.priority-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 4px solid var(--warning-color);
}

.priority-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.priority-section h4 {
    color: var(--text-dark);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1em;
    font-weight: 700;
}

.priority-section p {
    margin-bottom: 15px;
    line-height: 1.7;
}

/* Action Timeline */
.action-timeline {
    margin: 20px 0;
}

.timeline-section {
    margin-bottom: 20px;
}

.timeline-section h4 {
    color: var(--primary-color);
    font-size: 0.95em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.timeline-section ul {
    margin-left: 20px;
}

.timeline-section li {
    margin: 8px 0;
    line-height: 1.6;
}

/* Resources Section */
.resources-section {
    background: #FFF9E6;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
}

.resources-section h4 {
    color: var(--primary-color);
    font-size: 0.95em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.resources-section ul {
    margin-left: 20px;
}

.resources-section li {
    margin: 6px 0;
    line-height: 1.5;
    font-size: 0.95em;
}

/* Closing Message */
.closing-message {
    background: #FFF9E6;
    border-left: 4px solid var(--secondary-color);
    padding: 20px;
    margin: 30px 0;
    border-radius: 6px;
}

.closing-message p {
    margin-bottom: 10px;
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
    font-size: 0.9em;
    background: white;
    margin-top: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

footer p {
    margin: 5px 0;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 8px;
    }
    
    .screen {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .scale-options {
        flex-wrap: wrap;
    }
    
    .scale-option {
        flex: 0 0 48%;
        margin-bottom: 10px;
    }
    
    .quiz-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .navigation button {
        width: 100%;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions button {
        width: 100%;
    }
    
    .yesno-options {
        flex-direction: column;
    }
    
    .priority-section h3 {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }
    
    .scale-option {
        flex: 0 0 100%;
    }
    
    .btn-primary, .btn-secondary {
        padding: 12px 30px;
        font-size: 1em;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .navigation, 
    .results-actions, 
    footer,
    #start-btn {
        display: none !important;
    }
    
    .screen {
        display: block !important;
    }
    
    #intro-screen,
    #quiz-screen {
        display: none !important;
    }
    
    .assessment-message,
    .chart-explanation {
        page-break-after: avoid;
        background: white !important;
        border: 2px solid #333 !important;
    }
    
    .priority-section {
        page-break-inside: avoid;
    }
    
    .page-break {
        page-break-after: always;
    }
}
