* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, hsl(0, 100%, 89%) 0%, lab(73.06% 38.18 16.54) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 800px;
    width: 100%;
    overflow: hidden;
    flex: 1 0 auto;
}

.header {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}


.header h1 {
    display: none;
}

.main-logo {
    display: block;
    margin: 0 auto 10px auto;
    max-width: 200px;
    height: auto;
    filter: brightness(0) invert(1); /* Ensures logo appears white if SVG uses black fill */
}

.content {
    padding: 40px;
}

.question-container {
    text-align: center;
    margin-bottom: 30px;
}

.question-number {
    color: var(--category-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.category {
    background: var(--category-bg);
    color: var(--category-color);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
    font-weight: 600;
}

.question {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 10px;
}

.question-detail {
    font-size: 1rem;
    color: #666;
    font-style: italic;
    margin-bottom: 30px;
}

.rating-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    position: relative;
    height: 80px;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.rating-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.rating-slider:hover {
    opacity: 1;
}

.slider-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--category-color, #e91e63);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    pointer-events: none;
    z-index: 2;
    border: 3px solid var(--category-color, #e91e63);
    transition: transform 0.3s ease;
}

.slider-wrapper:hover .slider-thumb {
    transform: scale(1.2);
}

@media (max-width: 600px) {
    .slider-wrapper {
        width: 200px;
    }
    .slider-thumb, .rating-slider::-webkit-slider-thumb, .rating-slider::-moz-range-thumb, .rating-slider::-ms-thumb {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    font-size: 0.9rem;
    color: #666;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--category-color);
    color: white;
}

.btn-primary:hover {
    background: var(--category-color-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.progress-bar {
    background: #f0f0f0;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    background: linear-gradient(90deg, var(--category-color), var(--category-color-dark));
    height: 100%;
    transition: width 0.5s ease;
}

.results {
    display: none;
}

.results.show {
    display: block;
}

.result-category {
    background: var(--category-bg);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid var(--category-color);
}

.result-category h3 {
    color: var(--category-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.accordion {
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    border-left: 5px solid var(--category-color);
    background: var(--category-bg);
    transition: box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.accordion-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: var(--category-bg);
}

.accordion-header h3 {
    margin: 0;
    color: var(--category-color);
    font-size: 1.2rem;
}

.accordion-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 25px;
    flex-direction: row;
}

@media (max-width: 700px) {
    .accordion-summary {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        padding: 18px;
    }
    .accordion-score-block {
        align-items: flex-start;
        margin-top: 10px;
    }
}

.accordion-score-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 90px;
}

.result-score {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
    text-align: right;
}

.result-level {
    padding: 5px 15px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0;
    font-size: 1rem;
    text-align: right;
    background: var(--category-color, #e91e63); /* Add this line for background color */
}

.accordion-content {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    display: none;
    animation: fadeIn 0.3s;
}

.accordion.open .accordion-content {
    display: block;
}

.go-deeper-link {
    color: var(--category-color);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    transition: color 0.2s;
}
.go-deeper-link:hover {
    color: var(--category-color-dark);
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.restart-btn,
.steps-btn {
    flex: 1 1 220px;
    min-width: 180px;
    max-width: 300px;
    padding: 15px 40px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    margin: 0;
    box-sizing: border-box;
    display: block;
}

/* Restart uses category color, Steps uses blue */
.restart-btn {
    background: var(--category-color, #e91e63);
    color: white;
}
.restart-btn:hover {
    background: var(--category-color-dark, #c2185b);
    transform: translateY(-2px);
}

.steps-btn {
    background: #2196f3;
    color: white;
}

.steps-btn a {
    color: white;
    text-decoration: none;
}

.steps-btn:hover {
    background: #1976d2;
    transform: translateY(-2px);
}

/* Stack vertically on mobile */
@media (max-width: 600px) {
    .results-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .restart-btn,
    .steps-btn {
        max-width: 100%;
        width: 100%;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.category-0 {
    --category-color: #e91e63;
    --category-color-dark: #c2185b;
    --category-bg: #fce4ec;
}

.category-1 {
    --category-color: #2196f3;
    --category-color-dark: #1976d2;
    --category-bg: #e3f2fd;
}

.category-2 {
    --category-color: #4caf50;
    --category-color-dark: #388e3c;
    --category-bg: #e8f5e8;
}

.category-3 {
    --category-color: #ff9800;
    --category-color-dark: #f57c00;
    --category-bg: #fff3e0;
}

.category-4 {
    --category-color: #9c27b0;
    --category-color-dark: #7b1fa2;
    --category-bg: #f3e5f5;
}

.category-progress-bar {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 4px 4px 0 0;
    margin-bottom: 0;
    overflow: hidden;
    position: relative;
    display: block;
}

.category-progress-fill {
    height: 100%;
    background: var(--category-color, #e91e63);
    border-radius: 4px 4px 0 0;
    transition: width 0.5s;
}

.main-footer {
    text-align: center;
    padding: 18px 0 8px 0;
    background: transparent;
    font-size: 1rem;
    color: #ffffff;
    width: 100%;
    flex-shrink: 0;
    margin-top: auto;
}

.footer-link {
    color: #ffffff;
    font-weight: 600;
}

.footer-link:hover {
    color: #ffffff;
    text-decoration: underline;
}