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

body {
    font-family: 'Inter', 'Noto Sans Display', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* Section Styles */
.section {
    display: none;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.section.active {
    display: block;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
    outline: none;
    border-color: #4CAF50;
}

select {
    background-color: white;
    cursor: pointer;
}

select option {
    padding: 8px;
}

/* Button Styles */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #757575;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #616161;
}

.btn-success {
    background-color: #2196F3;
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Info Card */
.info-card {
    background-color: #f0f7ff;
    border-left: 4px solid #2196F3;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.info-card h3 {
    color: #1976D2;
    margin-bottom: 10px;
}

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

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 30px;
    background-color: #e0e0e0;
    border-radius: 15px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 15px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #333;
}

/* Question Styles */
.sphere-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
}

.sphere-title {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.question-block {
    margin-bottom: 25px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.question-text {
    font-weight: 500;
    margin-bottom: 15px;
    color: #333;
}

/* Likert Scale Styles */
.likert-scale {
    display: flex;
    width: 100%;
    gap: 0;
}

.likert-option {
    flex: 1;
    text-align: center;
    min-width: 0;
}

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

.likert-option label {
    display: block;
    padding: 10px 5px;
    margin: 0 2px;
    background-color: #f0f0f0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: normal;
}

.likert-option input[type="radio"]:checked + label {
    background-color: #4CAF50;
    color: white;
    transform: scale(1.05);
}

.likert-option label:hover {
    background-color: #e0e0e0;
}

.likert-option input[type="radio"]:checked + label:hover {
    background-color: #45a049;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 8px;
    width: 100%;
    margin-left: 0;
}

.scale-labels span {
    display: block;
    width: 20%;
    min-height: 18px;
    font-size: 0.75rem;
    color: #aaa;
    background: none;
    border-radius: 0;
    text-align: center;
    padding: 0;
    box-sizing: border-box;
    font-weight: 400;
}

.scale-labels span:nth-child(2),
.scale-labels span:last-child {
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Multiple Choice Styles */
.multiple-choice {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    overflow-x: unset;
}

.multiple-choice > div {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 0;
    box-sizing: border-box;
    white-space: normal;
}

.multiple-choice input[type="radio"],
.multiple-choice input[type="checkbox"] {
    margin-right: 8px;
}

.multiple-choice label {
    flex: 1;
    cursor: pointer;
    font-size: 1rem;
    margin: 0;
    background: none;
    padding: 0;
}

.multiple-choice input[type="radio"]:checked + label {
    background-color: #e3f2fd;
    border: 2px solid #2196F3;
}

.multiple-choice input[type="checkbox"]:checked + label {
    background-color: #e3f2fd;
    border: 2px solid #2196F3;
}

.multiple-choice label:hover {
    background-color: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 900px) {
    .multiple-choice > div {
        min-width: 140px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .likert-scale {
        flex-direction: column;
        gap: 5px;
    }
    
    .likert-option {
        width: 100%;
    }
    
    .likert-option label {
        padding: 12px;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
    
    .multiple-choice {
        flex-direction: column;
        gap: 6px;
        overflow-x: unset;
    }
    
    .multiple-choice > div {
        min-width: 0;
        width: 100%;
    }
}
/* Results Styles */
.results-summary {
    text-align: center;
    margin: 20px 0 40px;
}

.results-date {
    color: #666;
    margin-bottom: 30px;
}

/* Results grid: compact cards */
.scores-grid, .score-card {
    display: none;
}

.scores-list-container {
    margin: 30px 0;
}

.results-header {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #2c3e50;
    font-weight: 600;
}

.scores-list {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.score-list-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s;
}

.score-list-row:last-child {
    border-bottom: none;
}

.score-list-row:hover {
    background-color: #f9f9f9;
}

.score-list-name {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    color: #34495e;
}

.score-list-icon {
    font-size: 1.6rem;
    width: 30px;
    text-align: center;
}

.score-list-value {
    font-size: 1.2rem;
    text-align: center;
}

.score-list-value strong {
    font-size: 1.5rem;
    font-weight: 700;
}

.score-list-actions {
    text-align: right;
}

.score-list-actions .sphere-recommend-btn {
    padding: 8px 20px;
    font-size: 14px;
    background-color: #3498db;
}

.score-list-actions .sphere-recommend-btn:hover {
    background-color: #2980b9;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background: rgba(0,0,0,0.35);
    align-items: center;
    justify-content: center;
}
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    font-family: 'Georgia', serif;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s;
}
.close-modal:hover {
    color: #f44336;
}
#modal-sphere-title {
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
#modal-recommendation-text {
    margin-bottom: 12px;
    font-size: 1.05rem;
    text-align: left;
}
#modal-recommendation-text h5 {
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
}
#modal-recommendation-resources {
    margin: 0 0 0 20px;
    padding: 0;
    list-style: disc;
    text-align: left;
}
#modal-recommendation-resources li {
    margin-bottom: 10px;
    font-size: 0.98rem;
    line-height: 1.5;
}
#modal-recommendation-resources a {
    color: #1976D2;
    text-decoration: underline;
}
@media (max-width: 600px) {
    .modal-content {
        padding: 18px 6vw 12px 6vw;
        max-width: 98vw;
    }
    .scores-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Reverse-scored question indicator */
.question-block[data-reverse="true"] {
    border-left: 4px solid #ff9800;
}

.question-block[data-reverse="true"] .question-text::after {
    content: " ⚠️";
    font-size: 0.9em;
    opacity: 0.7;
}

.reverse-note {
    font-size: 0.85rem;
    color: #ff6b35;
    font-style: italic;
    margin-top: 5px;
}

/* Sphere navigation indicators */
.sphere-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.sphere-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
}

.sphere-dot.active {
    background-color: #4caf50;
    transform: scale(1.3);
}

.sphere-dot.completed {
    background-color: #2196f3;
}

.likert-option.na-option {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.likert-option.na-option label {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    font-weight: 500;
}

.likert-option.na-option input[type="radio"]:checked + label {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.likert-option.na-option label:hover {
    background-color: #e9ecef;
}

.likert-option.na-option input[type="radio"]:checked + label:hover {
    background-color: #5a6268;
}

/* Completion Message */
.completion-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-out;
}

.completion-message.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

.completion-icon {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

/* Results Section */
.results-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.findings-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.findings-list li {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    background: #f8f9fa;
}

.finding-strong {
    border-left: 4px solid #4CAF50;
}

.finding-weak {
    border-left: 4px solid #f44336;
}

.finding-moderate {
    border-left: 4px solid #FFC107;
}

.finding-insight {
    border-left: 4px solid #2196F3;
}

.recommendations-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.recommendations-list li {
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 4px;
    background: #f8f9fa;
}

.recommendation-priority {
    border-left: 4px solid #f44336;
}

.recommendation-improve {
    border-left: 4px solid #FFC107;
}

.recommendation-maintain {
    border-left: 4px solid #4CAF50;
}

/* Enhanced capacity level display */
.capacity-level-card {
    margin: 20px 0;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
}

.capacity-level-card h3 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.capacity-level-card h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.capacity-level-card p {
    font-size: 1.1rem;
    color: #555;
}

/* Level-specific colors */
.capacity-level-card.level-1 {
    background-color: #ffebee;
    border: 2px solid #f44336;
    color: #c62828;
}

.capacity-level-card.level-2 {
    background-color: #fff3e0;
    border: 2px solid #ff9800;
    color: #e65100;
}

.capacity-level-card.level-3 {
    background-color: #fff8e1;
    border: 2px solid #ffc107;
    color: #f57c00;
}

.capacity-level-card.level-4 {
    background-color: #f1f8e9;
    border: 2px solid #8bc34a;
    color: #558b2f;
}

.capacity-level-card.level-5 {
    background-color: #e8f5e9;
    border: 2px solid #4caf50;
    color: #2e7d32;
}

.capacity-level-card.level-6 {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
    color: #1565c0;
}

/* Key findings styles */
.key-findings {
    margin: 30px 0;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 10px;
}

.key-findings h4 {
    margin-bottom: 15px;
    color: #333;
}

.key-findings ul {
    list-style: none;
    padding: 0;
}

.key-findings li {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
}

.finding-strong {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.finding-weak {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
}

.finding-insight {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

/* Multiple choice question enhancement */
.question-block[data-question-id="q35"] .multiple-choice {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

/* Completion celebration */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.overall-score {
    animation: pulse 1s ease-in-out;
}

/* Print styles for results */
@media print {
    .actions {
        display: none;
    }
    
    .results-summary {
        page-break-inside: avoid;
    }
    
    .scores-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
}

.score-card.low {
    border: 1.5px solid #f44336;
    background: #ffebee;
}
.score-card.medium {
    border: 1.5px solid #ff9800;
    background: #fff3e0;
}
.score-card.high {
    border: 1.5px solid #ffe082;
    background: #fffde7;
}
.score-card.excellent {
    border: 1.5px solid #4caf50;
    background: #e8f5e9;
}

.likert-container {
    width: 100%;
}

.question-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #e0e0e0;
    color: #555;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: bold;
    margin-left: 8px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}
.question-tooltip-icon:hover,
.question-tooltip-icon:focus {
    background: #bdbdbd;
    outline: none;
}
.question-tooltip {
    display: none;
    position: absolute;
    left: 120%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: #fffbe6;
    color: #333;
    border: 1px solid #e0c97f;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 10px 14px;
    font-size: 0.98rem;
    min-width: 320px;
    max-width: 400px;
    white-space: pre-line;
    line-height: 1.5;
    pointer-events: auto;
}

#modal-recommendation-text h4 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.recommendation-list {
    padding-left: 25px;
    list-style-type: decimal;
    text-align: left;
}

.recommendation-list li {
    margin-bottom: 25px;
    line-height: 1.6;
    color: #444;
}

.recommendation-list li::marker {
    font-weight: bold;
    color: #265B3D;
}

.recommendation-list li b {
    font-weight: 600;
    color: #222;
}

.recommendation-resources {
    margin-top: 15px;
    padding-left: 15px;
    border-left: 2px solid #e0e0e0;
}

.resource-item {
    margin-bottom: 15px;
}

.resource-item:last-child {
    margin-bottom: 5px;
}

.resource-title {
    margin-bottom: 5px;
    color: #333;
}

.recommendation-resource-btn {
    padding: 6px 16px;
    font-size: 0.95em;
    font-family: inherit;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.2s, transform 0.2s;
}

.recommendation-resource-btn:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
}

#close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5em;
    color: #888;
    cursor: pointer;
    transition: transform 0.2s;
}

#close-modal-btn:hover {
    transform: rotate(90deg);
}