:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --card-bg: #ffffff;
    --border-color: #000000;
    --border-width: 2px;
    --shadow-offset: 4px;

    /* Pastel Palette */
    --yellow-accent: #FEF08A;
    /* Attraction */
    --green-accent: #BBF7D0;
    /* Growth */
    --purple-accent: #E9D5FF;
    /* Longevity */

    --primary-btn-bg: #000000;
    --primary-btn-text: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 1000px;
    /* Wider for the 3-column layout */
    padding: 2rem 1rem;
    text-align: center;
}

/* Header */
header {
    margin-bottom: 3rem;
    padding: 1rem;
    border: var(--border-width) solid var(--border-color);
    background-color: var(--yellow-accent);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--border-color);
    display: inline-block;
    /* Shrink to fit content */
    width: 100%;
    max-width: 600px;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Hero Section (Yellow Theme) */
.hero {
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.input-group {
    background: var(--card-bg);
    padding: 1.5rem;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input {
    background: #f8fafc;
    border: var(--border-width) solid var(--border-color);
    color: var(--text-color);
    padding: 1rem;
    font-size: 1.1rem;
    outline: none;
    width: 100%;
    text-align: center;
    font-weight: 600;
}

input:focus {
    background: #ffffff;
    box-shadow: 2px 2px 0px var(--border-color);
}

.btn-orange {
    background: var(--primary-btn-bg);
    color: var(--primary-btn-text);
    border: var(--border-width) solid var(--border-color);
    padding: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.1s;
}

.btn-orange:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px var(--border-color);
    background: #333;
}

.btn-orange:active {
    transform: translate(0, 0);
    box-shadow: none;
}

/* Results Section (Green Theme) */
.results-section {
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

.glass-card {
    background: var(--green-accent);
    /* Green for Growth */
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--border-color);
    padding: 2rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: var(--border-width) solid var(--border-color);
}

.score-circle-small {
    width: 80px;
    height: 80px;
    position: relative;
}

.circular-chart {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.circle-bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.1);
    stroke-width: 3;
}

.circle {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out;
    stroke: #000;
    /* Default black, JS overrides */
}

#scoreValue {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 800;
}

.score-text h2 {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
    font-weight: 800;
}

.small-note {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Badges */
.badge-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    border: var(--border-width) solid var(--border-color);
    background: #fff;
    box-shadow: 2px 2px 0px var(--border-color);
}

.badge-green {
    background: #dcfce7;
}

.badge-gold {
    background: #fef9c3;
}

.badge-text strong {
    font-size: 1rem;
    color: black;
}

.badge-text span {
    font-size: 0.8rem;
    color: #444;
}

/* CTA Block */
.cta-block h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 800;
}

.plan-features {
    list-style: none;
    margin-bottom: 1.5rem;
    text-align: left;
    padding-left: 1rem;
    background: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border: 1px solid black;
}

.plan-features li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #000;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-btn-bg);
    color: var(--primary-btn-text);
    border: var(--border-width) solid var(--border-color);
    padding: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: transform 0.1s;
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px var(--border-color);
}

/* Advanced Scan Section (inside result card) */
.advanced-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed rgba(0,0,0,0.3);
}

.advanced-card {
    background: #BFDBFE !important;
    margin-top: 1.5rem;
}

.advanced-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid black;
}

.advanced-header .card-emoji {
    font-size: 2rem;
}

.advanced-header h3 {
    font-size: 1.4rem;
    font-weight: 900;
    text-transform: uppercase;
    margin: 0;
}

.advanced-subtitle {
    font-size: 0.95rem;
    font-style: italic;
    color: #333;
    margin: 0;
}

.advanced-intro {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    color: #222;
    font-weight: 500;
}

.advanced-features {
    background: rgba(255, 255, 255, 0.7) !important;
}

.advanced-features li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.enhanced-score-note {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.2rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.5);
    border: 2px dashed black;
}

.btn-advanced {
    background: #2563EB;
    color: white;
    border: 3px solid var(--border-color);
    padding: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    font-size: 1.1rem;
    transition: transform 0.1s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-advanced:hover {
    transform: translate(-3px, -3px);
    box-shadow: 6px 6px 0px var(--border-color);
    background: #1D4ED8;
}

/* How It Works Section */
.how-it-works {
    margin-top: 4rem;
    margin-bottom: 4rem;
    padding: 0 1rem;
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    border: 3px solid black;
    display: inline-block;
    padding: 0.8rem 2rem;
    background: #fff;
    box-shadow: 6px 6px 0px black;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    color: #555;
    font-weight: 500;
}

.scan-cards {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
}

.scan-card {
    flex: 1;
    min-width: 300px;
    max-width: 340px;
    border: 3px solid var(--border-color);
    padding: 1.8rem;
    box-shadow: 6px 6px 0px var(--border-color);
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.scan-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0px var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-emoji {
    font-size: 1.8rem;
}

.card-number {
    background: black;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.scan-card h3 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.card-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    font-style: italic;
    opacity: 0.8;
}

.card-intro {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    color: #222;
    padding-bottom: 1rem;
    border-bottom: 2px dashed rgba(0,0,0,0.2);
}

.scan-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    flex-grow: 1;
}

.scan-card li {
    margin-bottom: 0.7rem;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.scan-card li .check {
    flex-shrink: 0;
    font-size: 1rem;
}

.card-result {
    margin-top: 1.2rem;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.6);
    border: 2px solid black;
    font-size: 0.9rem;
    text-align: center;
}

.result-levels {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem !important;
}

.level {
    padding: 0.3rem 0.8rem;
    border: 2px solid black;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.level-low {
    background: #BBF7D0;
}

.level-medium {
    background: var(--yellow-accent);
}

.level-high {
    background: #FECACA;
}

/* Card Colors */
.card-yellow {
    background-color: var(--yellow-accent);
}

.card-green {
    background-color: var(--green-accent);
}

.card-purple {
    background-color: var(--purple-accent);
}

.card-blue {
    background-color: #BFDBFE;
}

@media (max-width: 900px) {
    .scan-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .scan-card {
        max-width: 100%;
        width: 100%;
    }
    
    .section-title {
        font-size: 1.6rem;
        padding: 0.6rem 1.2rem;
    }
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    padding: 2rem;
    border-top: var(--border-width) solid var(--border-color);
    text-align: center;
    font-size: 0.9rem;
    background: #f1f5f9;
    width: 100%;
}

.site-footer a {
    color: black;
    font-weight: 700;
    text-decoration: underline;
}

/* Utilities */
.hidden {
    display: none !important;
}

.loader {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-left-color: black;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.modal:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border: 2px solid black;
    box-shadow: 8px 8px 0px black;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close-modal {
    color: black;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}