:root {
    /* Color Palette */
    --primary: #8b9d83; /* Soft Sage Green */
    --primary-light: #a4b39e;
    --primary-dark: #6e7f67;
    --secondary: #e6dac3; /* Warm Beige */
    --accent: #d4a373; /* Soft Terracotta */
    --bg-color: #fcfbf9; /* Off-white / Cream */
    --text-main: #2b302c; /* Very Dark Green/Gray */
    --text-muted: #6b726c;
    
    /* UI Elements */
    --card-bg: rgba(255, 255, 255, 0.9);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 8px 24px rgba(139, 157, 131, 0.1);
    --shadow-lg: 0 16px 40px rgba(139, 157, 131, 0.15);
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent body scroll, use internal view scroll */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: 
        radial-gradient(at 0% 0%, rgba(139, 157, 131, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(230, 218, 195, 0.4) 0px, transparent 50%);
    background-attachment: fixed;
}

h1, h2, h3, .logo {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.logo {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    font-weight: 700;
}

.app-container {
    width: 100%;
    height: 100%; /* Full height on mobile */
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

@media (min-width: 768px) {
    .app-container {
        width: 95%;
        max-width: 1200px;
        height: 90vh;
        border-radius: 28px;
        box-shadow: var(--shadow-lg);
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        overflow: hidden;
    }
}

/* Views */
.view {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateY(10px);
    overflow-y: auto;
    width: 100%;
    flex: 1;
    padding: 1.5rem; /* Essential for mobile app feel */
}

@media (min-width: 768px) {
    .view {
        padding: 3rem;
    }
}

.view.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

#landing-page {
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    height: 100%;
}

@media (min-width: 768px) {
    #landing-page {
        padding: 4rem 6rem 3rem 6rem;
    }
}

.landing-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    width: 100%;
}

@media (min-width: 768px) {
    .landing-content {
        flex-direction: row;
        text-align: left;
        gap: 6rem;
    }
}

.landing-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 2rem;
}

.hero {
    flex: 1;
    max-width: 520px;
    z-index: 2;
}

.hero h2 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
}

@media (min-width: 768px) {
    .hero h2 {
        font-size: 3rem;
    }
}

.hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    position: relative;
    height: 280px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0;
}

@media (min-width: 768px) {
    .hero-image {
        height: 500px;
        margin-top: 0;
    }
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: float 8s infinite alternate ease-in-out;
}

.orb-1 {
    width: 280px;
    height: 280px;
    background: var(--primary);
    top: 10%;
    left: 15%;
}

.orb-2 {
    width: 240px;
    height: 240px;
    background: var(--secondary);
    bottom: 5%;
    right: 15%;
    animation-delay: -4s;
}

.hero-card {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2rem;
    animation: float-slight 6s infinite alternate ease-in-out;
}

.hero-card i {
    color: var(--accent);
    font-size: 1.5rem;
}

.hero-card span {
    font-weight: 600;
    font-size: 1.1rem;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, -40px) scale(1.15); }
}

@keyframes float-slight {
    0% { transform: translateY(0); }
    100% { transform: translateY(-15px); }
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1.2rem 2.8rem;
    font-size: 1.15rem;
    border-radius: 40px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 8px 20px rgba(139, 157, 131, 0.3);
    position: relative;
    overflow: hidden;
    width: 100%; /* Full width on mobile */
    max-width: 400px;
}

@media (min-width: 768px) {
    .btn-primary {
        width: auto;
    }
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(139, 157, 131, 0.4);
}

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

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.btn-primary:hover::after {
    transform: scale(1);
}

.btn-secondary {
    background: var(--text-main);
    color: white;
    border: none;
    padding: 1.1rem 2.8rem;
    font-size: 1.15rem;
    border-radius: 40px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Center the text */
    gap: 0.8rem;
}

.btn-secondary:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary:not(:disabled):hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1.5px solid var(--text-main);
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    background: var(--text-main);
    color: white;
}

.icon-btn {
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.05);
    font-size: 1.2rem;
    color: var(--text-main);
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
    background: white;
    transform: translateX(-3px);
    box-shadow: var(--shadow-md);
}

/* Quiz Page */
#quiz-page {
    padding: 2rem;
    max-width: 850px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 768px) {
    #quiz-page {
        padding: 4rem 2rem;
    }
}

.quiz-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(139, 157, 131, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 4px;
}

#question-counter {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

.quiz-container {
    flex: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#question-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    text-align: center;
}

@media (min-width: 768px) {
    #question-title {
        font-size: 2.2rem;
    }
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

@media (min-width: 600px) {
    .options-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.option-card {
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
    text-align: center;
}

.option-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: white;
}

.option-card.selected {
    border-color: var(--primary);
    background: rgba(139, 157, 131, 0.05);
    box-shadow: 0 4px 15px rgba(139, 157, 131, 0.15);
    transform: scale(1.02);
}

.option-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.option-card:hover .option-icon, .option-card.selected .option-icon {
    transform: scale(1.1);
}

.option-title {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-main);
}

.option-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.quiz-footer {
    position: sticky;
    bottom: 1.5rem;
    display: flex;
    justify-content: center;
    margin-top: auto;
    z-index: 10;
    pointer-events: none; /* Allows clicking through the empty space around the button */
}

.quiz-footer button {
    pointer-events: auto;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Loading Page */
#loading-page {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.8rem;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 4px solid rgba(139, 157, 131, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

#loading-text {
    font-size: 2rem;
    color: var(--text-main);
}

.loading-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

/* Results Page */
#results-page {
    padding: 2rem;
    max-width: 1050px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    #results-page {
        padding: 3rem;
    }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 1.5rem;
}

.results-header .logo {
    margin-bottom: 0;
}

.profile-card {
    padding: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.profile-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--primary);
    color: white;
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 1rem 0 1.5rem;
    box-shadow: 0 4px 10px rgba(139, 157, 131, 0.3);
}

.result-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.section-title {
    margin: 2.5rem 0 1.8rem;
    font-size: 1.6rem;
    position: relative;
    display: inline-block;
    color: var(--text-main);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* Routine Steps */
.routine-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .routine-steps {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.step-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
}

.step-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    background: white;
}

.step-number {
    background: rgba(139, 157, 131, 0.15);
    color: var(--primary-dark);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.step-content h4 {
    margin-bottom: 0.3rem;
    color: var(--text-main);
    font-size: 1.1rem;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03);
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    background: white;
}

.product-img {
    height: 220px;
    background: rgba(139, 157, 131, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-img i {
    font-size: 4.5rem;
    color: rgba(139, 157, 131, 0.2);
    transition: var(--transition);
}

.product-card:hover .product-img i {
    transform: scale(1.15);
    color: var(--primary-light);
}

.product-info {
    padding: 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-type {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.product-name {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.product-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 1.5rem;
}

.product-price {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price::after {
    content: '\f061';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1rem;
    color: var(--primary);
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition);
}

.product-card:hover .product-price::after {
    opacity: 1;
    transform: translateX(0);
}
