:root {
    /* Color Palette */
    --primary-color: #2C4A4A; /* Deep Forest Green */
    --secondary-color: #D4C5A0; /* Champagne Gold */
    --accent-color: #E67E22; /* Vibrant Orange for CTAs */
    --bg-color: #F9FAFB; /* Off-White */
    --text-color: #333333; /* Dark Charcoal */
    --text-light: #666666; /* Light Grey */
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Typography */
    --font-en: 'Jost', sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6, .logo-text, .nav-link, .btn {
    font-family: var(--font-en);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.section {
    padding: 4rem 0;
}

.section__header {
    text-align: center;
    margin-bottom: 4rem;
    line-height: 1;
}

.section__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.section__desc {
    font-size: 1rem;
    color: var(--text-light);
    letter-spacing: 0.1em;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    max-width: 20rem;
}

.btn--primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn--primary:hover {
    background-color: #1a2e2e;
    transform: translateY(-3px);
}

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

.btn--secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-bottom-color 0.3s ease;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1rem;
}

.header__logo img {
    height: 40px;
    width: auto;
    display: block;
}

.footer__logo img {
    height: 80px;
    width: auto;
    display: block;
    margin-bottom: 1rem;
}
.header__hamburger {
    display: flex;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.header__hamburger-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: top 0.3s ease, bottom 0.3s ease, transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.header__hamburger-line:nth-child(1) {
    top: calc(50% - 8px);
}

.header__hamburger-line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.header__hamburger-line:nth-child(3) {
    bottom: calc(50% - 8px);
}

.header__hamburger--open .header__hamburger-line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    background-color: var(--secondary-color);
}

.header__hamburger--open .header__hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scale(0);
}

.header__hamburger--open .header__hamburger-line:nth-child(3) {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
    background-color: var(--secondary-color);
}

.header__nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(44, 74, 74, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.header__nav--open {
    opacity: 1;
    visibility: visible;
}

.header__nav ul {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: center;
}

.header__nav li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.header__nav--open li {
    opacity: 1;
    transform: translateY(0);
}

.header__nav--open li:nth-child(1) {
    transition-delay: 0.1s;
}

.header__nav--open li:nth-child(2) {
    transition-delay: 0.2s;
}

.header__nav--open li:nth-child(3) {
    transition-delay: 0.3s;
}

.header__nav--open li:nth-child(4) {
    transition-delay: 0.4s;
}

.header__nav a {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--white);
    position: relative;
    font-family: var(--font-jp); /* Use JP font for nav */
}

.header__nav a:not(.btn-contact)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.header__nav a:not(.btn-contact)::before {
    /* English subtitle for nav items */
    content: attr(data-en);
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: var(--secondary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: var(--font-en);
    white-space: nowrap;
}

.header__nav a:not(.btn-contact):hover::before {
    opacity: 1;
}

.header__nav a:not(.btn-contact):hover::after {
    width: 100%;
}

.btn-contact {
    padding: 0.5rem 2rem;
    background-color: var(--white);
    color: var(--primary-color) !important;
    border-radius: 50px;
    font-size: 1.2rem !important;
}

.btn-contact:hover {
    background-color: var(--secondary-color);
    color: var(--white) !important;
}

/* Hero Section */
.hero {
    position: relative;
    height: auto;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-color);
    overflow: hidden;
    background-color: var(--white); /* White background */
    padding: 4rem 0;
}

#hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
}

.hero__content {
    max-width: 100%;
    padding: 0 1rem;
    z-index: 1;
    text-align: center;
    margin: 0 auto;
    pointer-events: none;
}

.hero__content * {
    pointer-events: auto;
}

.hero__title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.hero__subtitle {
    font-size: 1rem;
    margin-bottom: 3rem;
    color: var(--text-light);
    font-family: var(--font-jp);
    font-weight: 500;
}

.hero__actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.hero__scroll {
    display: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -10px); }
    60% { transform: translate(-50%, -5px); }
}

/* About Section */
.about {
    background-color: var(--white);
}

.about__content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.about__text {
    width: 100%;
}

.about__text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    color: var(--primary-color);
}

.about__text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.about__stats {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 2rem;
    width: 100%;
}

.stat-item {
    background: var(--bg-color);
    padding: 1rem ;
    border: 3px solid var(--secondary-color);
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-en);
    margin-bottom: 1rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-en);
}

/* Services Section */
.services {
    background-color: var(--bg-color);
}

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

.service-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}


.service-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

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

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Games Section */
.games {
    background-color: var(--white);
}

.games__wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.games__nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.game-btn {
    padding: 0.8rem 1.5rem;
    border: 1px solid #eee;
    background-color: var(--white);
    color: var(--text-light);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-en);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-btn:hover, .game-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.game-container {
    background-color: var(--bg-color);
    border-radius: 20px;
    padding: 2rem 1rem;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
    min-height: 600px;
    position: relative;
}

.game-view {
    display: none;
    height: 100%;
    flex-direction: column;
    align-items: center;
}

.game-view.active {
    display: flex;
}

.game-info {
    margin-bottom: 2rem;
    text-align: center;
}

.game-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.score-board {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-top: 0.5rem;
    font-family: var(--font-en);
}

.game-area {
    width: 100%;
    max-width: 400px;
    height: 500px;
    max-height: 80vh;
    background-color: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-sm);
    margin: 0 auto;
}

.game-area canvas {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    touch-action: none;
}

/* Game Specifics */
.start-btn {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 10;
    font-family: var(--font-en);
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.start-btn:hover {
    background-color: #d35400;
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 74, 74, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.bug {
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23E67E22'%3E%3Cpath d='M12 2C10.9 2 10 2.9 10 4V5H8C6.9 5 6 5.9 6 7V9H4V11H6V13H4V15H6V17C6 18.1 6.9 19 8 19H10V21H14V19H16C17.1 19 18 18.1 18 17V15H20V13H18V11H20V9H18V7C18 5.9 17.1 5 16 5H14V4C14 2.9 13.1 2 12 2M8 7H16V17H8V7Z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: transform 0.1s;
}

.bug:active {
    transform: scale(0.9);
}

/* Contact Section */
.contact {
    background-color: var(--bg-color);
    padding-bottom: 8rem;
}

.contact__box {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a2e2e 100%);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--white);
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
}

.contact__box .btn {
    margin-inline: auto;
}

.contact__title {
    color: var(--white);
    margin-bottom: 1rem;
}

.contact__text {
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.contact__box .btn--primary {
    background-color: var(--white);
    color: var(--primary-color);
}

.contact__box .btn--primary:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Footer */
.footer {
    position: relative;
    z-index: 1000;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive - Desktop */
@media (min-width: 769px) {
    .container {
        padding: 0 2rem;
    }

    .section {
        padding: 6rem 0;
    }

    .header__container {
        padding: 1rem 2rem;
    }

    .header__hamburger {
        display: none;
    }

    .header__nav {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        backdrop-filter: none;
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .header__nav ul {
        flex-direction: row;
        gap: 2rem;
        text-align: left;
    }

    .header__nav li {
        opacity: 1;
        transform: none;
    }

    .header__nav a {
        font-size: 1rem;
        color: var(--text-color);
    }

    .btn-contact {
        padding: 0.6rem 1.5rem;
        background-color: var(--primary-color);
        color: var(--white) !important;
        font-size: 0.9rem !important;
    }

    .btn-contact:hover {
        background-color: var(--secondary-color);
        transform: translateY(-2px);
    }

    .hero {
        height: 100svh;
        padding: 0;
    }

    .hero__content {
        max-width: 600px;
        padding: 0 2rem;
        text-align: left;
        margin-right: auto;
        margin-left: 5%;
    }

    .hero__title {
        font-size: 3.5rem;
    }

    .hero__subtitle {
        font-size: 1.2rem;
    }

    .hero__actions {
        justify-content: flex-start;
        flex-direction: row;
    }

    .hero__scroll {
        position: absolute;
        bottom: 2rem;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        font-family: var(--font-en);
        font-size: 0.9rem;
        opacity: 0.8;
        animation: bounce 2s infinite;
        z-index: 1;
    }

    .about__content {
        flex-direction: row;
        gap: 4rem;
    }

    .about__text {
        width: calc(55% - 2rem);
    }

    .about__stats {
        width: calc(55% - 2rem);
    }

    .section__title {
        font-size: 2.5rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .game-area {
        height: 60vh;
        min-height: 400px;
    }
    
    .game-container {
        padding: 1.5rem 0.5rem;
        min-height: auto;
    }
    
    .games__nav {
        gap: 0.5rem;
    }
    
    .game-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
