/* =========================================================
   gabs.games — Y2K Chrome Metallic Arcade Economy
   ========================================================= */

@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

:root {
    --indigo: #1a0a3e;
    --indigo-deep: #0f0729;
    --chrome: #c0c0c0;
    --chrome-light: #e8e8e8;
    --chrome-bright: #ffffff;
    --chrome-mid: #d0d0d0;
    --chrome-dark: #808080;
    --pink: #ff6ec7;
    --cyan: #00e5ff;
    --bubble-white: #f0f0ff;
    --gold: #ffd700;
    --plasma: #7b2ff7;
    --soft-violet: #f0f0ff;

    --bg: var(--indigo);
    --font-display: 'Orbitron', 'Inter', system-ui, sans-serif;
    --font-body: 'Exo 2', 'Inter', system-ui, sans-serif;
    --font-pixel: 'Press Start 2P', 'Inter', monospace;
}

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

html, body {
    background: var(--indigo);
    color: var(--bubble-white);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

body {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(123, 47, 247, 0.18), transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(255, 110, 199, 0.08), transparent 60%),
        radial-gradient(ellipse 60% 40% at 20% 90%, rgba(0, 229, 255, 0.07), transparent 60%),
        var(--indigo);
}

/* ----- CRT Scanlines & Flicker -------------------------- */
.crt-scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    background-image: linear-gradient(
        to bottom,
        transparent 0,
        transparent 1px,
        rgba(0, 0, 0, 0.18) 1px,
        rgba(0, 0, 0, 0.18) 2px
    );
    background-size: 100% 2px;
    mix-blend-mode: multiply;
}

.crt-flicker {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9001;
    background: rgba(255, 255, 255, 0.018);
    animation: crt-flicker 6s infinite steps(1);
}

@keyframes crt-flicker {
    0%, 95%, 100% { opacity: 0; }
    96% { opacity: 0.4; }
    97% { opacity: 0; }
    98% { opacity: 0.6; }
    99% { opacity: 0; }
}

/* ----- Sphere Field ------------------------------------- */
.sphere-field {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.chrome-sphere {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        var(--chrome-bright) 0%,
        var(--chrome-mid) 30%,
        var(--chrome) 60%,
        var(--chrome-dark) 100%
    );
    box-shadow:
        inset -6px -10px 18px rgba(0, 0, 0, 0.45),
        inset 4px 4px 10px rgba(255, 255, 255, 0.6),
        0 6px 18px rgba(0, 0, 0, 0.3);
    will-change: transform;
    animation: sphere-float var(--float-dur, 5s) ease-in-out infinite alternate;
}

.chrome-sphere::after {
    content: '';
    position: absolute;
    inset: 12% 12% auto auto;
    width: 28%;
    height: 28%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9), transparent 70%);
    filter: blur(2px);
}

@keyframes sphere-float {
    from { transform: translate3d(var(--tx, 0), 0, 0) rotate(0deg); }
    to   { transform: translate3d(var(--tx, 0), -10px, 0) rotate(8deg); }
}

/* ----- Chrome Text Effect ------------------------------- */
.chrome-text {
    background: linear-gradient(
        180deg,
        #e8e8e8 0%,
        #ffffff 25%,
        #b0b0b0 50%,
        #ffffff 75%,
        #d0d0d0 100%
    );
    background-size: 100% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: chrome-shift 4s ease-in-out infinite;
    text-shadow: 0 2px 30px rgba(192, 192, 192, 0.25);
}

@keyframes chrome-shift {
    0%   { background-position: 0 0; }
    100% { background-position: 0 200%; }
}

/* ----- Iridescent Border Mixin via class ---------------- */
.iri-border {
    position: relative;
    border: 2px solid transparent;
    background:
        linear-gradient(rgba(26, 10, 62, 0.55), rgba(26, 10, 62, 0.55)) padding-box,
        conic-gradient(
            from var(--border-angle),
            var(--chrome) 0deg,
            var(--pink) 90deg,
            var(--cyan) 180deg,
            var(--plasma) 240deg,
            var(--chrome) 360deg
        ) border-box;
    animation: border-spin 8s linear infinite;
}

@keyframes border-spin {
    to { --border-angle: 360deg; }
}

/* ----- Navigation Pill ---------------------------------- */
.nav-pill {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 10px 22px;
    border-radius: 999px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(26, 10, 62, 0.7);
    border: 1px solid rgba(192, 192, 192, 0.4);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 24px rgba(123, 47, 247, 0.18);
    font-family: var(--font-body);
    font-size: 0.85rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.nav-pill.is-pulled {
    transform: translateX(-50%) translateY(-2px) scale(0.98);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 12px 30px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(255, 110, 199, 0.25);
}

.nav-wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.95rem;
    color: var(--bubble-white);
}

.nav-gabs {
    background: linear-gradient(180deg, #ffffff, #c0c0c0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-dot {
    color: var(--pink);
    text-shadow: 0 0 8px rgba(255, 110, 199, 0.7);
}

.nav-games {
    color: var(--bubble-white);
    opacity: 0.85;
}

.nav-bubbles {
    list-style: none;
    display: flex;
    gap: 12px;
}

.bubble {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), rgba(192, 192, 192, 0.18) 60%, transparent 100%);
    border: 1px solid rgba(192, 192, 192, 0.55);
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.bubble::after {
    content: attr(data-label);
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    color: var(--bubble-white);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 0.08em;
    transition: opacity 0.3s ease;
}

.bubble:hover {
    transform: scale(1.18);
    box-shadow: 0 0 12px rgba(255, 110, 199, 0.6);
}

.bubble:hover::after { opacity: 1; }

.bubble.is-active {
    background: radial-gradient(circle at 30% 30%, #ffffff, #ff6ec7 50%, #00e5ff 100%);
    box-shadow: 0 0 14px rgba(255, 110, 199, 0.9), 0 0 24px rgba(0, 229, 255, 0.4);
    border-color: var(--chrome-bright);
}

.nav-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-coins {
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    color: var(--gold);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.nav-coins em {
    font-style: normal;
    color: var(--bubble-white);
    margin-left: 4px;
}

/* ----- Section base ------------------------------------- */
main {
    position: relative;
    z-index: 5;
}

section {
    position: relative;
    padding: 0 6vw;
}

.section-header {
    max-width: 1200px;
    margin: 0 auto 60px;
    text-align: left;
}

.section-tag {
    display: inline-block;
    color: var(--cyan);
    font-size: 0.55rem;
    letter-spacing: 0.18em;
    margin-bottom: 18px;
    padding: 6px 12px;
    border: 1px solid rgba(0, 229, 255, 0.45);
    border-radius: 4px;
    background: rgba(0, 229, 255, 0.06);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: 1;
    margin-bottom: 18px;
}

.section-sub {
    font-family: var(--font-body);
    color: rgba(240, 240, 255, 0.75);
    max-width: 56ch;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
}

.pixel {
    font-family: var(--font-pixel);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
}

.accent-pink { color: var(--pink); text-shadow: 0 0 12px rgba(255, 110, 199, 0.6); }
.accent-cyan { color: var(--cyan); text-shadow: 0 0 12px rgba(0, 229, 255, 0.6); }
.accent-gold { color: var(--gold); text-shadow: 0 0 12px rgba(255, 215, 0, 0.6); }

/* ============================================================
   1. CHROME LOBBY
   ============================================================ */
.chrome-lobby {
    min-height: 100vh;
    padding-top: 110px;
    padding-bottom: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
}

.lobby-grid-floor {
    position: absolute;
    bottom: -10vh;
    left: -10%;
    width: 120%;
    height: 60vh;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 110, 199, 0.14) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(700px) rotateX(70deg);
    transform-origin: 50% 100%;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 80%, transparent 100%);
    z-index: -1;
    opacity: 0.7;
    animation: floor-scroll 14s linear infinite;
}

@keyframes floor-scroll {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 0 60px, 60px 0; }
}

.lobby-inner {
    position: relative;
    width: 100%;
    max-width: 1300px;
    text-align: center;
    z-index: 2;
}

.hero-pretitle {
    color: var(--cyan);
    margin-bottom: 22px;
    letter-spacing: 0.18em;
    opacity: 0.85;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 30px;
}

.hero-gabs {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: clamp(3rem, 16vw, 11rem);
    line-height: 0.95;
    position: relative;
    display: inline-block;
}

.hero-gabs::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 229, 255, 0.4) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    transform: scaleY(-1) translateY(100%);
    opacity: 0.35;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 80%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 80%);
    pointer-events: none;
}

.hero-games {
    font-family: var(--font-body);
    font-weight: 600;
    font-style: normal;
    font-size: clamp(1.1rem, 2.4vw, 2rem);
    letter-spacing: 0.1em;
    text-transform: lowercase;
    padding: 6px 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid transparent;
    background:
        linear-gradient(rgba(26, 10, 62, 0.7), rgba(26, 10, 62, 0.7)) padding-box,
        conic-gradient(from var(--border-angle), var(--chrome), var(--pink), var(--cyan), var(--plasma), var(--chrome)) border-box;
    border: 2px solid transparent;
    animation: border-spin 8s linear infinite;
    color: var(--bubble-white);
}

.hero-games em { font-style: normal; }

.hero-kanji-stage {
    position: relative;
    height: clamp(160px, 22vw, 280px);
    margin: 8px auto 10px;
    width: clamp(180px, 28vw, 360px);
}

.hero-kanji,
.hero-kanji-reflection {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(8rem, 20vw, 18rem);
    line-height: 1;
}

.hero-kanji { top: 0; }

.hero-kanji-reflection {
    top: 0;
    transform: translateX(-50%) scaleY(-1);
    opacity: 0.45;
    mask-image: linear-gradient(to bottom, transparent 0%, transparent 30%, rgba(0, 0, 0, 0.4) 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 30%, rgba(0, 0, 0, 0.4) 100%);
    filter: blur(1px);
}

.hero-tag {
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    color: rgba(240, 240, 255, 0.85);
    max-width: 60ch;
    margin: 16px auto 32px;
}

.hero-coinbar {
    margin: 30px auto 22px;
    max-width: 460px;
}

.coin-slot {
    position: relative;
    height: 38px;
    border-radius: 6px;
    background:
        linear-gradient(180deg, #06030f 0%, #0f0729 50%, #06030f 100%);
    border-image: linear-gradient(to bottom, #ffffff, #808080, #404040, #808080, #ffffff) 1;
    border-style: solid;
    border-width: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 0 14px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(192, 192, 192, 0.4);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.4s ease;
}

.coin-slot:hover {
    box-shadow:
        inset 0 0 14px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(255, 110, 199, 0.4);
}

.coin-slot-label {
    color: var(--pink);
    text-shadow: 0 0 8px rgba(255, 110, 199, 0.7);
    z-index: 2;
    letter-spacing: 0.15em;
}

.coin-slot-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 30% 60% at 50% 50%, rgba(255, 110, 199, 0.5), transparent 70%);
    animation: pulse-glow 2.4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; transform: scale(0.95); }
    50% { opacity: 0.95; transform: scale(1.1); }
}

.hero-marquee {
    margin-top: 40px;
    border-top: 1px solid rgba(192, 192, 192, 0.25);
    border-bottom: 1px solid rgba(192, 192, 192, 0.25);
    padding: 12px 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
}

.marquee-track {
    display: inline-flex;
    gap: 36px;
    white-space: nowrap;
    animation: marquee 32s linear infinite;
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    color: rgba(240, 240, 255, 0.85);
    letter-spacing: 0.18em;
}

.marquee-track span:nth-child(even) { color: var(--pink); }
.marquee-track span:nth-child(4n) { color: var(--cyan); }

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================================================
   2. VALUE GRID (BENTO)
   ============================================================ */
.value-grid-section {
    padding-top: 120px;
    padding-bottom: 140px;
}

.bento-grid {
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(140px, auto);
    gap: 18px;
}

/* Hex node decorations sit at "intersections" */
.hex-node {
    position: absolute;
    width: 28px;
    height: 32px;
    background: linear-gradient(180deg, var(--chrome-bright), var(--chrome) 50%, var(--chrome-dark));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    box-shadow: 0 0 18px rgba(255, 110, 199, 0.4);
    z-index: 4;
    pointer-events: none;
}

.hex-1 { top: -14px; left: 30%; }
.hex-2 { top: 35%; right: -12px; }
.hex-3 { bottom: 30%; left: -12px; }
.hex-4 { bottom: -14px; right: 25%; }

.bento-cell {
    position: relative;
    padding: 26px 26px 24px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(192, 192, 192, 0.3);
    overflow: hidden;
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.4s ease, box-shadow 0.5s ease;
    isolation: isolate;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    color: var(--bubble-white);
}

.bento-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 1px;
    background: conic-gradient(
        from var(--border-angle),
        var(--chrome) 0deg,
        var(--pink) 90deg,
        var(--cyan) 180deg,
        var(--plasma) 240deg,
        var(--chrome) 360deg
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.35;
    animation: border-spin 8s linear infinite;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.bento-cell:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow:
        0 0 20px rgba(255, 110, 199, 0.2),
        inset 0 0 20px rgba(0, 229, 255, 0.1);
    border-color: rgba(192, 192, 192, 0.7);
}

.bento-cell:hover::before {
    opacity: 0.85;
    animation-duration: 4s;
}

/* Cell sizes */
.cell-feature { grid-column: span 7; grid-row: span 2; }
.cell-tall    { grid-column: span 5; grid-row: span 2; }
.cell-wide    { grid-column: span 8; grid-row: span 1; }
.cell-square  { grid-column: span 2; grid-row: span 1; }
.cell-mid     { grid-column: span 4; grid-row: span 1; }
.cell-accent  { grid-column: span 4; grid-row: span 1; }

.cell-meta {
    color: var(--cyan);
    margin-bottom: 16px;
    opacity: 0.85;
}

.cell-feature .cell-meta { color: var(--pink); }

.cell-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 2.6vw, 2.6rem);
    line-height: 1.05;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    margin-bottom: 14px;
    color: var(--bubble-white);
}

.cell-feature .cell-headline {
    font-size: clamp(2rem, 4vw, 3.4rem);
    text-transform: lowercase;
}

.cell-mini {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(0.85rem, 1vw, 1.05rem);
    letter-spacing: 0.1em;
    line-height: 1.1;
    color: var(--chrome-bright);
}

.cell-body {
    font-size: clamp(0.9rem, 1vw, 1rem);
    color: rgba(240, 240, 255, 0.78);
    line-height: 1.65;
}

.cell-readout {
    margin-top: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(192, 192, 192, 0.25);
}

.readout-key { color: var(--cyan); }
.readout-val { font-family: var(--font-display); font-weight: 700; color: var(--gold); letter-spacing: 0.1em; }

.cell-sphere {
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #d0d0d0 30%, #808080 70%, #404040 100%);
    box-shadow:
        inset -10px -16px 30px rgba(0, 0, 0, 0.6),
        inset 8px 8px 16px rgba(255, 255, 255, 0.7),
        0 10px 30px rgba(0, 0, 0, 0.4);
    opacity: 0.55;
    z-index: -1;
    pointer-events: none;
}

.cell-list {
    list-style: none;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cell-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: rgba(240, 240, 255, 0.85);
}

.cell-list .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #ff6ec7 60%, #00e5ff 100%);
    box-shadow: 0 0 8px rgba(255, 110, 199, 0.7);
}

.cell-bar {
    margin-top: 18px;
    height: 14px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(192, 192, 192, 0.3);
    overflow: hidden;
    position: relative;
}

.cell-bar-fill {
    height: 100%;
    width: 70%;
    background: linear-gradient(90deg, var(--cyan), var(--pink), var(--gold));
    box-shadow: 0 0 10px rgba(255, 110, 199, 0.6);
    animation: bar-pulse 5s ease-in-out infinite;
}

@keyframes bar-pulse {
    0%, 100% { width: 60%; }
    50%      { width: 92%; }
}

/* Orb cell */
.orb-wrap {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.orb {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #f0f0ff 30%, #ff6ec7 60%, #00e5ff 100%);
    box-shadow:
        0 0 18px rgba(255, 110, 199, 0.7),
        0 0 36px rgba(0, 229, 255, 0.4),
        inset -6px -10px 18px rgba(0, 0, 0, 0.4),
        inset 4px 4px 10px rgba(255, 255, 255, 0.7);
    animation: orb-drift 4s ease-in-out infinite;
}

@keyframes orb-drift {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-6px) scale(1.05); }
}

/* Pulse cell */
.pulse-wrap {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 12px;
}

.pulse {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--pink);
    animation: ring-pulse 2.4s ease-out infinite;
}
.pulse-2 { animation-delay: 0.8s; border-color: var(--cyan); }
.pulse-3 { animation-delay: 1.6s; border-color: var(--gold); }

@keyframes ring-pulse {
    0%   { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}

/* Credit display */
.cell-accent {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.credit-display {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.credit-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 3vw, 2.8rem);
    color: var(--gold);
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
    letter-spacing: 0.06em;
}

.credit-tag {
    color: var(--cyan);
    letter-spacing: 0.18em;
}

/* ============================================================
   3. COIN SLOT TRANSITION
   ============================================================ */
.coin-slot-section {
    min-height: 30vh;
    padding: 60px 6vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.slot-frame {
    position: relative;
    width: min(720px, 100%);
    cursor: pointer;
}

.slot-bevel {
    height: 4px;
    background: linear-gradient(to bottom, #ffffff, #c0c0c0, #404040);
    border-radius: 2px;
}

.slot-bevel-bottom {
    background: linear-gradient(to top, #ffffff, #c0c0c0, #404040);
}

.slot-darkness {
    position: relative;
    height: 90px;
    background:
        linear-gradient(180deg, #000 0%, #0a0418 100%);
    border-left: 4px solid;
    border-right: 4px solid;
    border-image: linear-gradient(to bottom, #ffffff, #808080, #404040, #808080, #ffffff) 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: box-shadow 0.4s ease;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.95),
        inset 0 4px 12px rgba(0, 0, 0, 0.9);
}

.slot-frame:hover .slot-darkness {
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.95),
        inset 0 4px 12px rgba(0, 0, 0, 0.9),
        0 0 40px rgba(255, 110, 199, 0.5);
}

.slot-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 35% 80% at 50% 50%, rgba(255, 110, 199, 0.45), transparent 70%);
    animation: pulse-glow 2.4s ease-in-out infinite;
}

.slot-text {
    position: relative;
    z-index: 2;
    color: var(--pink);
    font-size: 1.1rem;
    letter-spacing: 0.25em;
    text-shadow: 0 0 12px rgba(255, 110, 199, 0.85);
}

.slot-coin {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #ffd700 70%, #b8860b 100%);
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.6);
    opacity: 0;
    pointer-events: none;
}

.slot-coin.is-dropping {
    animation: coin-drop 0.9s cubic-bezier(0.5, 0.05, 0.6, 1.05) forwards;
}

@keyframes coin-drop {
    0%   { opacity: 1; top: -50px; transform: translateX(-50%) rotate(0); }
    70%  { opacity: 1; top: 35px; transform: translateX(-50%) rotate(540deg); }
    100% { opacity: 0; top: 70px; transform: translateX(-50%) rotate(720deg); }
}

.slot-instruction {
    color: rgba(240, 240, 255, 0.6);
    font-size: 0.9rem;
    text-align: center;
}

/* ============================================================
   4. SCORE TABLE
   ============================================================ */
.score-section {
    padding-top: 120px;
    padding-bottom: 140px;
}

.score-list {
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.score-row {
    display: grid;
    grid-template-columns: 60px 1.2fr 2fr 1.2fr 0.9fr;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid;
    border-image: linear-gradient(to right, transparent, var(--chrome) 30%, var(--chrome) 70%, transparent) 1;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.4s ease, transform 0.4s ease;
    transform-origin: center top;
}

.score-row:nth-child(odd) {
    background: rgba(255, 255, 255, 0.05);
}

.score-row[data-depth="1"] { font-size: 1.0rem; }
.score-row[data-depth="2"] { font-size: 1.05rem; }
.score-row[data-depth="3"] { font-size: 1.1rem; }
.score-row[data-depth="4"] { font-size: 1.18rem; }
.score-row[data-depth="5"] { font-size: 1.26rem; }
.score-row[data-depth="6"] { font-size: 1.36rem; }
.score-row[data-depth="7"] { font-size: 1.5rem; padding: 26px 24px; }

.score-row:hover {
    background: rgba(255, 110, 199, 0.08);
    transform: translateX(4px);
}

.score-rank {
    color: var(--gold);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.score-name {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--bubble-white);
    text-transform: uppercase;
}

.score-game {
    font-family: var(--font-body);
    color: rgba(240, 240, 255, 0.8);
    letter-spacing: 0.04em;
}

.score-value {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    text-align: right;
    letter-spacing: 0.06em;
}

.score-note {
    color: var(--pink);
    text-align: right;
}

/* ============================================================
   5. EXIT SCREEN
   ============================================================ */
.exit-section {
    min-height: 100vh;
    padding-top: 110px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.exit-orbits {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.iri-orb {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #ff6ec7 50%, #00e5ff 100%);
    box-shadow: 0 0 20px rgba(255, 110, 199, 0.7), 0 0 40px rgba(0, 229, 255, 0.4);
}

.iri-orb-1 { top: 24%; left: 18%; animation: iri-float 7s ease-in-out infinite; }
.iri-orb-2 { top: 30%; right: 20%; width: 18px; height: 18px; animation: iri-float 5s ease-in-out infinite reverse; }
.iri-orb-3 { bottom: 28%; left: 26%; width: 14px; height: 14px; animation: iri-float 9s ease-in-out infinite; }
.iri-orb-4 { bottom: 24%; right: 22%; animation: iri-float 6s ease-in-out infinite reverse; }

@keyframes iri-float {
    0%, 100% { transform: translateY(0) translateX(0); }
    50%      { transform: translateY(-22px) translateX(8px); }
}

.exit-kanji-wrap {
    position: relative;
    margin-bottom: 30px;
    height: clamp(220px, 30vw, 380px);
    width: clamp(220px, 30vw, 380px);
}

.exit-kanji,
.exit-kanji-reflection {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(11rem, 28vw, 22rem);
    line-height: 1;
}

.exit-kanji { top: 0; }

.exit-kanji-reflection {
    top: 0;
    transform: translateX(-50%) scaleY(-1);
    opacity: 0.42;
    mask-image: linear-gradient(to bottom, transparent 0%, transparent 30%, rgba(0, 0, 0, 0.4) 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 30%, rgba(0, 0, 0, 0.4) 100%);
    filter: blur(1.5px);
}

.exit-statement {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: clamp(1.05rem, 1.6vw, 1.4rem);
    color: var(--bubble-white);
    max-width: 56ch;
    margin-bottom: 30px;
    line-height: 1.5;
}

.exit-signoff {
    color: rgba(240, 240, 255, 0.55);
    letter-spacing: 0.18em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .cell-feature, .cell-tall, .cell-wide, .cell-mid, .cell-accent {
        grid-column: span 12;
    }
    .cell-square { grid-column: span 6; }

    .score-row {
        grid-template-columns: 50px 1fr 1fr;
        grid-template-areas:
            "rank name value"
            "rank game note";
        gap: 6px 12px;
    }
    .score-rank { grid-area: rank; }
    .score-name { grid-area: name; }
    .score-game { grid-area: game; font-size: 0.85em; }
    .score-value { grid-area: value; }
    .score-note { grid-area: note; }
}

@media (max-width: 768px) {
    .crt-scanlines { display: none; }
    .nav-pill { gap: 14px; padding: 8px 14px; }
    .nav-meta { display: none; }
    .bento-cell { padding: 20px; }
    .hero-marquee { font-size: 0.5rem; }
    .chrome-text {
        animation: none;
        background-position: 0 50%;
    }
}

@media (max-width: 520px) {
    section { padding: 0 4vw; }
    .nav-wordmark { font-size: 0.75rem; }
    .nav-bubbles { gap: 8px; }
    .bubble { width: 11px; height: 11px; }
    .hero-gabs { font-size: clamp(2.5rem, 18vw, 6rem); }
}
