:root {
    --primary-color: #4B0082; /* Deep Indigo/Purple */
    --primary-dark: #2a004e;
    --primary-light: #7b4397;
    --accent-gold: #D4AF37;
    --accent-gold-hover: #b5922b;
    --text-main: #2D1B4E;
    --text-light: #665b7d;
    --white: #ffffff;
    --bg-light: #f8f5fa;
    --success: #28a745;
    --error: #dc3545;
    
    --font-main: 'Outfit', sans-serif;
    
    --transition-speed: 0.3s;
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    
    --shadow-sm: 0 4px 6px rgba(45, 27, 78, 0.05);
    --shadow-md: 0 10px 15px rgba(45, 27, 78, 0.1);
    --shadow-lg: 0 20px 25px rgba(45, 27, 78, 0.15);
    
    --animation-duration: 0.6s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, #fdfbfd 0%, #f3f0ff 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

#app {
    width: 100%;
    max-width: 600px; /* Mobile-first approach constraint for larger screens */
    min-height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-2xl); 
    display: flex;
    flex-direction: column;
    position: relative;
}

@media (min-width: 601px) {
    #app {
        min-height: auto;
        margin: 20px auto;
        border-radius: var(--border-radius-lg);
        height: min(90vh, 800px);
        overflow: hidden;
        box-shadow: var(--shadow-lg);
    }

    body {
        align-items: center;
        background: radial-gradient(circle at top right, #eaddff 0%, #ffffff 50%, #fdfbfd 100%);
    }
}

/* Header & Progress */
.main-header {
    padding: 20px;
    width: 100%;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: #e0d8ef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color));
    width: 0%;
    transition: width 0.5s ease-in-out;
    border-radius: 10px;
}

/* Main Content */
.funnel-container {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    /* overflow-y: auto; */
    overflow-y: scroll;
    padding-bottom: 80px; /* Space for fixed buttons if needed */
    scrollbar-width: none; /* Hide scrollbar Firefox */
}

.funnel-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

/* Typography */
h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

h2 {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.5;
}

p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-main);
}

/* Components: Options */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-card {
    background: var(--white);
    border: 1px solid #e0d8ef;
    border-radius: var(--border-radius-md);
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.option-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: #fcfaff;
}

.option-card.selected {
    border-color: var(--primary-color);
    background-color: #f3f0ff;
    color: var(--primary-color);
    font-weight: 600;
}

.option-card.selected::after {
    content: ''; /* Checkmark could go here */
}

/* Multi-select styling */
.multi-select-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-style: italic;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), #c9a022);
    color: var(--white);
    border: none;
    padding: 16px 32px;
    border-radius: var(--border-radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 24px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    filter: brightness(1.05);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #e0e0e0;
    color: #a0a0a0;
    cursor: not-allowed;
    box-shadow: none;
}

/* Inputs */
.input-field {
    width: 100%;
    padding: 16px;
    border: 2px solid #e0d8ef;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-family: var(--font-main);
    transition: border-color 0.3s ease;
    outline: none;
}

.input-field:focus {
    border-color: var(--primary-color);
}

/* Animations */
.animate-enter {
    animation: fadeInUp var(--animation-duration) cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.animate-enter-delay-1 {
    animation: fadeInUp var(--animation-duration) cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    opacity: 0;
}

.animate-enter-delay-2 {
    animation: fadeInUp var(--animation-duration) cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Footer */
.main-footer {
    padding: 10px;
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    background: var(--white);
}

/* Illustrations & Icons */
.step-icon {
    font-size: 3rem;
    color: var(--primary-light);
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.step-icon svg {
    width: 64px;
    height: 64px;
}

/* Word Cloud for Steps 36-39 */
.word-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.word-chip {
    padding: 10px 18px;
    background: var(--bg-light);
    border: 1px solid #dcdcdc;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.word-chip.selected {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

/* Loading Screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(75, 0, 130, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Popups / Upsells */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 27, 78, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(5px);
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 400px;
    padding: 30px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    position: relative;
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    background: transparent;
    border: none;
    color: var(--text-light);
    text-decoration: underline;
    cursor: pointer;
    padding: 10px;
    font-size: 0.9rem;
}

.special-offer-price {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 10px 0;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
}
