/* ==================== GLOBAL STYLES & RESET ==================== */
:root {
    --bg-color: #FAF9FC;
    --surface-color: #ffffff;
    
    /* Brand Colors (Amethyst / Lavender theme) */
    --primary-color: #8b7ec8;
    --primary-hover: #7365b4;
    --primary-light: #f3f1fa;
    --accent-cta: #e09953;
    --accent-cta-hover: #cb843e;
    
    /* Text Colors */
    --text-color: #2c293d;
    --text-muted: #74708a;
    --text-light: #a3a0b5;
    
    /* UI Borders and Shadows */
    --border-color: rgba(139, 126, 200, 0.16);
    --border-hover: #8b7ec8;
    --shadow-soft: 0 20px 45px rgba(42, 34, 69, 0.06);
    --shadow-hover: 0 24px 60px rgba(42, 34, 69, 0.12);
    
    /* Corners */
    --radius-lg: 32px;
    --radius-md: 22px;
    --radius-sm: 16px;
    --radius-pill: 100px;
}

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

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #B5B8B1; /* Agate Gray - Colorhouse Metal .03 */
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 60px;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Floating background orbs (Aesthetic context) */
.bg-atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
    animation: floatOrb 22s ease-in-out infinite;
}

.bg-orb-1 {
    width: 450px;
    height: 450px;
    background: #6b6d6a; /* Dark Agate */
    top: -10%;
    left: -15%;
    animation-duration: 25s;
}

.bg-orb-2 {
    width: 380px;
    height: 380px;
    background: #8b7ec8; /* Soft Violet accent */
    top: 50%;
    right: -10%;
    animation-delay: -6s;
    animation-duration: 20s;
}

.bg-orb-3 {
    width: 300px;
    height: 300px;
    background: #d4af37; /* Soft Gold */
    bottom: -5%;
    left: 20%;
    animation-delay: -12s;
    animation-duration: 28s;
}

.bg-orb-4 {
    width: 250px;
    height: 250px;
    background: #ff7b90; /* Warm Rose Pink */
    top: 25%;
    left: 55%;
    animation-delay: -4s;
    animation-duration: 18s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.06); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, .main-title, .res-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    color: var(--text-color);
}

/* ==================== LAYOUT CONTAINER ==================== */
.container {
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    padding: 24px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* ==================== PROGRESS BAR ==================== */
.progress-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    z-index: 100;
    display: none; /* Controlled via JS */
}

.progress-wrap.visible {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 100%;
    position: relative;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #b3a7eb, var(--primary-color));
    border-radius: 0 3px 3px 0;
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 0 10px rgba(139, 126, 200, 0.4);
}

/* ==================== LOADING OVERLAY ==================== */
.loader-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(246, 247, 251, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.loader-overlay.on {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--primary-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

.ldtxt {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== SCREENS ==================== */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 16px 28px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7365b4 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(139, 126, 200, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #998de3 0%, var(--primary-hover) 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(139, 126, 200, 0.38);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-cta {
    background: linear-gradient(135deg, #1a162b 0%, #2a2245 100%);
    color: #ffffff;
    font-size: 1rem;
    padding: 18px 32px;
    box-shadow: 0 8px 25px rgba(42, 34, 69, 0.22);
}

.btn-cta:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7365b4 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(139, 126, 200, 0.38);
}

.btn-cta svg {
    margin-right: 4px;
}

.btn-restart {
    background-color: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    width: 100%;
    margin-top: 24px;
    padding: 14px 24px;
}

.btn-restart:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    margin-bottom: 20px;
}

.badge .dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: inline-block;
}

/* ==================== MAIN WELCOME SCREEN ==================== */
.main-title {
    font-size: clamp(2.2rem, 8vw, 3rem);
    line-height: 1.15;
    margin-bottom: 12px;
}

.sub-title {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

.form-card {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    box-shadow: var(--shadow-soft);
}

.input-group {
    margin-bottom: 24px;
    text-align: left;
}

.input-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.input-field {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1.5px solid rgba(139, 126, 200, 0.18);
    color: var(--text-color);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.98rem;
    font-weight: 500;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    outline: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.input-field::placeholder {
    color: var(--text-light);
}

.input-field:focus {
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 8px 20px rgba(139, 126, 200, 0.12), 0 0 0 4px rgba(139, 126, 200, 0.18);
}

/* Custom Select */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 52%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-color: var(--text-muted);
    clip-path: polygon(100% 0%, 0 0%, 50% 100%);
    pointer-events: none;
}

.select-field {
    appearance: none;
    padding-right: 40px;
    cursor: pointer;
}

/* Arrow Icon on Registration Button */
.arrow-icon {
    transition: transform 0.2s ease;
}

.btn:hover .arrow-icon {
    transform: translateX(4px);
}

/* ==================== QUIZ SCREEN ==================== */
.quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    height: 40px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--surface-color);
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.btn-back:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.step-counter {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.q-card {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-lg);
    padding: 44px 34px;
    box-shadow: var(--shadow-soft);
}

.q-badge {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.q-text {
    font-size: clamp(1.45rem, 5.5vw, 1.9rem);
    line-height: 1.35;
    margin-bottom: 32px;
    font-weight: 800; /* Extra bold for visibility */
    color: #1a162b; /* Deep plum/amethyst */
    letter-spacing: -0.015em;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-textarea {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1.5px solid rgba(139, 126, 200, 0.18);
    color: var(--text-color);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.98rem;
    font-weight: 500;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    outline: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    resize: vertical;
    min-height: 120px;
    margin-bottom: 8px;
}

.answer-textarea:focus {
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 8px 20px rgba(139, 126, 200, 0.12), 0 0 0 4px rgba(139, 126, 200, 0.18);
}


/* ==================== ANSWER OPTIONS (PILLS) ==================== */
.btn-option {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(139, 126, 200, 0.16);
    border-radius: var(--radius-md);
    padding: 16px 22px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    line-height: 1.45;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
}

.btn-option:hover {
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px) scale(1.005);
    box-shadow: 0 10px 24px rgba(139, 126, 200, 0.08);
}

.btn-option.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7365b4 100%);
    border-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(139, 126, 200, 0.28);
    transform: translateY(-1px);
}

/* Styled option letters */
.btn-option strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: rgba(139, 126, 200, 0.12);
    color: var(--primary-color);
    border-radius: 50%;
    margin-right: 14px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-option:hover strong {
    background-color: var(--primary-light);
}

.btn-option.selected strong {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* ==================== RESULTS SCREEN ==================== */
.res-card {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-lg);
    padding: 44px 34px 34px;
    box-shadow: var(--shadow-soft);
}

.res-badge-wrap {
    text-align: center;
    margin-bottom: 18px;
}

.res-badge {
    display: inline-block;
    background-color: rgba(139, 126, 200, 0.12);
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(139, 126, 200, 0.2);
}

.res-title {
    font-size: clamp(2rem, 7vw, 2.6rem);
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.2;
}

.res-body-text {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #434054;
    margin-bottom: 32px;
    white-space: pre-line;
}

.res-body-text ul {
    margin: 12px 0 12px 20px;
}

.res-body-text li {
    margin-bottom: 6px;
}

/* Score stats details */
.stats-breakdown {
    background-color: var(--bg-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.stats-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-item {
    font-size: 0.9rem;
    color: var(--text-color);
}

.stat-item strong {
    color: var(--primary-color);
}

/* ==================== CTA BOX (COURSE DETAILS) ==================== */
.cta-box {
    background-color: #FAF9FC;
    border-radius: var(--radius-md);
    padding: 30px 24px;
    border: 1.5px dashed var(--primary-color);
    margin-top: 36px;
    text-align: left;
}

.cta-header {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
    margin-bottom: 16px;
    text-transform: uppercase;
    text-align: center;
}

.cta-intro {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 12px;
}

.cta-wounds-list {
    list-style: none;
    margin-bottom: 20px;
    padding-left: 4px;
}

.cta-wounds-list li {
    font-size: 0.92rem;
    margin-bottom: 6px;
    color: #4a475d;
}

.cta-wounds-list li strong {
    color: var(--primary-color);
}

.cta-full-woman {
    font-size: 0.92rem;
    line-height: 1.65;
    background-color: var(--surface-color);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    color: #4a475d;
}

.cta-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 20px 0;
}

.cta-offer {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.5;
}

.cta-course-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-color);
    margin-bottom: 18px;
}

.cta-action-text {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 4px;
}

.promo-word {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    letter-spacing: 6px;
    margin-bottom: 22px;
    font-family: 'DM Sans', sans-serif;
    text-shadow: 0 3px 10px rgba(139, 126, 200, 0.15);
}

/* ==================== RESPONSIVE TUNING ==================== */
@media (max-width: 600px) {
    body {
        padding-bottom: 30px;
    }
    
    .container {
        padding: 12px 10px;
    }
    
    .form-card, .q-card, .res-card {
        padding: 28px 20px;
        border-radius: var(--radius-md);
    }
    
    .btn {
        padding: 14px 22px;
    }
    
    .btn-option {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    
    .res-title {
        font-size: 1.8rem;
    }
    
    .cta-box {
        padding: 20px 16px;
    }
    
    .promo-word {
        font-size: 1.8rem;
        letter-spacing: 4px;
    }
}
