:root {
    --bg-color: #050505;
    --text-color: #e6edf3;
    --primary-color: #7c4dff;
    /* Deep Purple */
    --primary-hover: #651fff;
    --secondary-color: #1a1a1a;
    --accent-color: #00ffd5;
    /* Cyan Neon */
    --container-width: 1200px;
    --glass-bg: rgba(22, 27, 34, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(255, 255, 255, 0.03);
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Dynamic Background */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    mask-image: linear-gradient(to bottom, transparent, 20%, white, 90%, transparent);
}

.background-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(124, 77, 255, 0.12) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    animation: pulseGlow 10s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }
}

/* Parallax Shapes */
.parallax-shape {
    position: fixed;
    border-radius: 50%;
    z-index: -1;
    filter: blur(50px);
    opacity: 0.4;
    pointer-events: none;
}

.shape-1 {
    top: 10%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-color), transparent);
}

.shape-2 {
    bottom: 20%;
    left: 5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-color), transparent);
    width: 150px;
    /* Override */
    height: 150px;
}

.shape-3 {
    top: 40%;
    left: 30%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px var(--primary-color);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 1.2rem 0;
    transition: all 0.3s;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-icon {
    font-size: 1.8rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: #8b949e;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    font-size: 0.95rem;
}

nav a:hover {
    color: white;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-badge {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 700;
    color: var(--accent-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(124, 77, 255, 0.4);
}

.glow-btn {
    position: relative;
    overflow: hidden;
}

.glow-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    bottom: -50%;
    left: -50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg) translate(-200%, 0);
    transition: transform 0.6s;
}

.glow-btn:hover::after {
    transform: rotate(45deg) translate(200%, 0);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    border-color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(124, 77, 255, 0.1);
    color: white;
}

.btn-lg {
    padding: 0.9rem 2.2rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero-section {
    padding-top: 180px;
    padding-bottom: 100px;
    min-height: 90vh;
    /* Taller hero */
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(0, 255, 213, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(0, 255, 213, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1.5px;
}

.gradient-text {
    background: linear-gradient(135deg, white 0%, var(--accent-color) 40%, var(--primary-color) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: #a1aab5;
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.hero-visual {
    perspective: 1000px;
}

.hero-visual img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(124, 77, 255, 0.1);
    border: 1px solid var(--glass-border);
    transition: transform 0.5s ease-out;
}

.tilt-card {
    transform: rotateY(-10deg) rotateX(5deg);
}

.hero-visual:hover .tilt-card {
    transform: rotateY(0) rotateX(0) scale(1.02);
}

/* Features Grid */
.features-section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    background: linear-gradient(to right, white, #a1aab5);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    text-align: center;
    color: #8b949e;
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 16px;
    transition: transform 0.3s, background 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.feature-card p {
    color: #a1aab5;
    font-size: 0.95rem;
}

/* Video Section */
.video-section {
    padding: 100px 0;
}

.video-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 80px rgba(124, 77, 255, 0.15);
    border: 1px solid var(--glass-border);
}

video {
    width: 100%;
    display: block;
}

/* Gallery Section */
.gallery-section {
    padding: 100px 0 140px;
}

.carousel {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    height: 700px;
    /* Increased for better aspect ratio */
}

.carousel-track-container {
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.carousel-track {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.feature-img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
    cursor: zoom-in;
    border: 1px solid var(--glass-border);
}

.feature-img:hover {
    transform: scale(1.02);
}

.caption {
    margin-top: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid var(--glass-border);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.carousel-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1) translateY(-45%);
}

.prev {
    left: -80px;
}

.next {
    right: -80px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    padding: 30px 0;
    gap: 12px;
}

.carousel-indicator {
    border: 0;
    border-radius: 4px;
    /* Pill shape */
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-indicator.current-slide {
    background: var(--primary-color);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.3s;
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    text-align: center;
    color: #ccc;
    padding: 20px 0;
    font-size: 1.2rem;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-lightbox:hover {
    color: var(--primary-color);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

/* Animation Classes */
.reveal {
    opacity: 0;
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
}

.fade-up {
    transform: translateY(50px);
}

.fade-up.active {
    transform: translateY(0);
}

.fade-left {
    transform: translateX(50px);
}

.fade-left.active {
    transform: translateX(0);
}

.scale-up {
    transform: scale(0.95);
}

.scale-up.active {
    transform: scale(1);
}

/* Footer */
footer {
    padding: 30px 0;
    border-top: 1px solid var(--glass-border);
    background: rgba(5, 5, 5, 0.95);
    position: relative;
    z-index: 100;
}

.footer-content {
    display: flex;
    justify-content: center;
    /* Center the Moe Counter */
    align-items: center;
    position: relative;
    /* For absolute positioning of download stat */
    min-height: 60px;
}

.moe-counter-wrapper img {
    height: auto;
    display: block;
    max-height: 80px;
    /* Ensure reasonable max height */
}

/* Vibrant Download Badge */
.download-stat-badge {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(124, 77, 255, 0.15);
    /* Primary tint */
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    border-radius: 30px;
    color: white;
    box-shadow: 0 0 15px rgba(124, 77, 255, 0.2);
    transition: transform 0.3s;
}

.download-stat-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(124, 77, 255, 0.4);
    background: rgba(124, 77, 255, 0.25);
}

.download-stat-badge i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.count-value {
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
}

.count-label {
    font-size: 0.9rem;
    color: #b0b8c3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsiveness for Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .download-stat-badge {
        position: relative;
        left: auto;
    }
}

/* Mascot Scroll to Top */
.mascot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 900;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
}

.mascot-container.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.mascot-img {
    width: 90px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(124, 77, 255, 0.4));
    animation: float 3s ease-in-out infinite;
}

.mascot-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s, top 0.3s;
    white-space: nowrap;
}

.mascot-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: var(--primary-color) transparent transparent transparent;
}

.mascot-container:hover .mascot-tooltip {
    opacity: 1;
    top: -50px;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* Responsive Footer */
@media (max-width: 800px) {
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Responsive */
@media (max-width: 1000px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .subtitle {
        margin: 0 auto 2.5rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .carousel {
        height: 500px;
        margin: 0 40px;
    }

    .prev {
        left: -40px;
    }

    .next {
        right: -40px;
    }
}

@media (max-width: 600px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-section {
        padding-top: 140px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}