@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:wght@400;500;600;700&family=Big+Shoulders+Display:wght@700;800;900&family=JetBrains+Mono:wght@400;700&family=Noto+Sans+JP:wght@700;900&display=swap');

:root {
    /* Sakura Chroma System */
    --paper: #F1E6CB;
    --ink: #3A2516;
    --red: #E5392A;
    --pink: #E54489;
    --orange: #F09131;
    --yellow: #F0BC2A;
    --green: #3D9F47;
    --blue: #3F8BC4;

    /* Typography */
    --font-display: 'Big Shoulders Display', sans-serif;
    --font-body: 'Albert Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-jp: 'Noto Sans JP', sans-serif;

    /* Legacy Map (Preserving structure) */
    --bg-deep-void: var(--paper);
    --bg-midnight-reef: var(--paper);
    --bg-crystal-water: var(--paper);
    
    --text-primary: var(--ink);
    --text-secondary: var(--ink);
    --text-muted: #7A665A;

    /* Layout */
    --container-max: 1380px;
    --space-desktop: 130px;
    --space-tablet: 90px;
    --space-mobile: 60px;
    --border-width: 4px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Subtle dot grid for paper texture */
    background-image: radial-gradient(var(--ink) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Diagonal Rainbow Ribbon Overlay */
.caustics-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.caustics-overlay::before {
    content: '';
    position: absolute;
    top: -50%; 
    left: -50%;
    width: 200%; 
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent, transparent 100px,
        var(--red) 100px, var(--red) 110px,
        var(--orange) 110px, var(--orange) 120px,
        var(--yellow) 120px, var(--yellow) 130px,
        var(--green) 130px, var(--green) 140px,
        var(--blue) 140px, var(--blue) 150px,
        var(--pink) 150px, var(--pink) 160px
    );
    opacity: 0.15;
    animation: ribbon-slide 60s linear infinite;
}

@keyframes ribbon-slide {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

.ocean-bg {
    display: none;
}

/* Floaty Retro Spec Shapes instead of Bubbles */
.bubbles-container {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -100px;
    border: var(--border-width) solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    background: var(--blue);
    animation: retro-float infinite linear;
}
.bubble:nth-child(2n) { background: var(--pink); border-radius: 50%; }
.bubble:nth-child(3n) { background: var(--yellow); }
.bubble:nth-child(4n) { background: var(--green); border-radius: 50%; }
.bubble:nth-child(5n) { background: var(--orange); }

@keyframes retro-float {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-110vh) rotate(360deg); opacity: 1; }
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--ink);
}

h1 {
    font-size: clamp(3.5rem, 7vw, 6rem);
    color: var(--red);
    text-shadow: 4px 4px 0 var(--ink), 8px 8px 0 var(--yellow);
    letter-spacing: -1px;
}

h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    text-shadow: 3px 3px 0 var(--pink);
}

h3 {
    font-size: 2rem;
    color: var(--blue);
    text-shadow: 2px 2px 0 var(--ink);
}

p {
    color: var(--ink);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.mono-text {
    font-family: var(--font-mono);
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Japanese Kanji Micro-Type Decorator */
.jp-micro {
    font-family: var(--font-jp);
    font-size: 0.5em;
    color: var(--ink);
    vertical-align: super;
    margin-left: 8px;
    font-weight: 900;
    background: var(--yellow);
    padding: 0 6px;
    border: 2px solid var(--ink);
    letter-spacing: 0;
    text-shadow: none;
    display: inline-block;
    line-height: 1.2;
}

h1 .jp-micro { background: var(--blue); color: var(--paper); }
.btn .jp-micro { background: var(--paper); color: var(--ink); border-width: 2px; }

/* Layout Utilities */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.glass-panel {
    background: #fff;
    border: var(--border-width) solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
    border-radius: 0;
    position: relative;
    padding: 2.5rem;
}

.section-spacing {
    padding: var(--space-desktop) 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border: var(--border-width) solid var(--ink);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.2rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 6px 6px 0 var(--ink);
    border-radius: 0;
}

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

.btn-primary:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 var(--ink);
    background: var(--orange);
}

.btn-secondary {
    background: var(--yellow);
    color: var(--ink);
}

.btn-secondary:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 var(--ink);
    background: var(--green);
}

/* Header */
header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: var(--container-max);
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--paper);
    border: var(--border-width) solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
    background-image: radial-gradient(var(--ink) 1px, transparent 1px);
    background-size: 20px 20px;
}

.nav-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(241, 230, 203, 0.95);
    z-index: -1;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.logo-icon {
    width: 32px; 
    height: 32px;
    background: var(--red);
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12c0 2.85 1.2 5.41 3.12 7.23l1.42-1.42C5.01 16.35 4 14.3 4 12c0-4.41 3.59-8 8-8s8 3.59 8 8c0 2.3-.98 4.35-2.54 5.81l1.42 1.42C20.8 17.41 22 14.85 22 12zM12 6c-3.31 0-6 2.69-6 6 0 1.74.75 3.3 1.95 4.39l1.43-1.43C8.54 14.24 8 13.19 8 12c0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.19-.54 2.24-1.38 2.96l1.43 1.43C17.25 15.3 18 13.74 18 12c0-3.31-2.69-6-6-6zm0 4c-1.1 0-2 .9-2 2 0 .58.26 1.1.66 1.46l1.43-1.43C12.04 12 12 12 12 12c0-.55.45-1 1-1s1 .45 1 1c0 .04-.04.04-.04.04l1.43 1.43c.4-.36.66-.88.66-1.46 0-1.1-.9-2-2-2z"/></svg>') center/cover;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12c0 2.85 1.2 5.41 3.12 7.23l1.42-1.42C5.01 16.35 4 14.3 4 12c0-4.41 3.59-8 8-8s8 3.59 8 8c0 2.3-.98 4.35-2.54 5.81l1.42 1.42C20.8 17.41 22 14.85 22 12zM12 6c-3.31 0-6 2.69-6 6 0 1.74.75 3.3 1.95 4.39l1.43-1.43C8.54 14.24 8 13.19 8 12c0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.19-.54 2.24-1.38 2.96l1.43 1.43C17.25 15.3 18 13.74 18 12c0-3.31-2.69-6-6-6zm0 4c-1.1 0-2 .9-2 2 0 .58.26 1.1.66 1.46l1.43-1.43C12.04 12 12 12 12 12c0-.55.45-1 1-1s1 .45 1 1c0 .04-.04.04-.04.04l1.43 1.43c.4-.36.66-.88.66-1.46 0-1.1-.9-2-2-2z"/></svg>') center/cover;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--ink);
    letter-spacing: 1px;
}

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

.nav-links a {
    color: var(--ink);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-display);
    text-transform: uppercase;
    position: relative;
    padding-bottom: 5px;
}

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

.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta .btn { padding: 0.6rem 1.5rem; font-size: 1rem; box-shadow: 4px 4px 0 var(--ink); }

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 120px; padding-bottom: 80px; }

.hero-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 4rem; 
    align-items: center; 
    background: #fff;
    padding: 4rem;
    border: var(--border-width) solid var(--ink);
    box-shadow: 16px 16px 0 var(--ink);
    position: relative;
}

.hero-grid::after {
    content: '';
    position: absolute;
    top: -16px; left: -16px; right: -16px; bottom: -16px;
    border: 3px dashed var(--red);
    pointer-events: none;
    z-index: -1;
}

.hero-content { display: flex; flex-direction: column; align-items: flex-start; position: relative; z-index: 2; text-align: left; }

.disclaimer-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--yellow);
    border: 3px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.hero-buttons { display: flex; gap: 1.5rem; margin-top: 2rem; width: 100%; }

.hero-image-wrapper {
    position: relative;
    border: var(--border-width) solid var(--ink);
    box-shadow: 12px 12px 0 var(--blue);
    background: var(--paper);
    overflow: hidden;
    transform: rotate(2deg);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.hero-image-wrapper:hover {
    transform: rotate(-1deg) scale(1.02);
    box-shadow: 16px 16px 0 var(--pink);
}

.hero-img {
    width: 100%; height: auto; display: block;
    mix-blend-mode: multiply;
    filter: sepia(0.6) contrast(1.2) saturate(1.8) hue-rotate(-10deg);
}

.floating-element {
    animation: float-hero 6s ease-in-out infinite;
}

@keyframes float-hero {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

/* Game Section */
.game-section { position: relative; z-index: 5; }
.game-header { text-align: center; margin-bottom: 3rem; }

.game-container {
    width: 100%; max-width: 1240px; margin: 0 auto;
    aspect-ratio: 16/9;
    padding: 0;
    background: var(--ink);
    border: var(--border-width) solid var(--ink);
    box-shadow: 12px 12px 0 var(--red);
    position: relative;
    overflow: hidden;
}

.game-container iframe { width: 100%; height: 100%; border: none; background: #000; }
.game-controls { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; }

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

.feature-card {
    padding: 2.5rem;
    background: #fff;
    border: var(--border-width) solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.feature-card::before {
    content: '☑';
    position: absolute;
    top: 1rem; right: 1.5rem;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--ink);
}

.feature-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0 var(--pink);
}

.feature-icon {
    width: 60px; height: 60px;
    background: var(--yellow);
    border: 3px solid var(--ink);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 4px 4px 0 var(--ink);
}

/* Stats */
.stats-section {
    position: relative;
    background: var(--ink);
    color: var(--paper);
    border-top: var(--border-width) solid var(--ink);
    border-bottom: var(--border-width) solid var(--ink);
    padding: 4rem 0;
}

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }

.stat-item {
    background: var(--paper);
    padding: 2rem;
    border: var(--border-width) solid var(--ink);
    box-shadow: 6px 6px 0 var(--red);
    position: relative;
}

.stat-item::before {
    content: '☑ SPEC';
    position: absolute;
    top: -15px; left: 20px;
    background: var(--yellow);
    color: var(--ink);
    padding: 2px 10px;
    border: 3px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
}

.stat-item h4 {
    font-size: 3rem;
    color: var(--red);
    text-shadow: 2px 2px 0 var(--ink);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--ink);
    margin-bottom: 0;
    font-weight: 700;
}

/* Legal Pages */
.legal-header { text-align: center; padding: 150px 0 50px; }
.legal-content-wrapper { max-width: 900px; margin: 0 auto; padding: 3rem; margin-bottom: var(--space-desktop); }
.legal-content-wrapper h2 {
    font-size: 2.2rem; margin-top: 3rem; color: var(--blue);
    border-bottom: 4px solid var(--ink); padding-bottom: 0.5rem;
}
.legal-content-wrapper h3 { font-size: 1.5rem; margin-top: 1.5rem; }
.legal-content-wrapper ul { margin-bottom: 1.5rem; padding-left: 2rem; color: var(--ink); font-weight: 500; }
.legal-content-wrapper li { margin-bottom: 0.5rem; }
.legal-content-wrapper p strong { font-weight: 700; color: var(--red); }

/* Full Game Page */
.full-game-page { padding-top: 120px; margin-bottom: 4rem; }
.full-game-container { max-width: var(--container-max); margin: 0 auto; padding: 0 2rem; }
.game-meta { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2rem; border-bottom: 4px solid var(--ink); padding-bottom: 1rem; }
.game-wrapper {
    aspect-ratio: 16/9;
    border: var(--border-width) solid var(--ink);
    box-shadow: 12px 12px 0 var(--ink);
    background: var(--ink);
}
.game-wrapper iframe { width: 100%; height: 100%; border: none; }

/* Footer */
footer {
    background: var(--paper);
    border-top: 8px solid var(--ink);
    padding: 4rem 0 2rem;
    position: relative;
}

footer::before {
    content: ''; position: absolute;
    top: -8px; left: 0; width: 100%; height: 8px;
    background: repeating-linear-gradient(90deg, var(--red) 0, var(--red) 20px, var(--yellow) 20px, var(--yellow) 40px, var(--blue) 40px, var(--blue) 60px);
}

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 4rem; margin-bottom: 4rem; }
.footer-brand p { margin-top: 1.5rem; font-size: 1rem; font-weight: 500; }
.footer-title { font-size: 1.5rem; color: var(--red); margin-bottom: 1.5rem; }
.footer-links { list-style: none; font-family: var(--font-mono); font-weight: 700; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: var(--ink); text-decoration: none; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--pink); text-decoration: underline; }
.footer-contact p { font-family: var(--font-mono); font-size: 0.9rem; margin-bottom: 0.5rem; font-weight: 700; }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 4px solid var(--ink); }
.footer-disclaimer { font-size: 0.85rem; font-weight: 700; max-width: 800px; margin: 0 auto 1rem; font-family: var(--font-mono); }

/* Responsive */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; padding: 2.5rem; gap: 2.5rem; }
    .hero-content { align-items: center; text-align: center; }
    .hero-buttons { justify-content: center; flex-wrap: wrap; }
    .hero-image-wrapper { max-width: 600px; margin: 0 auto; transform: none; }
    .hero-image-wrapper:hover { transform: none; }
    .hero-grid::after { top: -10px; left: -10px; right: -10px; bottom: -10px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; }
}
@media (max-width: 768px) {
    :root { --space-desktop: var(--space-mobile); }
    .hero-grid { padding: 1.5rem; }
    .hero-grid::after { top: -6px; left: -6px; right: -6px; bottom: -6px; }
    .stats-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .hero { padding-top: 120px; }
    .legal-content-wrapper { padding: 1.5rem; }
    .game-meta { flex-direction: column; align-items: flex-start; gap: 1rem; }
}