:root {
    /* Color Palette */
    --bg-color: #0b0c10;
    --card-bg: rgba(31, 40, 51, 0.6);
    --card-border: rgba(102, 252, 241, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #c5c6c7;
    --accent-primary: #66fcf1;
    --accent-secondary: #45a29e;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
    
    /* Effects */
    --glass-blur: blur(16px);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo {
    font-family: var(--font-heading);
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a1f25 0%, var(--bg-color) 100%);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-secondary), transparent 70%);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #2a4b5c, transparent 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    opacity: 0.2;
    animation-duration: 25s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 10%) scale(1.1); }
    100% { transform: translate(-5%, -5%) scale(0.9); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

/* Scroll-driven styling for the header */
@supports (animation-timeline: scroll()) {
    .navbar {
        animation: shrink-header auto linear forwards;
        animation-timeline: scroll(root block);
        animation-range: 0px 50px;
    }
    
    @keyframes shrink-header {
        to {
            background: rgba(11, 12, 16, 0.8);
            backdrop-filter: var(--glass-blur);
            padding: 1rem 0;
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
        }
    }
}

/* Fallback class for navigation */
.navbar.scrolled {
    background: rgba(11, 12, 16, 0.8);
    backdrop-filter: var(--glass-blur);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-primary);
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-primary);
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(11, 12, 16, 0.3) 0%, rgba(11, 12, 16, 0.9) 100%);
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: 2rem;
    background: rgba(11, 12, 16, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeInUp 1s ease forwards 0.5s;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 2rem;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--text-secondary);
    -webkit-text-fill-color: var(--text-secondary);
}

.hero-tagline-container {
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-badge {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--accent-primary);
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.hero-tagline {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.hero-challenge {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
    background: linear-gradient(135deg, #ffffff 30%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(102, 252, 241, 0.1);
}

.desktop-only {
    display: block;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid var(--accent-primary);
    border-radius: 50px;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--accent-primary);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: -1;
}

.cta-button:hover {
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(102, 252, 241, 0.4);
}

.cta-button:hover::before {
    width: 100%;
}

.cta-button .arrow {
    transition: transform 0.3s ease;
}

.cta-button:hover .arrow {
    transform: translateY(3px);
}

/* Sections */
.section {
    padding: 8rem 0;
    position: relative;
}

/* Video Container */
.video-responsive-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--card-border);
    background: var(--card-bg);
}

.video-responsive-container iframe,
.video-responsive-container object,
.video-responsive-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(102, 252, 241, 0.15);
    border-color: rgba(102, 252, 241, 0.5);
}

/* Features Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: rgba(255,255,255,0.05);
    width: 80px;
    height: 80px;
    line-height: 80px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

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

/* Controls Gallery */
.controls-gallery {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 0;
    overflow: hidden;
}

.control-item.reverse {
    flex-direction: row-reverse;
}

.control-image-wrapper {
    flex: 1;
    overflow: hidden;
}

.control-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.7s ease;
}

.control-item:hover .control-image {
    transform: scale(1.05);
}

.control-text {
    flex: 1;
    padding: 3rem;
}

.control-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.control-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Tech Section */
.tech-content {
    max-width: 900px;
    margin: 0 auto;
}

.tech-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.tech-text > p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.tech-list {
    list-style: none;
}

.tech-list li {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    position: relative;
}

.tech-list li::before {
    content: '🚀';
    position: absolute;
    left: 0;
    top: 2px;
}

.tech-list strong {
    color: var(--accent-primary);
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.tech-list span {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 0;
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.social-tags {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-tags span {
    color: var(--accent-secondary);
    font-size: 0.9rem;
    background: rgba(69, 162, 158, 0.1);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(69, 162, 158, 0.2);
}

/* Native CSS Scroll-Driven Animations */
@media (prefers-reduced-motion: no-preference) {
    @supports ((animation-timeline: view()) and (animation-range: entry)) {
        @keyframes scroll-reveal-up {
            from {
                opacity: 0;
                transform: translateY(100px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .reveal-on-scroll {
            animation: scroll-reveal-up auto ease-out backwards;
            animation-timeline: view(block);
            animation-range: entry 5% entry 40%;
        }

        .reveal-on-scroll.delay-1 {
            animation-range: entry 10% entry 45%;
        }

        .reveal-on-scroll.delay-2 {
            animation-range: entry 15% entry 50%;
        }
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-tagline {
        font-size: 1.1rem;
    }
    
    .hero-challenge {
        font-size: 1.3rem;
    }
    
    .desktop-only {
        display: none;
    }
    
    .control-item, .control-item.reverse {
        flex-direction: column;
    }
    
    .control-text {
        padding: 2rem;
    }
    
    .nav-links {
        display: none;
    }
}

/* Hero Buttons Row */
.hero-buttons-row {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Nintendo eShop Banner Link - Hero */
.eshop-banner-link {
    display: inline-block;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow:
        0 4px 20px rgba(230, 0, 18, 0.35),
        0 0 40px rgba(230, 0, 18, 0.1);
    position: relative;
}

.eshop-banner-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
    z-index: 1;
    pointer-events: none;
}

.eshop-banner-link:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow:
        0 8px 35px rgba(230, 0, 18, 0.5),
        0 0 60px rgba(230, 0, 18, 0.2);
}

.eshop-banner-link:hover::before {
    left: 100%;
}

.eshop-banner-link:active {
    transform: translateY(-1px) scale(1.01);
}

.eshop-banner-img {
    display: block;
    height: 48px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
}


/* Footer Links Row */
.footer-links-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-social-link {
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.footer-social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.footer-eshop-link {
    padding: 0.4rem 0.8rem;
    border-color: rgba(230, 0, 18, 0.4);
    background: rgba(230, 0, 18, 0.08);
}

.footer-eshop-link:hover {
    background: rgba(230, 0, 18, 0.15);
    border-color: rgba(230, 0, 18, 0.6);
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.2);
}

.footer-eshop-logo {
    display: block;
    height: 28px;
    width: auto;
    object-fit: contain;
}

/* Mobile adjustments for eShop banner */
@media (max-width: 768px) {
    .hero-buttons-row {
        flex-direction: column;
        gap: 1rem;
    }

    .eshop-banner-img {
        height: 44px;
    }

    .footer-eshop-logo {
        height: 24px;
    }

    .footer-links-row {
        flex-direction: column;
        gap: 0.8rem;
    }
}
