@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:wght@400;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 Palette */
    --bg-paper: #F1E6CB;
    --text-ink: #3A2516;
    --c-red: #E5392A;
    --c-pink: #E54489;
    --c-orange: #F09131;
    --c-yellow: #F0BC2A;
    --c-green: #3D9F47;
    --c-blue: #3F8BC4;
    --c-white: #FAFCF5;

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

    /* Layout */
    --container-width: 1380px;
    --spacing-desktop: 100px;
    --nav-height: 90px;
}

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

body {
    background-color: var(--bg-paper);
    color: var(--text-ink);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Paper Texture Dot Grid */
    background-image: 
        radial-gradient(var(--text-ink) 0.5px, transparent 0.5px), 
        radial-gradient(var(--text-ink) 0.5px, var(--bg-paper) 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

/* Global Rainbow Ribbon */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; height: 12px;
    background: linear-gradient(90deg, var(--c-red) 0 16.6%, var(--c-pink) 16.6% 33.3%, var(--c-orange) 33.3% 50%, var(--c-yellow) 50% 66.6%, var(--c-green) 66.6% 83.3%, var(--c-blue) 83.3% 100%);
    z-index: 9999;
    border-bottom: 3px solid var(--text-ink);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-ink);
    line-height: 1.1;
}

h1 { font-size: 5rem; }
h2 { font-size: 3.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }

a {
    text-decoration: none;
    color: var(--text-ink);
    transition: all 0.2s ease;
    font-weight: 700;
}

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

/* Utilities */
.text-accent {
    color: var(--c-red);
    text-shadow: 2px 2px 0px var(--text-ink);
}
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Japanese Kanji Decorative Elements */
.kanji-badge {
    display: inline-block;
    background: var(--c-red);
    color: var(--c-white);
    font-family: var(--font-jp);
    padding: 4px 10px;
    font-size: 1rem;
    font-weight: 900;
    border: 3px solid var(--text-ink);
    transform: rotate(-4deg);
    margin-right: 15px;
    box-shadow: 3px 3px 0px var(--text-ink);
    vertical-align: middle;
}

/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 35px;
    font-family: var(--font-head);
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: 1px;
    border: 3px solid var(--text-ink);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    text-transform: uppercase;
    position: relative;
    box-shadow: 6px 6px 0px var(--text-ink);
    text-decoration: none;
}
.btn-primary {
    background: var(--c-yellow);
    color: var(--text-ink);
}
.btn-primary:hover {
    background: var(--c-orange);
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0px var(--text-ink);
}
.btn-outline {
    background: var(--c-white);
    color: var(--text-ink);
}
.btn-outline:hover {
    background: var(--c-pink);
    color: var(--c-white);
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0px var(--text-ink);
}

/* Navigation - Cassette Style */
.cassette-nav {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1400px;
    height: 70px;
    background: var(--c-white);
    border: 3px solid var(--text-ink);
    box-shadow: 6px 6px 0px var(--text-ink);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 20px;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.nav-left .logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-ink);
    text-transform: uppercase;
}
.logo-icon {
    height: 40px;
    border: 2px solid var(--text-ink);
    background: var(--c-yellow);
    padding: 4px;
}
.nav-center { display: flex; gap: 20px; }
.nav-link {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-ink);
    text-transform: uppercase;
    padding: 5px 12px;
    border: 2px solid transparent;
}
.nav-link:hover, .nav-link.active {
    border-color: var(--text-ink);
    background: var(--c-blue);
    color: var(--c-white);
}
.mobile-toggle {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-ink);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: calc(var(--nav-height) + 40px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 150%; height: 150%;
    background: repeating-linear-gradient(45deg, var(--c-red) 0, var(--c-red) 40px, var(--c-pink) 40px, var(--c-pink) 80px, var(--c-orange) 80px, var(--c-orange) 120px, var(--c-yellow) 120px, var(--c-yellow) 160px, var(--c-green) 160px, var(--c-green) 200px, var(--c-blue) 200px, var(--c-blue) 240px);
    z-index: 0;
    opacity: 0.15;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero-content {
    background: var(--c-white);
    padding: 40px;
    border: 4px solid var(--text-ink);
    box-shadow: 12px 12px 0px var(--text-ink);
    position: relative;
}
.hero-content::before {
    content: '';
    position: absolute;
    top: -4px; right: -4px;
    width: 40px; height: 40px;
    background: var(--c-red);
    border: 4px solid var(--text-ink);
    border-top: none; border-right: none;
}
.jis-specs {
    display: flex;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.jis-specs span {
    border: 2px solid var(--text-ink);
    padding: 2px 8px;
    background: var(--bg-paper);
}
.hero-content h1 { margin-bottom: 25px; }
.hero-desc {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 35px;
}
.hero-buttons { display: flex; gap: 20px; margin-bottom: 30px; }
.hero-disclaimer {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: var(--c-yellow);
    padding: 15px;
    border: 2px solid var(--text-ink);
    font-weight: 700;
}
.hero-visual img {
    border: 4px solid var(--text-ink);
    box-shadow: 15px 15px 0px var(--c-pink);
    background: var(--c-white);
    padding: 15px;
}

/* Stats Section */
.stats-section {
    background: var(--text-ink);
    color: var(--c-white);
    padding: 60px 0;
    border-top: 5px solid var(--text-ink);
    border-bottom: 5px solid var(--text-ink);
    position: relative;
}
.stats-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 8px;
    background: repeating-linear-gradient(90deg, var(--c-white), var(--c-white) 10px, transparent 10px, transparent 20px);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}
.stat-item h4 {
    color: var(--c-yellow);
    font-size: 4rem;
    text-shadow: 3px 3px 0px var(--c-red);
    margin-bottom: 10px;
}
.stat-item p {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
}

/* Features Grid */
.features-section { padding: var(--spacing-desktop) 0; }
.section-title { text-align: center; margin-bottom: 60px; font-size: 4rem; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}
.feature-card {
    background: var(--c-white);
    border: 4px solid var(--text-ink);
    padding: 40px;
    box-shadow: 8px 8px 0px var(--c-blue);
    position: relative;
    transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: 12px 12px 0px var(--c-blue); }
.feature-card::before {
    content: '';
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 10px;
    background: var(--bg-paper);
    border: 3px solid var(--text-ink);
    border-bottom: none;
}
.feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 25px;
    border: 3px solid var(--text-ink);
    padding: 5px;
    background: var(--c-yellow);
}
.feature-card h3 { margin-bottom: 15px; color: var(--c-red); }
.feature-card p { font-weight: 600; font-size: 1.1rem; }

/* Sub Pages Base (Legal, Content) */
.page-header {
    padding: calc(var(--nav-height) + 60px) 0 50px;
    text-align: center;
    background: var(--c-green);
    border-bottom: 5px solid var(--text-ink);
    position: relative;
    overflow: hidden;
}
.page-header::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(58,37,22,0.1) 10px, rgba(58,37,22,0.1) 20px);
    z-index: 1;
}
.page-header h1 {
    position: relative;
    z-index: 2;
    color: var(--c-white);
    text-shadow: 4px 4px 0px var(--text-ink);
    font-size: 5rem;
}
.page-header p {
    position: relative;
    z-index: 2;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-ink);
    background: var(--c-yellow);
    display: inline-block;
    padding: 10px 20px;
    border: 3px solid var(--text-ink);
}

.content-section { padding: var(--spacing-desktop) 0; max-width: 1000px; margin: 0 auto; }
.printed-panel {
    background: var(--c-white);
    border: 4px solid var(--text-ink);
    box-shadow: 12px 12px 0px var(--text-ink);
    padding: 60px;
    position: relative;
}
.printed-panel::before {
    content: "☑ TYPE I  ☐ TYPE II  ☐ TYPE IV";
    position: absolute;
    top: -15px; right: 30px;
    background: var(--c-yellow);
    padding: 4px 15px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    border: 3px solid var(--text-ink);
}
.printed-panel h2 { color: var(--c-blue); margin: 50px 0 20px; border-bottom: 4px solid var(--text-ink); padding-bottom: 10px; display: inline-block; }
.printed-panel h2:first-child { margin-top: 0; }
.printed-panel h3 { color: var(--c-red); margin: 30px 0 15px; }
.printed-panel p { margin-bottom: 25px; font-size: 1.15rem; font-weight: 600; }
.printed-panel ul { margin: 0 0 30px 20px; font-weight: 600; font-size: 1.15rem; list-style: none; }
.printed-panel li { margin-bottom: 12px; position: relative; padding-left: 25px; }
.printed-panel li::before { content: "■"; position: absolute; left: 0; top: 2px; color: var(--c-orange); font-size: 1rem; }

/* Slot Game Area */
.game-section { padding: 80px 0; background: var(--c-orange); border-top: 5px solid var(--text-ink); border-bottom: 5px solid var(--text-ink); }
.game-header { text-align: center; margin-bottom: 50px; background: var(--c-white); border: 4px solid var(--text-ink); padding: 30px; box-shadow: 8px 8px 0px var(--text-ink); }
.game-header h2 { font-size: 4rem; margin-bottom: 15px; }
.game-header p { font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; }
.game-wrapper {
    background: var(--bg-paper);
    border: 5px solid var(--text-ink);
    box-shadow: 15px 15px 0px var(--text-ink);
    padding: 25px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}
.game-wrapper::before {
    content: "TAPE COUNTER: 000";
    position: absolute;
    top: -20px; left: 30px;
    background: var(--text-ink);
    color: var(--c-green);
    font-family: var(--font-mono);
    padding: 5px 15px;
    border: 3px solid var(--text-ink);
}
.game-frame-container { border: 4px solid var(--text-ink); background: var(--text-ink); position: relative; width: 100%; padding-bottom: 56.25%; overflow: hidden; }
.game-frame-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.game-controls { display: flex; justify-content: space-between; padding-top: 25px; }

/* Cassette Footer */
.cassette-footer {
    background: var(--bg-paper);
    padding: 80px 0 30px;
    border-top: 5px solid var(--text-ink);
    position: relative;
    margin-top: 60px;
}
.cassette-footer::before {
    content: '';
    position: absolute;
    top: -5px; left: 0; right: 0; height: 12px;
    background: linear-gradient(90deg, var(--c-red) 0 16.6%, var(--c-pink) 16.6% 33.3%, var(--c-orange) 33.3% 50%, var(--c-yellow) 50% 66.6%, var(--c-green) 66.6% 83.3%, var(--c-blue) 83.3% 100%);
    border-bottom: 3px solid var(--text-ink);
    border-top: 3px solid var(--text-ink);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 50px; margin-bottom: 60px; }
.footer-logo { height: 50px; margin-bottom: 25px; border: 3px solid var(--text-ink); background: var(--c-white); padding: 5px; }
.brand-desc { font-weight: 700; margin-bottom: 20px; font-family: var(--font-mono); }
.footer-col h4 { font-size: 1.8rem; margin-bottom: 25px; border-bottom: 3px solid var(--text-ink); display: inline-block; padding-bottom: 5px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 15px; }
.footer-links a { font-weight: 700; position: relative; padding-left: 15px; }
.footer-links a::before { content: '>'; position: absolute; left: 0; color: var(--c-red); }
.footer-links a:hover { color: var(--c-blue); }
.disclaimer-box { background: var(--c-white); padding: 20px; border: 3px solid var(--text-ink); box-shadow: 4px 4px 0px var(--text-ink); }
.disclaimer-box p { font-size: 0.85rem; font-family: var(--font-mono); font-weight: 700; }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 3px dashed var(--text-ink); font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem; }

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-content { margin-bottom: 40px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-center, .nav-right { display: none; }
    .mobile-toggle { display: block; }
}
@media (max-width: 768px) {
    :root { --spacing-desktop: 60px; }
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .printed-panel { padding: 30px; }
    .game-header h2 { font-size: 2.5rem; }
}