: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: var(--bg-color);
    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.9rem;
    text-align: center;
}

.progress-indicator {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
    text-align: center;
}

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

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

.results-card {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 800px;
    /* Wider card for desktop */
    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;
    /* Space between card and buttons */
}

/* 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: 2.5rem;
    color: var(--dark-teal);
    line-height: 1.3;
}

/* Slider */
.slider-container {
    margin: 4.5rem 0 2rem 0;
    /* Increased top margin to accommodate bubble */
    padding: 0 1rem;
    position: relative;
}

.slider-value-bubble {
    position: absolute;
    top: -55px;
    /* Increased space from slider */
    /* Left will be set dynamically via JS */
    transform: translateX(-50%);
    background-color: #CDF5F0;
    /* Light cyan/teal */
    color: var(--dark-teal);
    padding: 0.3rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: opacity 0.2s, left 0.1s ease-out;
    /* Add transition for smooth movement */
    white-space: nowrap;
    z-index: 10;
}

.slider-value-bubble.hidden-bubble {
    opacity: 0;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    /* Default gray background */
    outline: none;
    transition: background 0.1s;
}

/* Unselected state styling */
.slider.unselected::-webkit-slider-thumb {
    background-color: #e0e0e0;
    /* Gray background for unselected */
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    /* Dark Teal Icon for contrast on Gray */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ctext x='50%25' y='55%25' dominant-baseline='middle' text-anchor='middle' fill='%23006666' font-size='14' font-family='Arial' font-weight='bold'%3E%26lt;%26gt;%3C/text%3E%3C/svg%3E");
}

.slider.unselected::-moz-range-thumb {
    background-color: #e0e0e0;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ctext x='50%25' y='55%25' dominant-baseline='middle' text-anchor='middle' fill='%23006666' font-size='14' font-family='Arial' font-weight='bold'%3E%26lt;%26gt;%3C/text%3E%3C/svg%3E");
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    background-color: var(--primary-teal);
    /* Teal background (#006666) */
    /* Light Teal Icon (#b2dfdb) for contrast on Teal */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ctext x='50%25' y='55%25' dominant-baseline='middle' text-anchor='middle' fill='%23b2dfdb' font-size='14' font-family='Arial' font-weight='bold'%3E%26lt;%26gt;%3C/text%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    margin-top: -12px;
}

/* Firefox support for slider */
.slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    background-color: var(--primary-teal);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ctext x='50%25' y='55%25' dominant-baseline='middle' text-anchor='middle' fill='%23b2dfdb' font-size='14' font-family='Arial' font-weight='bold'%3E%26lt;%26gt;%3C/text%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

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



.btn-primary:hover {
    background-color: var(--dark-burnt-orange);
}

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

.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;
    /* Hide by default to prevent accidental triggers */
}

/* Only show tooltip if the button inside is disabled AND the class is present */
.next-btn-wrapper.show-tooltip::after {
    opacity: 1;
    display: block;
}

.btn-primary:disabled {
    background-color: var(--primary-burnt-orange);
    opacity: 0.7;
    /* Optional: slight opacity to indicate disabled but keep color */
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
    /* Let the wrapper handle the hover */
}

.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;
    /* Ensure consistent width */
}

.btn-primary {
    background-color: var(--primary-burnt-orange);
    color: white;
    padding: 0.6rem 2.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(217, 122, 58, 0.3);
    border: none;
    outline: none;
    cursor: pointer;
    min-width: 140px;
    /* Ensure consistent width */
}

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

.disabled-back {
    border: 1px solid transparent;
    /* Keep size but invisible border */
    background: transparent;
    color: #e0e0e0;
    /* Very light gray */
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}

/* Results Section */
.battery-barometer {
    margin-bottom: 2rem;
    text-align: left;
}

.battery-state-badge {
    display: inline-block;
    background-color: var(--primary-burnt-orange);
    color: white;
    padding: 0.5rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.battery-icon-wrapper {
    font-size: 5rem;
    /* Larger icon */
    color: var(--primary-teal);
    margin-bottom: 1.5rem;
    display: flex;
    display: flex;
    justify-content: center;
    /* Align icon center */
}

.question-icon-img {
    height: 120px;
    /* Increased from 80px */
    width: auto;
    object-fit: contain;
}

.result-icon-img {
    height: 200px;
    /* Increased from 150px */
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.result-content {
    text-align: left;
    margin-bottom: 2rem;
}

.result-block {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: #444;
}

.result-intro {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: left;
}

.highlight-box {
    color: #D32F2F;
    /* Reddish text for closing */
    font-family: var(--font-family-serif);
    font-style: italic;
    font-size: 1.1rem;
    text-align: left;
    margin-top: 2rem;
}

.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);
}

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

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left-color: var(--primary-burnt-orange);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

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

/* Ad Container */
.ad-container {
    width: 100%;
    background-color: #fff;
    padding: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
}

.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;
}