/* =========================================
   Variables
   ========================================= */
:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --accent: #10b981;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* =========================================
   Reset & Base
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

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

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

/* =========================================
   Utilities (Glassmorphism & Animation)
   ========================================= */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

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

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

.section {
    padding: 6rem 0;
}

.alternate-bg {
    background: linear-gradient(to bottom, #0f172a, #1e293b, #0f172a);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-desc {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.title {
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.highlight {
    color: var(--accent);
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.scroll-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.scroll-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

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

/* Background Shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 1;
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* =========================================
   Game Section
   ========================================= */
.game-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .game-wrapper {
        grid-template-columns: 2fr 1fr;
    }
}

.game-container {
    position: relative;
    padding: 1rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.game-container iframe {
    max-width: 100%;
    border-radius: 8px;
    /* WebGLコンテンツの比率を維持するためのスタイル */
    aspect-ratio: 960 / 600;
    width: 100%;
    height: auto;
}

.fullscreen-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.fullscreen-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.fullscreen-btn svg {
    width: 18px;
    height: 18px;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    padding: 1.5rem;
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-hover);
}

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

.controls {
    list-style: none;
}

.controls li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-main);
    box-shadow: 0 2px 0 rgba(0,0,0,0.5);
}

/* =========================================
   Kikaku Section
   ========================================= */
.kikaku-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .kikaku-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.kikaku-item {
    padding: 1rem;
    transition: transform 0.3s ease;
}

.kikaku-item:hover {
    transform: translateY(-10px);
}

.kikaku-item img {
    border-radius: 8px;
    width: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

/* =========================================
   Gallery Section
   ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-item {
    padding: 0.5rem;
    overflow: hidden;
    cursor: zoom-in;
}

.gallery-item img {
    border-radius: 12px;
    transition: transform 0.5s ease;
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* =========================================
   Lightbox Modal
   ========================================= */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-image-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    user-select: none;
    cursor: pointer; /* クリックで切り替えることを示すため */
}

.lightbox.show .lightbox-content {
    transform: scale(1);
}

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

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--primary);
    text-decoration: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-nav:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* =========================================
   Video Section
   ========================================= */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 12px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* =========================================
   Footer
   ========================================= */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}
