/* Color Palette Variables */
:root {
    --primary: #FFD700;
    --primary-variant: #FFC107;
    --on-primary: #000000;
    --secondary: #6C63FF;
    --secondary-variant: #5A52D5;
    --on-secondary: #FFFFFF;
    --accent: #FF6F61;
    --accent-variant: #E85A4F;
    --on-accent: #FFFFFF;
    --background: #FFFFFF;
    --surface: #FFFFFF;
    --surface-variant: #F5F5F5;
    --on-background: #212121;
    --on-surface: #212121;
    --on-surface-variant: #757575;
    --coin-gold: #FFD700;
    --coin-shadow: #FFA000;
    --card-background: #FFFFFF;
    --divider: #E0E0E0;
}

/* General Body Styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--background);
    color: var(--on-background);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
    scroll-behavior: smooth;
}

/* Global Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--on-background);
}

p {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    color: var(--on-background);
}

/* Header and Navigation */
header {
    background: linear-gradient(135deg, var(--primary), var(--primary-variant)); /* Gradient background */
    color: var(--on-primary);
    padding: 2rem 0; /* Increased padding */
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom-left-radius: 30px; /* More rounded edges */
    border-bottom-right-radius: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); /* More pronounced shadow */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
    position: relative; /* For positioning the mobile menu */
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--on-primary);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    transition: all 0.3s ease-in-out;
}

nav ul li {
    margin-left: 2.5rem; /* Increased spacing */
}

nav ul li a {
    color: var(--on-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.2s ease; /* Added transform for hover */
}

nav ul li a:hover {
    color: var(--primary-variant);
    transform: translateY(-3px); /* More pronounced lift on hover */
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.2); /* Subtle text shadow on hover */
}

.hero {
    padding: 10rem 2rem; /* Further increased padding for more space */
    max-width: 1000px; /* Wider for more impact */
    margin: 0 auto;
    position: relative; /* Ensure z-index works for content */
    z-index: 1;
}

.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 4.8rem; /* Significantly larger font size */
    margin-bottom: 1.8rem; /* Increased margin */
    line-height: 1.05; /* Tighter line height */
    font-weight: 700;
    color: var(--on-primary);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2); /* More pronounced text shadow */
}

.hero p {
    font-size: 1.55rem; /* Larger */
    margin-bottom: 3.5rem; /* Increased margin */
    opacity: 0.98; /* Less transparent */
    color: var(--on-primary);
    max-width: 700px; /* Constrain width for readability */
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background-color: var(--secondary);
    color: var(--on-secondary); /* White text on violet blue background */
    padding: 1.2rem 3rem; /* Larger padding */
    border: none;
    border-radius: 35px; /* More rounded */
    font-size: 1.2rem; /* Larger font */
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); /* More pronounced shadow */
    letter-spacing: 0.7px;
    position: relative;
    overflow: hidden; /* For potential ripple effect */
}

.cta-button:hover {
    background-color: var(--secondary-variant);
    transform: translateY(-7px); /* Even more pronounced lift */
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4); /* Enhanced shadow on hover */
}

.cta-button.secondary {
    background-color: var(--surface);
    color: var(--secondary); /* Violet blue text on white background */
    border: 2px solid var(--secondary);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); /* Slightly more pronounced shadow */
}

.cta-button.secondary:hover {
    background-color: var(--surface-variant);
    color: var(--secondary-variant);
    transform: translateY(-5px); /* More pronounced lift */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}

/* Main Content Sections */
section {
    padding: 6rem 2rem; /* Further increased padding */
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    background-color: var(--background);
    color: var(--on-background);
    position: relative; /* For animation positioning */
    overflow: hidden; /* Ensure content stays within bounds */
}

/* Privacy Policy Page Specific Styles */
.privacy-policy-content {
    padding: 4rem 2rem;
    max-width: 900px;
    margin: 2rem auto;
    background-color: var(--surface);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.privacy-policy-content h1 {
    font-size: 3.5rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 2.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.privacy-policy-content h2 {
    font-size: 2rem;
    color: var(--secondary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--divider);
    padding-bottom: 0.5rem;
}

.privacy-policy-content p {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    color: var(--on-surface);
}

.privacy-policy-content ul {
    list-style: disc;
    margin-left: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--on-surface);
}

.privacy-policy-content ul li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.privacy-policy-content strong {
    color: var(--on-background);
}

@media (max-width: 768px) {
    .privacy-policy-content {
        padding: 3rem 1.5rem;
        margin: 1rem auto;
    }

    .privacy-policy-content h1 {
        font-size: 2.8rem;
    }

    .privacy-policy-content h2 {
        font-size: 1.8rem;
    }

    .privacy-policy-content p,
    .privacy-policy-content ul li {
        font-size: 1rem;
    }
}

section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.8rem; /* Significantly larger font size */
    margin-bottom: 1.8rem; /* Increased margin */
    color: var(--on-background);
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05); /* Subtle text shadow */
}

section .subtitle {
    font-size: 1.45rem; /* Larger */
    color: var(--on-surface-variant); /* Use a slightly lighter color for subtitles */
    margin-bottom: 4.5rem; /* Increased margin */
    max-width: 750px; /* Wider for better flow */
    margin-left: auto;
    margin-right: auto;
}

/* Features Section */
.features-section {
    background-color: var(--surface);
    background-image: url('data:image/svg+xml,%3Csvg width="6" height="6" viewBox="0 0 6 6" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%23f0f0f0" fill-opacity="0.4" fill-rule="evenodd"%3E%3Cpath d="M5 0h1L0 6V5zM6 5v1H5z"/%3E%3C/g%3E%3C/svg%3E'); /* Subtle diagonal lines pattern */
    border-radius: 20px; /* Even more rounded */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1); /* More enhanced shadow */
    margin-top: -100px; /* More overlap with header */
    position: relative;
    z-index: 1;
    padding: 7rem 2rem; /* Further increased padding */
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Wider min-width for items */
    gap: 3rem; /* Increased gap */
    margin-top: 4rem; /* Increased margin */
}

.feature-item {
    background-color: var(--surface-variant);
    padding: 3rem; /* Further increased padding */
    border-radius: 18px; /* More rounded */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); /* Enhanced shadow */
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); /* Smoother transition */
    text-align: left; /* Align text left within feature item */
    border: 1px solid var(--divider); /* Subtle border */
}

.feature-item:hover {
    transform: translateY(-15px); /* More pronounced lift */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18); /* More prominent shadow on hover */
}

.feature-item h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem; /* Larger font size */
    color: var(--on-surface);
    margin-bottom: 1rem; /* Slightly increased margin */
}

.feature-item p {
    font-size: 1.1rem; /* Larger */
    color: var(--on-surface-variant);
    line-height: 1.8; /* Increased line height for readability */
}

/* Community Section */
.community-section {
    display: grid; /* Use grid for more control over layout */
    grid-template-columns: 1fr; /* Default to single column */
    align-items: center;
    gap: 5rem; /* Increased gap */
    text-align: left;
    padding: 8rem 2rem; /* Further increased padding */
    background-color: var(--background);
}

.community-content {
    max-width: 600px;
}

.community-content h2 {
    font-family: 'Montserrat', sans-serif;
    text-align: left;
    font-size: 4rem; /* Larger font size */
    color: var(--on-background);
    line-height: 1.1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.community-content p {
    font-size: 1.35rem; /* Larger */
    color: var(--on-surface-variant); /* Use on-surface-variant for body text */
    margin-bottom: 3rem; /* Increased margin */
    line-height: 1.8;
}

.community-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px; /* More rounded */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2); /* More enhanced shadow */
    transform: rotate(-3deg); /* Subtle rotation for dynamic feel */
    transition: transform 0.4s ease;
}

.community-image img:hover {
    transform: rotate(0deg) scale(1.02); /* Straighten and slightly scale on hover */
}

/* Leaderboard Section */
.leaderboard-section {
    background-color: var(--surface-variant);
    background-image: url('data:image/svg+xml,%3Csvg width="6" height="6" viewBox="0 0 6 6" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%23e8e8e8" fill-opacity="0.4" fill-rule="evenodd"%3E%3Cpath d="M5 0h1L0 6V5zM6 5v1H5z"/%3E%3C/g%3E%3C/svg%3E'); /* Subtle diagonal lines pattern */
    padding: 8rem 2rem; /* Further increased padding */
    border-radius: 20px; /* More rounded */
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.05); /* More pronounced inner shadow */
}

.leaderboard-placeholder img {
    max-width: 100%;
    height: auto;
    border-radius: 20px; /* More rounded */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2); /* More enhanced shadow */
}

/* New Image Styles */
.hero-image {
    max-width: 60%; /* Adjust as needed */
    height: auto;
    margin-top: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    transition: transform 0.4s ease;
}

.hero-image:hover {
    transform: translateY(-10px) scale(1.02);
}

.feature-icon {
    width: 80px; /* Adjust size as needed */
    height: 80px;
    margin-bottom: 1.5rem;
    border-radius: 50%; /* Make it circular */
    background-color: var(--primary); /* Background for the icon */
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Adjust feature item text alignment for icons */
.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
    text-align: center; /* Center text */
}

/* Download Section */
.download-section {
    padding: 8rem 2rem; /* Further increased padding */
    background: linear-gradient(45deg, var(--primary), var(--primary-variant)); /* Gradient background */
    color: var(--on-primary);
    border-top-left-radius: 30px; /* More rounded edges */
    border-top-right-radius: 30px;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15); /* More pronounced shadow */
}

.download-section h2 {
    font-family: 'Montserrat', sans-serif;
    color: var(--on-primary);
    font-size: 4rem; /* Larger font size */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.15);
}

.download-section p {
    font-size: 1.45rem; /* Larger */
    margin-bottom: 4rem; /* Increased margin */
    opacity: 0.98;
    color: var(--on-primary);
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem; /* Increased gap */
    flex-wrap: wrap;
}

.app-store-button {
    background-color: var(--surface);
    color: var(--secondary); /* Violet blue text on white background */
    padding: 1.2rem 3rem; /* Larger padding */
    border: none;
    border-radius: 35px; /* More rounded */
    font-size: 1.2rem; /* Larger font */
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); /* More enhanced shadow */
    letter-spacing: 0.7px;
}

.app-store-button:hover {
    background-color: var(--surface-variant);
    transform: translateY(-7px); /* Even more pronounced lift */
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

/* Footer */
footer {
    background-color: var(--on-background);
    color: var(--on-surface-variant);
    padding: 3rem 0; /* Increased padding */
    text-align: center;
    font-size: 1rem; /* Slightly larger font */
}

.footer-links a {
    color: var(--on-surface-variant);
    text-decoration: none;
    margin: 0 1.2rem; /* Increased margin */
    transition: color 0.3s ease, transform 0.2s ease;
}

.footer-links a:hover {
    color: var(--surface);
    transform: translateY(-3px); /* More pronounced lift on hover */
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.1); /* Subtle text shadow */
}

/* Responsive Design */
@media (min-width: 768px) {
    .community-section {
        grid-template-columns: 1fr 1fr; /* Two columns for asymmetrical layout */
        text-align: left;
        gap: 6rem; /* Increased gap for better separation */
    }

    .community-content {
        text-align: left;
        /* No margin-right needed with grid gap */
    }

    .community-image {
        flex-shrink: 0;
        order: 2; /* Place image on the right */
    }

    .community-content {
        order: 1; /* Place content on the left */
    }

    /* For alternating sections, if needed in the future */
    .community-section:nth-of-type(even) .community-image {
        order: 1;
    }

    .community-section:nth-of-type(even) .community-content {
        order: 2;
    }
}

@media (max-width: 768px) {
    .main-nav {
        flex-direction: row; /* Keep logo and hamburger on one line */
        justify-content: space-between;
        padding: 0 2rem;
    }

    .main-nav ul {
        max-height: 0; /* Start hidden */
        opacity: 0; /* Start faded out */
        overflow: hidden; /* Hide overflowing content during transition */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Position below the header */
        left: 0;
        width: 100%;
        background-color: var(--primary); /* Match header background */
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        padding: 0; /* Remove initial padding to allow max-height to control */
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
        transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, padding 0.5s ease-in-out; /* Smooth transition for height, opacity, and padding */
    }

    .main-nav ul.active {
        max-height: 500px; /* A value large enough to show all content */
        opacity: 1; /* Fully visible */
        padding: 1rem 0; /* Apply padding when active */
    }

    .main-nav ul li {
        margin: 0.75rem 0;
        text-align: center;
    }

    .main-nav ul li a {
        color: var(--on-primary);
        font-size: 1.2rem;
        padding: 0.5rem 0;
        display: block;
    }

    .hamburger-menu {
        display: flex; /* Show hamburger on mobile */
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
        z-index: 1100; /* Ensure it's above the menu */
    }

    .hamburger-menu .bar {
        width: 100%;
        height: 3px;
        background-color: var(--on-primary);
        border-radius: 5px;
        transition: all 0.3s ease-in-out;
    }

    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }

    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }

    .hero h1 {
        font-size: 3.8rem; /* Adjusted for tablet */
    }

    .hero p {
        font-size: 1.3rem; /* Adjusted for tablet */
    }

    section h2 {
        font-size: 3rem; /* Adjusted for tablet */
    }

    section .subtitle {
        font-size: 1.2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .community-section {
        flex-direction: column;
        padding: 5rem 2rem; /* Adjusted padding */
    }

    .community-content {
        text-align: center;
    }

    .community-content h2 {
        text-align: center;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (min-width: 769px) {
    .hamburger-menu {
        display: none; /* Hide hamburger on desktop */
    }

    .main-nav ul {
        display: flex; /* Ensure desktop menu is visible */
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.8rem; /* Adjusted for mobile */
    }

    .hero p {
        font-size: 1.1rem; /* Adjusted for mobile */
    }

    .cta-button {
        padding: 1rem 2.5rem; /* Adjusted for mobile */
        font-size: 1.1rem;
    }

    section {
        padding: 5rem 1.5rem; /* Adjusted for mobile */
    }

    section h2 {
        font-size: 2.5rem; /* Adjusted for mobile */
    }

    .feature-item {
        padding: 1.5rem;
    }

    .feature-item h3 {
        font-size: 1.4rem;
    }

    .app-store-button {
        padding: 1rem 2.5rem; /* Adjusted for mobile */
        font-size: 1.1rem;
    }
}

/* Animations (will be triggered by JS) */
.fade-in {
    opacity: 0;
    transform: translateY(40px) scale(0.95); /* Increased initial translation and slight scale for more impact */
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1); /* Smoother easing and longer duration */
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

.coin-animation {
    position: absolute;
    background-color: var(--coin-gold);
    border-radius: 50%;
    opacity: 0;
    animation: coinPop 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; /* Smoother easing and longer duration */
    box-shadow: 0 2px 5px var(--coin-shadow); /* Added shadow to coins */
}

@keyframes coinPop {
    0% {
        transform: scale(0) translateY(0) rotate(0deg);
        opacity: 0;
    }
    20% {
        transform: scale(1.2) translateY(-50px) rotate(30deg); /* Higher jump, larger scale, rotation */
        opacity: 1;
    }
    100% {
        transform: scale(0.7) translateY(100px) rotate(90deg); /* Fall further down, slight rotation */
        opacity: 0;
    }
}

/* New Micro-interactions */
.feature-item:hover h3 {
    color: var(--primary); /* Change heading color on hover */
    transition: color 0.3s ease;
}

.feature-item:hover p {
    color: var(--on-surface); /* Darker text on hover */
    transition: color 0.3s ease;
}

/* Parallax effect refinement */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 40%);
    opacity: 0.4;
    z-index: 0;
    animation: subtlePulse 5s infinite alternate ease-in-out; /* Subtle animation for background */
}

@keyframes subtlePulse {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.05);
        opacity: 0.5;
    }
}