/* -----------------------------
   Base Variables & Reset
----------------------------- */
:root {
    /* Main color scheme from requirements */
    --teal: #5490a0;
    --tan: #D2B48C;
    --gold: #f5c242;
    
    /* Expanded color palette */
    --teal-dark: #3a6b7a;
    --teal-light: #c3dae1;
    --tan-dark: #a08967;
    --tan-light: #f2e8dc;
    --gold-dark: #d4a323;
    --gold-light: #faefd0;
    
    /* Dosha specific colors */
    --vata-color: #8fb9c7;
    --pitta-color: #e2a849;
    --kapha-color: #8bae92;
    --vata-dark: #6c99a8;
    --pitta-dark: #b88934;
    --kapha-dark: #6e9075;
    --vata-light: #d9e8ee;
    --pitta-light: #f8e3bc;
    --kapha-light: #d8e6dc;
    
    /* Neutral colors */
    --white: #ffffff;
    --off-white: #f9f6f2;
    --light-gray: #e8e0d5;
    --text-dark: #324b45;
    --text-medium: #5d6e68;
    --text-light: #8a9a95;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-xxl: 5rem;
    
    /* Typography */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Poppins', sans-serif;
    
    /* Effects */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Animation */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--off-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    background-image: linear-gradient(120deg, var(--tan-light) 0%, var(--off-white) 100%);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: var(--font-body);
    border: none;
    background: none;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--teal-dark);
}

/* -----------------------------
   Decorative Elements
----------------------------- */
.decorative-element {
    position: absolute;
    width: 300px;
    height: 300px;
    opacity: 0.08;
    z-index: -1;
    background-repeat: no-repeat;
    background-size: contain;
}

.top-left {
    top: -100px;
    left: -100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 24 24' fill='none' stroke='%235490a0' stroke-width='0.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a9 9 0 0 0-9 9c0 3.5 2 6.5 5 8h8c3-1.5 5-4.5 5-8a9 9 0 0 0-9-9Z'%3E%3C/path%3E%3Cpath d='M12 20v-7.5'%3E%3C/path%3E%3Cpath d='M7.5 15.5 12 12l4.5 3.5'%3E%3C/path%3E%3C/svg%3E");
    transform: scale(5) rotate(-15deg);
}

.bottom-right {
    bottom: -100px;
    right: -100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 24 24' fill='none' stroke='%23D2B48C' stroke-width='0.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 7.5a4.5 4.5 0 1 0 4.5 4.5H12V7.5Z'%3E%3C/path%3E%3Cpath d='M12 7.5A4.5 4.5 0 1 1 7.5 12H12V7.5Z'%3E%3C/path%3E%3Cpath d='M12 7.5A4.5 4.5 0 0 0 7.5 12'%3E%3C/path%3E%3Cpath d='M12 7.5A4.5 4.5 0 0 1 16.5 12'%3E%3C/path%3E%3C/svg%3E");
    transform: scale(6) rotate(15deg);
}

/* -----------------------------
   Layout & Structure
----------------------------- */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md);
    min-height: calc(100vh - 60px);
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
    margin-bottom: var(--space-lg);
}

.logo-container {
    max-width: 180px;
}

.logo-image {
    width: 100%;
    height: auto;
}

.site-footer {
    text-align: center;
    padding: var(--space-md);
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-top: var(--space-xl);
}

.welcome-screen,
.quiz-screen,
.results-screen {
    opacity: 0;
    display: none;
    transition: opacity var(--transition-medium);
}

.welcome-screen.active,
.quiz-screen.active,
.results-screen.active {
    opacity: 1;
    display: block;
    animation: fadeIn var(--transition-slow) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* -----------------------------
   Loading & Spinner
----------------------------- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--off-white);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity var(--transition-medium), visibility var(--transition-medium);
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.lotus-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-md);
}

.lotus-petal {
    position: absolute;
    width: 25px;
    height: 25px;
    background-color: var(--teal-light);
    border-radius: 50% 50% 0 50%;
    transform-origin: bottom right;
    animation: rotate 2s infinite linear;
}

.lotus-petal:nth-child(1) { transform: rotate(0deg); animation-delay: -0.0s; }
.lotus-petal:nth-child(2) { transform: rotate(60deg); animation-delay: -0.3s; }
.lotus-petal:nth-child(3) { transform: rotate(120deg); animation-delay: -0.6s; }
.lotus-petal:nth-child(4) { transform: rotate(180deg); animation-delay: -0.9s; }
.lotus-petal:nth-child(5) { transform: rotate(240deg); animation-delay: -1.2s; }
.lotus-petal:nth-child(6) { transform: rotate(300deg); animation-delay: -1.5s; }

.lotus-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-color: var(--gold);
    border-radius: 50%;
}

@keyframes rotate {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.loading-text {
    color: var(--teal);
    font-size: 1.2rem;
    margin-top: var(--space-md);
}

/* -----------------------------
   Language Selector
----------------------------- */
.language-selector {
    display: flex;
    gap: var(--space-sm);
}

.language-btn {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--white);
    color: var(--text-medium);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.language-btn:hover {
    background-color: var(--tan-light);
}

.language-btn.active {
    background-color: var(--teal);
    color: var(--white);
}

/* -----------------------------
   Welcome Screen
----------------------------- */
.welcome-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.main-title {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    color: var(--teal-dark);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sub-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-xl);
    color: var(--gold-dark);
    font-weight: 500;
}

.intro-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.intro-text {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.doshas-overview {
    margin-bottom: var(--space-xl);
}

.doshas-title {
    margin-bottom: var(--space-lg);
    font-size: 1.8rem;
    color: var(--teal-dark);
}

.doshas-cards {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

.prakriti-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-lg);
    flex: 1;
    min-width: 220px;
    max-width: 300px;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.prakriti-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.prakriti-card.vata {
    border-top: 5px solid var(--vata-color);
}

.prakriti-card.pitta {
    border-top: 5px solid var(--pitta-color);
}

.prakriti-card.kapha {
    border-top: 5px solid var(--kapha-color);
}

.prakriti-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.prakriti-icon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prakriti-card h3 {
    font-size: 1.4rem;
    margin-bottom: var(--space-md);
    color: var(--text-dark);
}

.prakriti-card p {
    font-size: 0.95rem;
    text-align: center;
    color: var(--text-medium);
    margin-bottom: 0;
}

.start-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--teal);
    color: var(--white);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.start-button:hover {
    background-color: var(--teal-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.arrow-icon {
    width: 20px;
    height: 20px;
    margin-left: var(--space-sm);
}

/* -----------------------------
   Quiz Screen
----------------------------- */
.quiz-header {
    margin-bottom: var(--space-xl);
}

.progress-container {
    max-width: 700px;
    margin: 0 auto;
}

.progress-bar {
    height: 8px;
    background-color: var(--light-gray);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--tan), var(--gold), var(--teal));
    width: 0;
    border-radius: var(--radius-full);
    transition: width var(--transition-medium);
}

.question-count {
    text-align: center;
    font-size: 1rem;
    color: var(--text-medium);
}

.question-container {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 900px;
    margin: 0 auto var(--space-xl);
    box-shadow: var(--shadow-md);
}

.question-text {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: var(--space-xl);
    color: var(--teal-dark);
}

.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    justify-content: center;
}

.option {
    background-color: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    width: 100%;
    max-width: 240px;
    cursor: pointer;
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.option:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.option.selected {
    border-color: var(--teal);
    background-color: var(--teal-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.option-image {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.option-text {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background-color: var(--white);
    color: var(--text-dark);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 1rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.prev-button {
    padding-left: var(--space-md);
}

.next-button {
    padding-right: var(--space-md);
    background-color: var(--teal);
    color: var(--white);
}

.nav-button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.next-button:not(:disabled):hover {
    background-color: var(--teal-dark);
}

.nav-icon {
    width: 16px;
    height: 16px;
}

/* -----------------------------
   Results Screen
----------------------------- */
.results-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: var(--space-xl);
    color: var(--teal-dark);
}

.results-content {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    justify-content: center;
}

.results-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    flex: 1;
    min-width: 300px;
}

.chart-card {
    max-width: 450px;
}

.interpretation-card {
    max-width: 600px;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    color: var(--teal-dark);
    text-align: center;
}

.chart-container {
    width: 100%;
    height: 300px;
    margin: 0 auto;
}

.interpretation-text {
    font-size: 1.1rem;
    margin-bottom: var(--space-lg);
    color: var(--text-dark);
}

.result-doshas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
}

.restart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    background-color: var(--teal);
    color: var(--white);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    margin: var(--space-xl) auto 0;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.restart-button:hover {
    background-color: var(--teal-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.restart-icon {
    width: 18px;
    height: 18px;
}

/* -----------------------------
   Responsive Design
----------------------------- */

@media (max-width: 900px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .sub-title {
        font-size: 1.3rem;
    }
    
    .intro-card {
        padding: var(--space-lg);
    }
    
    .question-text {
        font-size: 1.5rem;
    }
    
    .results-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .sub-title {
        font-size: 1.2rem;
        margin-bottom: var(--space-lg);
    }
    
    .prakriti-card {
        min-width: 100%;
    }
    
    .question-container {
        padding: var(--space-lg);
    }
    
    .option {
        max-width: 100%;
    }
    
    .options-container {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
    }
    
    .sub-title {
        font-size: 1.1rem;
    }
    
    .intro-card {
        padding: var(--space-md);
    }
    
    .intro-text {
        font-size: 1rem;
    }
    
    .question-text {
        font-size: 1.3rem;
    }
    
    .results-title {
        font-size: 1.6rem;
    }
    
    .option-image {
        height: 130px;
    }
}

/* -----------------------------
   Animations & Effects
----------------------------- */

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

.fade-in {
    opacity: 0;
    animation: fadeIn var(--transition-slow) forwards;
}

.fade-in-delay-1 {
    animation-delay: 0.2s;
}

.fade-in-delay-2 {
    animation-delay: 0.4s;
}

.fade-in-delay-3 {
    animation-delay: 0.6s;
}
