* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #3CB371 0%, #228B22 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* New Glass Header */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.3s ease;
}

.header-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.header-logo img {
    height: 32px;
    width: auto;
}

.header-actions {
    position: relative; /* This is the key change */
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

.action-icon svg {
    width: 22px;
    height: 22px;
    stroke: white;
    stroke-width: 2;
    fill: none;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 10rem 0 0 0; /* Reduced bottom padding to fix gap */
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
    line-height: 1.1;
}

.hero h1 {
    background: linear-gradient(180deg, #FFFFFF 10%, #B0E0E6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.hero h1 span {
    background: linear-gradient(180deg, #F0FFF0 10%, #98FB98 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.hero p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.8s forwards;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-text {
    flex: 1 1 55%; /* Allow text to take a bit more space */
    text-align: left;
}

.hero h1, .hero p {
    margin-left: 0;
    margin-right: 0;
}

.hero-video {
    flex: 1 1 45%;
    aspect-ratio: 16 / 9;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-video:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}

.hero-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-video iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
    pointer-events: none; /* Allows clicks to go to the parent */
}

.hero-video:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(60, 179, 113, 0.7);
}

.play-button svg {
    width: 40px;
    height: 40px;
    fill: white;
    padding-left: 5px; /* Optically center the play icon */
}

/* Apps Grid */
.apps-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5rem; /* Increased from 3rem to 5rem */
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    row-gap: 5rem; /* Increased this value for more space between rows */
    margin-top: 2rem;
}

.app-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 20px;
    padding-top: 60px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; /* Indicates the whole card is clickable */
}

.app-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.app-card.highlight {
    animation: pulse 0.75s 2 ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 20px 40px rgba(152, 251, 152, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
}

.app-card .app-icon {
    position: absolute;
    top: -75px; /* Adjust this to control how much the character sticks out */
    left: 50%;
    transform: translateX(-50%);
    width: 180px; /* Increased size for more impact */
    height: 180px;
    z-index: 2;
    pointer-events: none; /* Allows clicking through the image area */
}

.app-card .app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Add a subtle drop shadow to the character to help it pop */
    filter: drop-shadow(5px 15px 15px rgba(0,0,0,0.3));
}

.app-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: white; /* Changed to white */
    margin-top: 40px; /* Pushes the title down to clear the image */
}

.app-card p {
    color: rgba(255, 255, 255, 0.8); /* Changed to light grey */
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Allows the paragraph to fill space, pushing button down */
}

.app-button {
    background: linear-gradient(135deg, #3CB371, #228B22);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.app-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(60, 179, 113, 0.4);
}

/* Footer */
.footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Particle Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particle-float 8s linear infinite;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* Mascot Shelf Styling */
.mascot-shelf-section {
    padding: 1rem 0 3rem 0; /* Reduced top padding to fix gap */
    position: relative;
    overflow: hidden;
}

.mascot-shelf-wrapper {
    position: relative;
}

.mascot-shelf {
    display: flex;
    gap: 1.5rem;
    padding: 2rem 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mascot-shelf::-webkit-scrollbar {
    display: none;
}

.mascot-card {
    --base-height: 80px;
    --multiplier: 2; 

    flex: 0 0 220px;
    height: 480px; 
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    animation: slideInMascot 0.8s ease-out forwards;
    box-shadow: none;
}

.mascot-card.size-1 { --multiplier: 1.5; }
.mascot-card.size-2 { --multiplier: 2.5; }
.mascot-card.size-3 { --multiplier: 3.5; }
.mascot-card.size-4 { --multiplier: 4.5; }

.mascot-card:nth-child(1) { animation-delay: 1.2s; }
.mascot-card:nth-child(2) { animation-delay: 1.3s; }
.mascot-card:nth-child(3) { animation-delay: 1.4s; }
.mascot-card:nth-child(4) { animation-delay: 1.5s; }
.mascot-card:nth-child(5) { animation-delay: 1.6s; }
.mascot-card:nth-child(6) { animation-delay: 1.7s; }
.mascot-card:nth-child(7) { animation-delay: 1.8s; }

.mascot-avatar {
    height: calc(100% - 95px); /* Set container height, leaving space for name */
    width: 100%; 
    display: flex;
    align-items: flex-end; 
    justify-content: center;
    transition: transform 0.4s ease, filter 0.4s ease, opacity 0.3s ease;
}

.mascot-avatar img {
    max-width: 100%;
    max-height: calc(var(--base-height) * var(--multiplier));
    object-fit: contain;
    transition: transform 0.3s ease;
}

.mascot-name {
    height: 95px; /* Give the container a fixed height */
    width: 90%; /* Ensure container has width for centering */
    display: flex;
    align-items: center; /* Center single-line text vertically */
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    padding: 0.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.mascot-card:hover .mascot-name {
    background: linear-gradient(135deg, #3CB371, #228B22);
    box-shadow: 0 10px 20px rgba(60, 179, 113, 0.4);
    text-shadow: none;
    transform: translateY(-5px);
}

/* "Coming Soon" Overlay Styles */
.mascot-card.coming-soon .mascot-avatar {
    opacity: 0.6;
}

.mascot-card.coming-soon .mascot-name::after {
    content: '';
    background-image: url('comingsoon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 40px;
}

/* Edge Chevrons */
.shelf-chevron {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    background: linear-gradient(135deg, rgba(60, 179, 113, 0.9), rgba(34, 139, 34, 0.9));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
}

.shelf-chevron.left {
    left: 10px;
}

.shelf-chevron.right {
    right: 10px;
}

.shelf-chevron.show {
    opacity: 1;
    visibility: visible;
}

.shelf-chevron:hover {
    background: linear-gradient(135deg, rgba(60, 179, 113, 1), rgba(34, 139, 34, 1));
    transform: translateY(-50%) scale(1.1);
}

/* Scroll Indicators */
.shelf-indicators {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.shelf-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.shelf-dot.active {
    background: white;
    transform: scale(1.3);
}

@keyframes slideInMascot {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- New Animated Video Modal Styles --- */
.video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(10px);
    /* The transition now targets transform and opacity for the animation */
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.video-lightbox.show {
    opacity: 1;
    visibility: visible;
}

/* This is where the fly-in animation magic happens */
.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    transform: translateY(-120%); /* Starts above the screen */
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); /* A bouncy transition */
}

.video-lightbox.show .lightbox-content {
    transform: translateY(0); /* Moves to the center when shown */
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.close-lightbox {
    position: absolute;
    top: -40px;
    right: -10px;
    color: white;
    font-size: 3rem;
    font-weight: 200;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-lightbox:hover {
    transform: scale(1.2);
}

/* --- New Popdown & Modal Styling --- */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.legal-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}
.legal-links a:hover {
    color: white;
}
.legal-links span {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 0.5rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.modal-overlay.show .modal-content {
    transform: scale(1);
}
.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}
.close-modal:hover {
    color: white;
    transform: rotate(90deg);
}
.legal-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}
.legal-text h4 {
    color: white;
    margin-top: 1.5rem;
}
.modal-content h3 {
    color: white;
    margin-bottom: 1.5rem;
}

/* App Drawer & User Popdown Themed Styles */
.header-popdown {
    position: absolute;
    top: calc(100% + 15px); /* A bit more space from the icons */
    right: 0; /* Align directly with the right edge of the header actions */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top right;
    transition: all 0.2s ease-out;
    z-index: 2000;
}
.header-popdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.app-drawer {
    width: 300px;
    padding: 1.25rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    background: #2E8B57; /* Themed green background */
    border: 3px solid white; /* Thick white border */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.app-drawer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.app-drawer-item img {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px; /* Adds space around the character art */
    transition: transform 0.2s ease, background 0.2s ease;
}
.app-drawer-item:hover img {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}
.app-drawer-item span {
    font-size: 0.8rem;
    font-weight: 500;
    color: white; /* Themed white text */
    text-align: center;
}
.user-popdown {
    padding: 0.5rem;
    background: #2E8B57;
    border: 3px solid white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.user-popdown img {
    width: 250px; /* Makes the image much smaller */
    height: auto;
    display: block;
}

/* --- Responsive Styles --- */
@media (max-width: 820px) {
    .hero {
        /* Adjust padding for a better mobile layout */
        padding: 8rem 0 4rem 0;
    }

    .hero-container {
        flex-direction: column;
        /* Add a gap between the text and video when stacked */
        gap: 3rem;
    }
    
    .hero-text {
        text-align: center;
    }

    .hero-video {
        /* Ensure the video takes up the full width */
        width: 100%;
        max-width: 500px; /* Optional: prevents it from being too wide on tablets */
        margin: 0 auto; /* Center the video container */
    }
}

/* --- App Card Button Group --- */
.app-card .app-button-group {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: auto; /* This ensures the buttons stay at the bottom */
}

.app-card .app-button {
    flex-grow: 1; /* Allows buttons to share the space */
    max-width: 50%; /* Prevents buttons from getting too wide */
}

/* A slightly different style for the "Launch App" button to make it a secondary action */
.app-card .launch-app {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.app-card .launch-app:hover {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

