:root {
    --primary-burnt-orange: #e0793a;
    /* Brighter orange from screenshot */
    --dark-burnt-orange: #e0793a;
    --primary-teal: #006666;
    /* Updated to user request */
    /* Teal from screenshot */
    --dark-teal: #006666;
    /* Updated to user request */
    /* Darker teal for text */
    --light-teal-bg: #E0F2F1;
    /* Light teal for slider value */
    --bg-color: #F9F9F9;
    --text-color: #006666;
    /* Updated to user request */
    --card-bg: #FFFFFF;
    --light-gray: #E0E0E0;
    --font-family-sans: 'Outfit', sans-serif;
    --font-family-serif: 'Georgia', serif;
    /* Using Georgia as a fallback for the serif font in screenshot */
}

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

body {
    font-family: var(--font-family-sans);
    background-color: #FDFBF7;
    /* Cream background for the whole page */
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    background-color: white;
    padding: 1.35rem 2rem;
    /* Stronger shadow */
    border-bottom: none;
    position: relative;
    /* Needed for absolute positioning of mobile menu */
}

.header-container {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    /* Increased size slightly */
    color: var(--dark-teal);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: Georgia, 'Times New Roman', Times, serif;
    /* User requested serif font */
    text-decoration: none;
}

.logo img {
    height: 50px;
    /* Adjust based on standard logo sizes */
    width: auto;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--dark-teal);
    margin-left: 2.4rem;
    font-size: 1.4rem;
    font-weight: 600;
    transition: color 0.2s;
    font-family: 'AR One Sans', sans-serif;
}

.desktop-nav a.active {
    color: var(--primary-burnt-orange);
}

.desktop-nav a:hover {
    color: var(--primary-burnt-orange);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--dark-teal);
    cursor: pointer;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

.page-title {
    font-family: var(--font-family-serif);
    color: var(--dark-teal);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
    text-align: center;
    font-family: var(--font-family-sans);
}

.progress-indicator {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
    text-align: center;
    /* display: none; Removed - User wants to see steps now */
}

.card-container {
    background-color: #FFFFFF;
    /* White cards */
    width: 100%;
    max-width: 500px;
    /* Decreased width for "normal" look */
    padding: 3rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
}

/* Results Section Styling */
#results-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.results-card {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 800px;
    padding: 3rem 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
    margin-bottom: 2rem;
}

/* Quiz Section */
.icon-wrapper {
    font-size: 3rem;
    color: var(--primary-burnt-orange);
    margin-bottom: 1.5rem;
}

h2 {
    font-family: var(--font-family-serif);
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-teal);
    line-height: 1.3;
}

/* Selection Grid */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns */
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.selection-card {
    background-color: #fff;
    border: 1px solid #EBEBEB;
    /* Softer border */
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    /* Stack icon and text */
    align-items: center;
    justify-content: center;
    min-height: 140px;
    /* Taller for icon */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.selection-card-icon {
    font-size: 1.8rem;
    color: var(--primary-burnt-orange);
    margin-bottom: 0.8rem;
}

.selection-card-icon-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.selection-card-text {
    font-family: var(--font-family-sans);
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.2;
}

.selection-card:hover {
    border-color: var(--primary-teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.selection-card.selected {
    border: 2px solid var(--primary-teal);
    background-color: #E0F2F1;
    color: var(--dark-teal);
    box-shadow: 0 0 0 1px var(--primary-teal);
}

/* Full width for single column items if needed, or specific inputs */
.text-input-container {
    width: 100%;
    margin: 2rem 0;
}

.text-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    text-align: center;
    font-family: var(--font-family-sans);
    outline: none;
    transition: border-color 0.2s;
}

.text-input:focus {
    border-color: var(--primary-teal);
}

/* Affirmations Grid */
.affirmations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 800px;
    margin-bottom: 3rem;
}

.affirmation-card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    /* Spec: Min height 96px */
    transition: transform 0.2s;
}

.affirmation-text {
    font-family: var(--font-family-serif);
    font-size: 1.2rem;
    color: var(--dark-teal);
    line-height: 1.4;
    font-style: italic;
    font-weight: 500;
}

/* Responsive Styles for Selection Grid */
@media (max-width: 600px) {
    .selection-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }
}

/* Navigation & Primary Buttons */
.navigation-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    align-items: center;
}

.next-btn-wrapper {
    position: relative;
    display: inline-block;
}

/* Tooltip for disabled button */
.next-btn-wrapper::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 10px;
    z-index: 20;
    display: none;
}

.next-btn-wrapper.show-tooltip::after {
    opacity: 1;
    display: block;
}

.btn-primary {
    background-color: var(--primary-teal);
    /* Changed from burnt-orange to teal */
    color: white;
    padding: 0.6rem 2.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0, 102, 102, 0.2);
    border: none;
    outline: none;
    cursor: pointer;
    min-width: 140px;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #004d4d;
    /* Darker teal */
}

.btn-primary:disabled {
    background-color: var(--primary-teal);
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
}

/* ... existing btn-text ... */
.btn-text {
    background: white;
    border: 1px solid #ddd;
    color: var(--text-color);
    padding: 0.6rem 2rem;
    border-radius: 6px;
    font-weight: 500;
    min-width: 140px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-text:hover {
    background-color: #f5f5f5;
}

.disabled-back {
    border: 1px solid transparent;
    background: transparent;
    color: #e0e0e0;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-teal {
    background-color: var(--primary-teal);
    color: white;
    padding: 0.7rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.btn-teal:hover {
    background-color: var(--dark-teal);
}

/* Radio Selection Grid (For Step 2) */
.radio-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem 2rem;
    width: fit-content;
    /* Center content */
    margin: 1.5rem auto 2.5rem auto;
    text-align: left;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 0.95rem;
    /* Slightly smaller for list */
    color: #333;
    font-weight: 500;
    font-family: var(--font-family-sans);
}

.radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ccc;
    margin-right: 10px;
    position: relative;
    flex-shrink: 0;
}

.radio-option.selected .radio-circle {
    border-color: var(--primary-burnt-orange);
    /* Keep orange for select indicator? Or Teal? Screenshot shows ??? Hard to tell selected. Assuming standard UI. */
    /* Screenshot has orange icon at top, so maybe orange focus? */
    /* User said "use teal color button instead of orange". */
    /* Let's make the selection indicator Teal to be safe, or stick to theme. */
    /* Previously orange was used for 'energy'. Let's use Teal for consistency with buttons? */
    /* Actually Step 2 screenshot shows orange search icon. */
    /* I'll use Teal for the radio selection to match the 'primary' action button. */
    border-color: var(--primary-teal);
}

.radio-option.selected .radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: var(--primary-teal);
    border-radius: 50%;
}

.radio-option:hover .radio-circle {
    border-color: #999;
}

/* Search Icon for Step 2 */
.step-icon {
    font-size: 3.5rem;
    color: var(--primary-burnt-orange);
    /* Keep orange as per screenshot */
    margin-bottom: 0.5rem;
    display: block;
}

.step-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 1rem auto;
    display: block;
}

.skip-link {
    display: block;
    margin: 1rem auto;
    /* Centered */
    color: #888;
    text-decoration: underline;
    font-size: 0.9rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    width: fit-content;
}

.skip-link:hover {
    color: var(--primary-teal);
}

/* Results Page Styling */
/* New Bokeh/Gradient Card for Results */
.results-card-container {
    background: linear-gradient(135deg, #fdfbf7 0%, #e0f2f1 40%, #fff3e0 100%);
    /* Simulating gentle bokeh/gradient */
    width: 100%;
    max-width: 450px;
    /* Slightly narrower per screenshot */
    padding: 2.5rem 2rem;
    border-radius: 20px;
    /* More rounded */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
    position: relative;
    margin: 0 auto 2rem auto;
    overflow: hidden;
}

/* Star Icon for Results */
.results-icon {
    font-size: 2.5rem;
    color: var(--primary-burnt-orange);
    margin-bottom: 0.5rem;
}

.results-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.results-heading {
    font-family: var(--font-family-serif);
    font-size: 1.8rem;
    color: var(--dark-teal);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Affirmation Cards inside Results */
.affirmation-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    text-align: left;
    display: flex;
    align-items: center;
    min-height: 96px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-burnt-orange);
    /* Orange left border */
}

.affirmation-text {
    font-family: var(--font-family-sans);
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
    font-style: normal;
    /* Removed italic per new design */
    font-weight: 400;
}

/* Results Buttons */
.results-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-result-share {
    background-color: var(--primary-teal);
    /* Dark Teal */
    color: white;
    padding: 0.7rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    flex: 1;
}

.btn-result-restart {
    background-color: white;
    color: #333;
    padding: 0.7rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid #ccc;
    cursor: pointer;
    flex: 1;
}

#loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.loading-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spinner-small {
    border: 3px solid rgba(0, 0, 0, 0.1);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border-left-color: var(--primary-teal);
    animation: spin 1s linear infinite;
}

.subtitle {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
    text-align: center;
    font-family: var(--font-family-sans);
    display: block;
    /* Ensure it shows */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Ad Container */
.ad-container {
    width: 100%;
    margin: 2rem auto;
    padding: 2rem 10px;
    background-color: #FDFBF7;
    /* Match page background */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    min-height: 100px;
    /* Prevent availableWidth=0 */
    overflow: hidden;
}

.ad-placeholder {
    width: 100%;
    max-width: 728px;
    height: 90px;
    background-color: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    border: 1px dashed #ccc;
}

/* Footer */
footer {
    background-color: var(--primary-teal);
    /* Changed to teal */
    padding: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: white;
    /* White text for contrast */
    border-top: none;
}

.disclaimer {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    /* Lighter white for disclaimer */
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
/* Responsive */
@media (max-width: 850px) {
    .header-container {
        /* Keep row for logo and toggle */
        flex-direction: row;
        justify-content: space-between;
        align-items: center;

    }

    .progress-indicator {
        display: none;
    }

    header {
        padding: 1.2rem 1.2rem;
    }

    .logo {
        gap: 0.5rem;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .card-container {
        padding: 1.5rem 1rem;
        /* Reduced padding */
        margin: 1rem;
        /* Ensure some margin from edges */
    }

    /* Compact Question Card for Mobile */
    .icon-wrapper {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .question-icon-img {
        height: 80px;
        /* Smaller icon on mobile */
    }

    h2 {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .slider-container {
        margin: 4rem 0 1.5rem 0;
        /* Increased top margin for mobile too */
    }

    .navigation-buttons {
        margin-top: 1.5rem;
    }

    /* Results Page Mobile Adjustments */
    .battery-icon-wrapper {
        font-size: 4rem;
    }

    .result-icon-img {
        height: 150px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
        max-width: 400px;
        /* Limit width on mobile */
    }

    .btn-primary,
    .btn-teal {
        width: 100%;
        padding: 0.6rem 1rem;
        /* Slightly less padding */
        font-size: 0.95rem;
        /* Slightly smaller text */
    }

    .battery-state-badge {
        margin-bottom: 1.5rem;
        padding: 0.4rem 1.5rem;
    }

    /* Mobile Results: No Card, Flat Background */
    .results-card {
        background-color: transparent;
        box-shadow: none;
        padding: 0;
        margin-bottom: 1rem;
    }

    #results-section {
        margin-top: 0;
        margin-bottom: 2rem;
    }
}

/* Modal Styling */
.modal {
    display: flex;
    /* Hidden by default via .hidden class, but flex when active */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.modal.hidden {
    display: none !important;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.share-preview {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f5f5f5;
    border-radius: 6px;
    border: 1px dashed #ccc;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.social-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s, transform 0.1s;
    border: 1px solid #eee;
}

.social-icon:hover {
    background-color: #f9f9f9;
    transform: translateY(-2px);
}

.social-icon i {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.social-icon span {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Brand Colors */
.social-icon.facebook i {
    color: #1877F2;
}

.social-icon.instagram i {
    color: #E4405F;
}

.social-icon.reddit i {
    color: #FF4500;
}

.social-icon.linkedin i {
    color: #0A66C2;
}

.social-icon.tiktok i {
    color: #000000;
}

.social-icon.pinterest i {
    color: #BD081C;
}

@media (max-width: 400px) {
    .social-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.share-helper-text {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

/* Mobile Menu Dropdown Styling */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    z-index: 999;
    padding: 0;
    /* box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); */
    border-top: 1px solid #f0f0f0;
    display: block;
}

.mobile-menu.hidden {
    display: none;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
}

.mobile-nav-links a {
    text-decoration: none;
    color: var(--dark-teal);
    font-size: 1.2rem;
    font-weight: 600;
    padding-top: 15px;
    padding-bottom: 15px;
    padding-left: 17px;
    border-bottom: 1px solid #eee;
    font-family: 'AR One Sans', sans-serif;
    display: block;
}

.mobile-nav-links a:hover {
    background-color: #f9f9f9;
    color: var(--primary-burnt-orange);
}

.mobile-nav-links a.active {
    color: var(--primary-burnt-orange);
    background-color: transparent;
}

.mobile-nav-links a:last-child {
    border-bottom: none;
}