:root {
    --dusty-rose: #ad857c;
    --linen: #fdf2e9;
    --blush-beige: #c3a49f;
    --princess-pink: #fdd9d2;
    --gold: #d6b99e;
    --dark-text: #3d3d3d;
    --light-text: #6b5b54;
    --dim: #c17a70;
    --flickering: #d6a659;
    --igniting: #b8a44f;
    --flipped-on: #7cad85;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "Montserrat", sans-serif;
    background: var(--linen);
    color: var(--dark-text);
    line-height: 1.7;
}
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--linen);
}
::-webkit-scrollbar-thumb {
    background: var(--blush-beige);
    border-radius: 4px;
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}
.header {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(
        135deg,
        var(--dusty-rose) 0%,
        var(--blush-beige) 100%
    );
    position: relative;
    overflow: hidden;
}
.header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 60%
    );
    animation: shimmer 15s infinite linear;
}

.header .header-image {
    height: 150px;
}

.header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 60%
    );
    animation: shimmer 15s infinite linear;
}

@keyframes shimmer {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
.header h1 {
    font-family: "Cormorant Garamond", serif;
    font-size: 3.5rem;
    font-weight: 400;
    color: white;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.header h1 span {
    font-style: italic;
    font-weight: 500;
}
.header p {
    font-size: 1.1rem;
    color: var(--linen);
    font-weight: 300;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}
.progress-container,
.welcome-messge {
    background: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(173, 133, 124, 0.15);
}

.welcome-messge p {
    font-size: 1rem;
    margin-top: 15px;
    line-height: 1.6;
    text-align: center;
}

.welcome-messge h2 {
    color: var(--dusty-rose);
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    margin-bottom: 8px;
    text-align: center;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.progress-header h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.4rem;
    color: var(--dusty-rose);
}
.progress-header span {
    font-size: 0.9rem;
    color: var(--light-text);
}
.progress-bar {
    height: 8px;
    background: var(--princess-pink);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dusty-rose), var(--gold));
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}
.nav-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(173, 133, 124, 0.1);
}
.nav-tab {
    flex: 1;
    min-width: 100px;
    padding: 12px 16px;
    border: none;
    background: var(--linen);
    color: var(--light-text);
    font-family: "Montserrat", sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}
.nav-tab:hover {
    background: var(--princess-pink);
}
.nav-tab.active {
    background: var(--dusty-rose);
    color: white;
}
.nav-tab.completed::after {
    content: "✓";
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: var(--flipped-on);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.section {
    display: none;
    animation: fadeIn 0.5s ease;
}
.section.active {
    display: block;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.section-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(173, 133, 124, 0.12);
    margin-bottom: 30px;
}
.section-header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--princess-pink);
}
.section-number {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--dusty-rose), var(--blush-beige));
    color: white;
    border-radius: 50%;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.5rem;
    line-height: 50px;
    margin-bottom: 15px;
}
.section-header h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    color: var(--dusty-rose);
    margin-bottom: 8px;
}
.section-header p {
    font-style: italic;
    color: var(--light-text);
    font-size: 1rem;
}
.question {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--linen);
    border-radius: 12px;
    transition: all 0.3s ease;
}
.question:hover {
    box-shadow: 0 4px 15px rgba(173, 133, 124, 0.15);
}
.question-text {
    font-size: 1rem;
    color: var(--dark-text);
    margin-bottom: 18px;
    display: flex;
    gap: 12px;
}
.question-num {
    font-weight: 600;
    color: var(--dusty-rose);
    min-width: 24px;
}
.rating-scale {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.rating-option {
    position: relative;
}
.rating-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.rating-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--princess-pink);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
}
.rating-label:hover {
    border-color: var(--blush-beige);
    transform: translateY(-2px);
}
.rating-option input:checked + .rating-label {
    background: var(--dusty-rose);
    border-color: var(--dusty-rose);
    color: white;
    transform: scale(1.05);
}
.rating-number {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.rating-text {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}
.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}
.btn {
    padding: 14px 35px;
    border: none;
    border-radius: 30px;
    font-family: "Montserrat", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-secondary {
    background: white;
    color: var(--dusty-rose);
    border: 2px solid var(--dusty-rose);
}
.btn-secondary:hover {
    background: var(--linen);
}
.btn-primary {
    background: linear-gradient(135deg, var(--dusty-rose), var(--blush-beige));
    color: white;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(173, 133, 124, 0.35);
}
.results-container {
    display: none;
}
.results-container.active {
    display: block;
    animation: fadeIn 0.8s ease;
}
.results-header {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(
        135deg,
        var(--dusty-rose) 0%,
        var(--blush-beige) 50%,
        var(--gold) 100%
    );
    border-radius: 20px;
    margin-bottom: 30px;
    color: white;
    position: relative;
    overflow: hidden;
}
.results-header h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
}
.lri-score {
    font-family: "Cormorant Garamond", serif;
    font-size: 5rem;
    font-weight: 600;
    line-height: 1;
    margin: 20px 0;
    position: relative;
}
.lri-score small {
    font-size: 1.5rem;
    opacity: 0.9;
}
.overall-stage {
    display: inline-block;
    padding: 10px 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
}
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.result-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(173, 133, 124, 0.12);
    transition: transform 0.3s ease;
}
.result-card:hover {
    transform: translateY(-5px);
}
.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.result-card h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.4rem;
    color: var(--dusty-rose);
}
.light-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.light-badge.dim {
    background: rgba(193, 122, 112, 0.15);
    color: var(--dim);
}
.light-badge.flickering {
    background: rgba(214, 166, 89, 0.15);
    color: var(--flickering);
}
.light-badge.igniting {
    background: rgba(184, 164, 79, 0.15);
    color: var(--igniting);
}
.light-badge.flipped-on {
    background: rgba(124, 173, 133, 0.15);
    color: var(--flipped-on);
}
.score-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 15px;
}
.score-display .score {
    font-family: "Cormorant Garamond", serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--dark-text);
}
.score-display .max {
    color: var(--light-text);
    font-size: 1rem;
}
.score-bar {
    height: 8px;
    background: var(--princess-pink);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}
.score-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}
.score-bar-fill.dim {
    background: var(--dim);
}
.score-bar-fill.flickering {
    background: var(--flickering);
}
.score-bar-fill.igniting {
    background: var(--igniting);
}
.score-bar-fill.flipped-on {
    background: var(--flipped-on);
}
.insight-text {
    font-size: 0.9rem;
    color: var(--light-text);
    line-height: 1.6;
    padding: 15px;
    background: var(--linen);
    border-radius: 10px;
    border-left: 3px solid var(--gold);
}
.flip-trigger-card {
    background: linear-gradient(135deg, var(--princess-pink) 0%, white 100%);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    border: 2px solid var(--gold);
    text-align: center;
}
.flip-trigger-card h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.8rem;
    color: var(--dusty-rose);
    margin-bottom: 15px;
}
.flip-trigger-card .trigger-pillar {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 10px;
}
.flip-trigger-card p {
    color: var(--light-text);
    max-width: 600px;
    margin: 0 auto;
}

/* NEW: Personalized Explanation Styles */
.explanation-section {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(173, 133, 124, 0.12);
    margin-bottom: 30px;
}
.explanation-section h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.8rem;
    color: var(--dusty-rose);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.explanation-toggle {
    background: var(--linen);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--dusty-rose);
    cursor: pointer;
    margin-left: auto;
    transition: all 0.3s ease;
}
.explanation-toggle:hover {
    background: var(--princess-pink);
}
.explanation-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--dark-text);
}
.explanation-content p {
    margin-bottom: 16px;
}
.explanation-content .highlight {
    background: linear-gradient(
        120deg,
        var(--princess-pink) 0%,
        var(--princess-pink) 100%
    );
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}
.explanation-content .number {
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    font-size: 1.1em;
    color: var(--dusty-rose);
}
.math-box {
    background: var(--linen);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--gold);
}
.math-box-title {
    font-weight: 600;
    color: var(--dusty-rose);
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.math-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--blush-beige);
    font-size: 0.95rem;
}
.math-row:last-child {
    border-bottom: none;
    font-weight: 600;
    color: var(--dusty-rose);
}
.math-row .label {
    color: var(--dark-text);
}
.math-row .value {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.1rem;
}
.analogy-box {
    background: linear-gradient(135deg, var(--princess-pink) 0%, white 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
}
.analogy-box::before {
    content: "💡";
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 1.5rem;
}
.analogy-box p {
    margin: 0;
    padding-left: 10px;
    font-style: italic;
}
.rule-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 5px;
}
.rule-indicator.active {
    background: rgba(124, 173, 133, 0.2);
    color: var(--flipped-on);
}
.rule-indicator.inactive {
    background: var(--linen);
    color: var(--light-text);
}
.step-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
}
.step-number {
    width: 36px;
    height: 36px;
    background: var(--dusty-rose);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}
.step-content {
    flex: 1;
}
.step-content h4 {
    color: var(--dusty-rose);
    margin-bottom: 5px;
}

.weights-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(173, 133, 124, 0.12);
    margin-bottom: 30px;
}
.weights-section h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.5rem;
    color: var(--dusty-rose);
    margin-bottom: 20px;
    text-align: center;
}
.weights-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    /*margin-left: -30px;*/
    /*margin-right: -30px;*/
}
.weight-card {
    background: var(--linen);
    border-radius: 12px;
    padding: 18px;
    border: 1px solid var(--princess-pink);
}
.weight-card.changed {
    background: rgba(124, 173, 133, 0.1);
    border-color: rgba(124, 173, 133, 0.3);
}
.weight-card-header {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dusty-rose);
    margin-bottom: 12px;
    text-align: center;
}
.weight-card-stats {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
}
.weight-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}
.weight-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--light-text);
    margin-bottom: 4px;
}
.weight-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-text);
}
.weight-value.final {
    color: var(--dusty-rose);
}
.weight-value .arrow {
    color: var(--flipped-on);
    font-weight: bold;
}

.action-plan {
    background: white;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(173, 133, 124, 0.12);
}
.action-plan h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.8rem;
    color: var(--dusty-rose);
    margin-bottom: 25px;
    text-align: center;
}
.action-item {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--linen);
    border-radius: 12px;
}
.action-icon {
    width: 50px;
    height: 50px;
    background: var(--dusty-rose);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.action-content h4 {
    font-size: 1rem;
    color: var(--dark-text);
    margin-bottom: 5px;
}
.action-content p {
    font-size: 0.9rem;
    color: var(--light-text);
}
.restart-section {
    text-align: center;
    padding: 40px 20px;
}
.btn-restart {
    padding: 16px 50px;
    background: var(--dusty-rose);
    color: white;
    border: none;
    border-radius: 30px;
    font-family: "Montserrat", sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-restart:hover {
    background: var(--blush-beige);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(173, 133, 124, 0.35);
}
.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--light-text);
    font-size: 0.85rem;
}
.footer a {
    color: var(--dusty-rose);
    text-decoration: none;
}
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }
    .section-card {
        padding: 25px;
    }
    .rating-scale {
        gap: 6px;
    }
    .rating-label {
        padding: 10px 14px;
        min-width: 55px;
    }
    .nav-tab {
        font-size: 0.75rem;
        padding: 10px 12px;
    }
    .results-grid {
        grid-template-columns: 1fr;
    }
    .lri-score {
        font-size: 4rem;
    }
    .step-indicator {
        flex-direction: column;
        text-align: center;
    }
}
@media print {
    .nav-tabs,
    .nav-buttons,
    .btn-restart,
    .restart-section,
    .explanation-toggle {
        display: none !important;
    }
    .results-container {
        display: block !important;
    }
    body {
        background: white;
    }
}
