:root {
    --color-primary: #021B3A;
    --color-accent: #064789;
    --color-bg-primary: #F1F5F7;
    --color-bg-secondary: #E9EDF1;
    --color-text-primary: rgba(0, 0, 0, 0.87);
    --color-text-secondary: rgba(0, 0, 0, 0.6);
    --color-red: #FF4F4F;
    --color-amber: #FFA000;
    --color-white: #FFFFFF;
    --color-border: #EEEEEE;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    --icon-fill: #021B3A;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-primary: #CDEAFE;
        --color-accent: #CDEAFE;
        --color-bg-primary: #101516;
        --color-bg-secondary: #1E2324;
        --color-text-primary: #FFFFFF;
        --color-text-secondary: rgba(255, 255, 255, 0.8);
        --color-red: #FF4F4F;
        --color-amber: #FFA000;
        --color-border: #424242;
        --shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        --icon-fill: #B3E5FC; /* Light blue icons in dark mode */
    }

    .feature-svg {
        /* This filter turns #021B3A into roughly #B3E5FC (Light Blue) */
        filter: invert(88%) sepia(21%) saturate(934%) hue-rotate(177deg) brightness(101%) contrast(101%);
        drop-shadow: 0 0 15px rgba(179, 229, 252, 0.2);
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3 {
    line-height: 1.2;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Site Header */
.site-header {
    background-color: var(--color-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0; /* Taller header */
    transition: background-color 0.3s, border-color 0.3s;
}

@media (prefers-color-scheme: dark) {
    .site-header {
        background-color: rgba(16, 21, 22, 0.8);
        border-bottom: 1px solid var(--color-border);
    }
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 16px; /* Increased gap */
}

.header-logo {
    width: 52px; /* Bigger logo */
    height: auto;
}

.app-name {
    font-size: 1.6rem; /* Bigger app name */
    font-weight: 800;
    color: var(--color-white);
    letter-spacing: -0.8px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px; /* Increased gap */
}

.lang-switcher {
    display: flex;
    align-items: center;
}

.lang-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}

.lang-select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.lang-select option {
    background: var(--color-primary);
    color: white;
}

@media (prefers-color-scheme: dark) {
    .lang-select option {
        background: #1E2324;
    }
}

.main-nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600; /* Bolder links */
    font-size: 1rem;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--color-white);
}

.play-store-link {
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.play-store-link:hover {
    transform: translateY(-2px);
}

.play-badge-header {
    height: 54px; /* Slightly bigger badge */
    width: auto;
    margin: -8px 0;
}

.play-badge-hero {
    height: 80px;
    width: auto;
    margin-top: -10px;
}

/* Hero Section */
.hero {
    padding: 80px 0 100px; /* Adjusted padding */
    text-align: left; /* Aligned left for split view */
    background: var(--color-primary);
    color: var(--color-white);
    overflow: hidden;
}

@media (prefers-color-scheme: dark) {
    .hero {
        background: linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
    }
}

.hero-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-image {
    flex: 0 0 400px;
    display: flex;
    justify-content: center;
}

.hero h1 {
    font-size: 4rem; /* Even more impactful */
    margin-bottom: 20px;
    background: linear-gradient(to right, #FFFFFF, #B3E5FC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    line-height: 1.1;
}

@media (prefers-color-scheme: dark) {
    .hero h1 {
        background: linear-gradient(to right, var(--color-primary), var(--color-accent));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

.tagline {
    font-size: 1.4rem; /* Bigger tagline */
    color: rgba(255, 255, 255, 0.9);
    max-width: 100%;
    margin: 0 0 0; /* Removed bottom margin since button is gone */
}

@media (prefers-color-scheme: dark) {
    .tagline {
        color: var(--color-text-secondary);
    }
}

.hero-image-wrapper {
    margin-bottom: 0;
}

.hero-screenshot {
    max-width: 320px; /* Bigger screenshot */
    height: auto;
    border-radius: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border: 10px solid var(--color-bg-secondary);
}

@media (max-width: 992px) {
    .hero-grid {
        flex-direction: column;
        text-align: center;
    }
    .hero-text {
        max-width: 100%;
    }
    .hero-image {
        flex: 1;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .tagline {
        margin-bottom: 40px;
    }
}

/* Features Section */
.features {
    padding: 100px 0;
    background-color: var(--color-bg-primary);
}

.feature-grid {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.card {
    flex: 1;
    min-width: 280px;
    padding: 40px 30px;
    background: var(--color-bg-secondary);
    border-radius: 24px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    border: 1px solid var(--color-border);
}

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

.card .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--color-bg-primary);
    border-radius: 50%;
    line-height: 1;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.feature-svg {
    width: 40px;
    height: 40px;
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: var(--color-primary);
}

.card p {
    color: var(--color-text-secondary);
}

/* Screenshots Section */
.screenshots {
    padding: 100px 0;
    text-align: center;
    background-color: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.screenshots h2 {
    margin-bottom: 10px;
    color: var(--color-primary);
}

.section-subtitle {
    color: var(--color-text-secondary);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Welltory-style Carousel */
.welltory-carousel-wrapper {
    position: relative;
    width: 100%;
    padding: 40px 0;
    overflow: hidden;
}

.welltory-carousel-wrapper::before,
.welltory-carousel-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.welltory-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--color-bg-secondary), transparent);
}

.welltory-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--color-bg-secondary), transparent);
}

.carousel-track {
    display: flex;
    gap: 15px; /* Reduced from 40px */
    overflow-x: auto;
    padding: 20px 50px; /* Reduced side padding */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    cursor: grab;
    touch-action: pan-y; /* Optimize for mobile */
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.carousel-track:active {
    cursor: grabbing;
}

.carousel-card {
    flex: 0 0 320px;
    background: var(--color-bg-primary);
    border-radius: 40px;
    padding: 30px;
    border: 2px solid var(--color-primary); /* Uses dynamic theme color */
    transition: box-shadow 0.3s ease;
    text-align: center;
    user-select: none; /* Prevent text selection during drag */
    display: flex;
    flex-direction: column;
}

.carousel-card:hover {
    box-shadow: var(--shadow);
}

.card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color-primary);
    min-height: 3.6rem; /* Ensures consistent height for 2-line titles */
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 25px;
    min-height: 3rem; /* Ensures consistent height for 2-line descriptions */
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image {
    position: relative;
    padding: 10px;
    background: #101516; /* Dark phone frame */
    border-radius: 36px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border: 4px solid #1E2324;
}

.card-image img {
    width: 100%;
    height: auto;
    border-radius: 24px;
    display: block;
}

@media (max-width: 768px) {
    .carousel-track {
        padding: 20px 40px;
        gap: 20px;
    }
    .carousel-card {
        flex: 0 0 280px;
    }
    .welltory-carousel-wrapper::before,
    .welltory-carousel-wrapper::after {
        width: 40px;
    }
}

/* About & Contact Sections */
.about {
    padding: 100px 0;
    background-color: var(--color-bg-primary);
}

.about-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.mission-text {
    font-size: 1.2rem;
    color: var(--color-text-primary);
    line-height: 1.8;
}

.about-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: left;
}

.about-item h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--color-primary);
}

.about-item p {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.contact {
    padding: 100px 0;
    text-align: center;
    background-color: var(--color-bg-secondary);
}

.contact h2 {
    margin-bottom: 20px;
    color: var(--color-primary);
}

.contact-subtext {
    color: var(--color-text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
}

.email-link {
    font-size: 1.25rem;
    color: var(--color-red);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.email-link:hover {
    border-color: var(--color-red);
}

/* Footer */
.footer {
    padding: 80px 0 60px;
    background-color: var(--color-bg-primary);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    text-align: center;
}

.footer nav {
    margin-bottom: 30px;
}

.footer nav a {
    margin: 0 15px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer nav a:hover {
    color: var(--color-primary);
}

.copyright, .version {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 8px 0;
}

/* Privacy Policy Specific Styles */
.policy-page {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    text-align: left;
}

.policy-content {
    padding: 60px 0;
}

.policy-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--color-primary);
}

.last-updated {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.policy-content section {
    margin-bottom: 30px;
}

.policy-content h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    margin-top: 40px;
    color: var(--color-primary);
}

.policy-content p, .policy-content li {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.policy-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.policy-content li {
    margin-bottom: 10px;
}

.policy-content a {
    color: var(--color-primary);
    text-decoration: none;
}

.policy-content a:hover {
    text-decoration: underline;
}

.attribution {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-top: 60px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.25rem;
    }
    .feature-grid {
        flex-direction: column;
    }
    .screenshot-row {
        justify-content: flex-start;
    }
}
