/* ── DESIGN SYSTEM & RESET ─────────────────────────────────────── */
:root {
    --bg-color: #0d0b18;
    --console-color: #3b3a4a;
    --screen-bg: #141221;
    --border-color: #4a485e;
    --border-glow: #1a172e;
    
    /* Neon Palettes */
    --neon-pink: #ff0066;
    --neon-cyan: #00f0ff;
    --neon-green: #39e75f;
    --neon-yellow: #f1c40f;
    --neon-purple: #9b59b6;
    --text-white: #e8e6f4;
    --text-muted: #8b88a5;
    
    /* Fonts */
    --font-pixel-heading: "Press Start 2P", monospace;
    --font-pixel-sans: "Pixelify Sans", sans-serif;
    --font-pixel-mono: "VT323", monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    font-family: var(--font-pixel-sans), monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 20px;
    background-image: radial-gradient(circle at center, #1b1635 0%, #06050b 100%);
}

/* ── CRT GLITCH & SCREEN EFFECTS ─────────────────────────────────── */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
    z-index: 1000;
    mix-blend-mode: overlay;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1001;
}

.crt-flicker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 16, 16, 0.05);
    opacity: 0;
    pointer-events: none;
    z-index: 1002;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.08; }
    50% { opacity: 0.05; }
    100% { opacity: 0.09; }
}

/* ── CONSOLE SHELL CONTAINER ─────────────────────────────────────── */
.console-casing {
    width: 100%;
    max-width: 1100px;
    background-color: var(--console-color);
    border: 8px solid #2a2936;
    border-radius: 24px;
    box-shadow: 
        0 20px 0 #1e1e27,
        0 30px 40px rgba(0, 0, 0, 0.6),
        inset 0 6px 0 rgba(255,255,255,0.15),
        inset 0 -6px 0 rgba(0,0,0,0.3);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    border-bottom-width: 16px;
}

/* Console Header */
.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    border-bottom: 4px double #252430;
    padding-bottom: 12px;
}

.led-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #641118;
    box-shadow: inset 0 2px 2px rgba(0,0,0,0.5);
    transition: all 0.3s;
}

.led-indicator.active {
    background-color: #ff3b30;
    box-shadow: 
        0 0 10px #ff3b30,
        inset 0 1px 1px rgba(255,255,255,0.5);
}

.console-brand {
    font-family: var(--font-pixel-heading);
    font-size: 14px;
    color: #8b88a5;
    text-shadow: 1px 1px 0 #181722;
    letter-spacing: 2px;
}

/* ── SCREEN FRAME (CRT HOUSING) ────────────────────────────────── */
.screen-frame {
    background-color: var(--screen-bg);
    border: 12px solid #1a1926;
    border-radius: 12px;
    box-shadow: 
        inset 0 0 30px rgba(0, 0, 0, 0.9),
        0 4px 0 rgba(255,255,255,0.05);
    height: 640px;
    overflow: hidden;
    position: relative;
}

.game-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    padding: 16px;
    overflow-y: auto;
}

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

/* Custom Scrollbar for Inside Screen */
.game-section::-webkit-scrollbar {
    width: 12px;
}
.game-section::-webkit-scrollbar-track {
    background: #0d0b18;
    border-left: 2px solid #201d33;
}
.game-section::-webkit-scrollbar-thumb {
    background: #4a485e;
    border: 3px solid #0d0b18;
    box-shadow: inset 1px 1px 0 rgba(255,255,255,0.2);
}

/* ── SECTION 1: START SCREEN ───────────────────────────────────── */
#start-screen {
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, #09061c 0%, #16122d 60%, #291b48 100%);
    padding: 30px 20px;
}

.sky-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    pointer-events: none;
    z-index: 1;
}

.pixel-clouds {
    position: absolute;
    top: 30px;
    left: -100px;
    width: 128px;
    height: 48px;
    background: rgba(255,255,255,0.1);
    box-shadow: 
        16px 16px 0 rgba(255,255,255,0.1),
        48px 0px 0 rgba(255,255,255,0.1),
        32px -16px 0 rgba(255,255,255,0.1);
    animation: moveClouds 25s linear infinite;
}

@keyframes moveClouds {
    to { transform: translateX(1200px); }
}

.pixel-sun {
    position: absolute;
    top: 20px;
    right: 40px;
    width: 48px;
    height: 48px;
    background-color: rgba(241, 196, 15, 0.15);
    box-shadow: 
        0 0 16px rgba(241, 196, 15, 0.1),
        0 8px 0 rgba(241, 196, 15, 0.15),
        8px 0px 0 rgba(241, 196, 15, 0.15),
        -8px 0px 0 rgba(241, 196, 15, 0.15),
        0 -8px 0 rgba(241, 196, 15, 0.15);
}

.splash-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    gap: 30px;
    width: 100%;
}

.splash-logo-container {
    text-align: center;
}

.splash-title {
    font-family: var(--font-pixel-heading);
    font-size: 52px;
    color: var(--neon-yellow);
    text-shadow: 
        0 6px 0 #a04000,
        0 12px 0 #501000,
        0 0 20px rgba(241, 196, 15, 0.5);
    letter-spacing: -2px;
    line-height: 1.2;
}

.splash-subtitle {
    font-family: var(--font-pixel-mono);
    font-size: 24px;
    color: var(--neon-cyan);
    letter-spacing: 4px;
    margin-top: 8px;
}

.mascot-showcase {
    background-color: rgba(0,0,0,0.3);
    border: 4px solid var(--border-color);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    border-radius: 50%;
    width: 140px;
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.mascot-gif {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.start-btn-container {
    width: 100%;
    max-width: 320px;
}

.social-links-row {
    display: flex;
    gap: 20px;
}

.splash-footer {
    font-family: var(--font-pixel-mono);
    font-size: 16px;
    color: var(--text-muted);
}

/* ── RETRO BUTTONS ─────────────────────────────────────────────── */
.retro-btn {
    width: 100%;
    font-family: var(--font-pixel-heading);
    font-size: 14px;
    padding: 16px 20px;
    border: 4px solid #111;
    border-radius: 8px;
    background-color: #ded9ef;
    color: #111;
    cursor: pointer;
    box-shadow: 
        0 6px 0 #6e678a,
        0 6px 0 2px #111;
    transition: all 0.1s;
    outline: none;
    user-select: none;
    text-transform: uppercase;
}

.retro-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 #6e678a,
        0 2px 0 2px #111;
}

.retro-btn.pulse-btn {
    background-color: var(--neon-pink);
    color: var(--text-white);
    box-shadow: 
        0 6px 0 #900,
        0 6px 0 2px #111,
        0 0 15px rgba(255, 0, 102, 0.4);
}

.retro-btn.pulse-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 #900,
        0 2px 0 2px #111;
}

.retro-btn.sm-btn {
    padding: 8px 12px;
    font-size: 10px;
    border-width: 3px;
    border-radius: 6px;
    box-shadow: 
        0 4px 0 #6e678a,
        0 4px 0 2px #111;
}

.retro-btn.sm-btn:active {
    transform: translateY(2px);
    box-shadow: 
        0 2px 0 #6e678a,
        0 2px 0 2px #111;
}

.retro-social-link {
    font-family: var(--font-pixel-heading);
    font-size: 11px;
    color: #111;
    background-color: var(--neon-cyan);
    border: 3px solid #111;
    border-radius: 6px;
    padding: 10px 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        0 4px 0 #0099aa,
        0 4px 0 2px #111;
    transition: all 0.1s;
}

.retro-social-link:active {
    transform: translateY(2px);
    box-shadow: 
        0 2px 0 #0099aa,
        0 2px 0 2px #111;
}

.retro-social-link.tg {
    background-color: var(--neon-green);
    box-shadow: 
        0 4px 0 #1b9030,
        0 4px 0 2px #111;
}

.retro-social-link.tg:active {
    box-shadow: 
        0 2px 0 #1b9030,
        0 2px 0 2px #111;
}

/* ── HUD & DASHBOARD LAYOUT ────────────────────────────────────── */
#game-dashboard {
    justify-content: flex-start;
    gap: 16px;
}

.hud-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0,0,0,0.5);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
}

.hud-logo {
    font-family: var(--font-pixel-heading);
    font-size: 14px;
    color: var(--neon-yellow);
}

.hud-stats-group {
    display: flex;
    gap: 16px;
}

.hud-stat-item {
    font-family: var(--font-pixel-mono);
    font-size: 20px;
    display: flex;
    gap: 6px;
}

.stat-label {
    color: var(--text-muted);
}

.stat-value {
    font-weight: bold;
}

.text-gold { color: var(--neon-yellow); }
.text-green { color: var(--neon-green); }
.text-cyan { color: var(--neon-cyan); }
.text-magenta { color: var(--neon-pink); }

.workspace-grid {
    display: grid;
    grid-template-columns: 280px 1fr 340px;
    gap: 16px;
    flex-grow: 1;
    min-height: 0;
}

@media (max-width: 900px) {
    .workspace-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        overflow-y: auto;
    }
}

/* ── RETRO PANELS ─────────────────────────────────────────────── */
.retro-panel {
    background-color: rgba(22, 19, 39, 0.7);
    border: 4px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 
        inset 0 0 15px rgba(0,0,0,0.6),
        0 4px 6px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    background-color: var(--border-color);
    padding: 8px 12px;
    font-family: var(--font-pixel-heading);
    font-size: 10px;
    color: var(--text-white);
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 #000;
    font-weight: bold;
}

.panel-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    overflow-y: auto;
}

.pixel-hr {
    border: 0;
    height: 4px;
    background-color: var(--border-color);
    margin: 8px 0;
}

/* Stats Panel Column Details */
.stats-panel .panel-content {
    justify-content: flex-start;
}

.status-avatar-box {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border: 3px solid var(--border-color);
    background-color: rgba(0,0,0,0.4);
    border-radius: 8px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.status-avatar-box img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    z-index: 2;
}

.avatar-glow {
    position: absolute;
    width: 48px;
    height: 48px;
    background-color: rgba(0, 240, 255, 0.15);
    filter: blur(8px);
    border-radius: 50%;
    z-index: 1;
}

.status-info-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.status-row .label {
    color: var(--text-muted);
}

.status-row .val {
    font-weight: bold;
    font-family: var(--font-pixel-heading);
    font-size: 10px;
}

/* Status Progress Bars */
.stat-bar-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bar-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.pixel-bar {
    width: 100%;
    height: 16px;
    background-color: #0d0a1b;
    border: 3px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease-out;
}

.bar-red { background-color: var(--neon-pink); }
.bar-green { background-color: var(--neon-green); }
.bar-blue { background-color: var(--neon-cyan); }
.bar-gold { background-color: var(--neon-yellow); }

.xp-bar {
    height: 20px;
    border-color: #555;
}

/* ── ARENA PANEL (CENTER COLUMN) ────────────────────────────────── */
.arena-panel {
    display: flex;
    flex-direction: column;
}

.arena-display {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    padding: 0;
    overflow-y: auto;
}

.habitat-viewport {
    background: linear-gradient(to bottom, #112d42 0%, #1c5d5e 60%, #3e8e75 100%);
    border-bottom: 4px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 280px;
    flex-grow: 1;
}

/* Scanline striping inside viewport */
.habitat-viewport::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.1) 50%, rgba(255,255,255,0.02) 50%);
    background-size: 100% 6px;
    pointer-events: none;
}

/* Platform Tiles */
.pet-platform {
    position: absolute;
    bottom: 40px;
    width: 160px;
    height: 40px;
}

.platform-tile {
    position: absolute;
    left: 0;
    width: 100%;
    border-radius: 6px;
}

.platform-tile.shadow-tile {
    bottom: -6px;
    height: 100%;
    background-color: #0b2216;
}

.platform-tile.top-tile {
    bottom: 0;
    height: 100%;
    background-color: #4baf68;
    border: 3px solid #a3e878;
    box-shadow: inset 0 3px 0 rgba(255,255,255,0.2);
}

.active-pet-container {
    position: absolute;
    bottom: 55px;
    width: 128px;
    height: 128px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 10;
}

.active-pet-img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    transform-origin: bottom center;
}

/* Pet animations */
.pet-bounce {
    animation: breath 2s infinite ease-in-out;
}

@keyframes breath {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.93) scaleX(1.05); }
}

.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

/* Habitat floating decorations */
.floating-particle {
    position: absolute;
    color: var(--neon-yellow);
    font-family: var(--font-pixel-heading);
    font-size: 12px;
    opacity: 0.7;
    animation: floatingParticles 4s infinite ease-in-out;
}

.float-star-1 {
    top: 30px;
    left: 40px;
    animation-delay: 0s;
}

.float-star-2 {
    top: 60px;
    right: 50px;
    color: var(--neon-cyan);
    animation-delay: 1.5s;
}

.float-heart {
    top: 100px;
    left: 60px;
    color: var(--neon-pink);
    animation-delay: 0.8s;
}

@keyframes floatingParticles {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.2; }
    50% { transform: translateY(-12px) rotate(15deg); opacity: 0.8; }
}

/* Action Controls Panel */
.arena-actions {
    background-color: #121021;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-input-group {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 10px;
}

.retro-input {
    background-color: rgba(0,0,0,0.4);
    border: 3px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-white);
    font-family: var(--font-pixel-heading);
    font-size: 12px;
    padding: 8px 12px;
    text-align: center;
    outline: none;
}

.retro-input:focus {
    border-color: var(--neon-cyan);
}

.care-buttons-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.retro-btn.action-btn {
    padding: 12px 10px;
    font-size: 10px;
    box-shadow: 
        0 4px 0 #1b1633,
        0 4px 0 2px #111;
}

.retro-btn.action-btn:active {
    transform: translateY(2px);
    box-shadow: 
        0 2px 0 #1b1633,
        0 2px 0 2px #111;
}

.retro-btn.action-btn.sm-text {
    font-size: 8px;
    padding: 8px 4px;
}

.retro-btn:disabled {
    background-color: #555 !important;
    color: #888 !important;
    box-shadow: 0 4px 0 #333, 0 4px 0 2px #111 !important;
    cursor: not-allowed;
    transform: none !important;
}

/* ── COLUMN 3: ALBUM GALLERY ────────────────────────────────────── */
.album-panel .panel-content {
    justify-content: flex-start;
    gap: 12px;
}

.album-grid-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 290px;
    border: 3px dashed var(--border-color);
    border-radius: 6px;
    padding: 6px;
    background-color: rgba(0,0,0,0.25);
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.album-slot {
    aspect-ratio: 1;
    border: 3px solid var(--border-color);
    border-radius: 6px;
    background-color: rgba(18, 16, 32, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
}

.album-slot:hover {
    border-color: var(--neon-cyan);
    background-color: rgba(0, 240, 255, 0.05);
}

.album-slot.active-stage {
    border-color: var(--neon-yellow);
    background-color: rgba(241, 196, 15, 0.1);
    box-shadow: 0 0 8px rgba(241, 196, 15, 0.3);
}

.album-slot.locked {
    cursor: not-allowed;
}

.album-slot img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.album-slot.locked img {
    filter: brightness(0.2) grayscale(1);
    opacity: 0.6;
}

.lock-overlay {
    position: absolute;
    font-size: 14px;
    color: var(--text-muted);
}

.album-footer-desc {
    background-color: rgba(0,0,0,0.4);
    border: 3px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    min-height: 100px;
}

.desc-title {
    font-family: var(--font-pixel-heading);
    font-size: 10px;
    margin-bottom: 6px;
}

.desc-body {
    font-family: var(--font-pixel-mono);
    font-size: 18px;
    color: var(--text-white);
    line-height: 1.3;
}

/* ── DIALOGUE ADVENTURE BOX (BOTTOM HUD) ────────────────────────── */
.dialogue-box {
    background-color: #0b0918;
    border: 4px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
    position: relative;
}

.dialogue-header {
    position: absolute;
    top: -12px;
    left: 20px;
    background-color: var(--neon-pink);
    font-family: var(--font-pixel-heading);
    font-size: 8px;
    color: var(--text-white);
    padding: 3px 8px;
    border-radius: 4px;
    border: 2px solid #000;
}

.dialogue-body {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding-top: 4px;
}

.dialogue-arrow {
    color: var(--neon-green);
    font-weight: bold;
    animation: flash 1s infinite alternate;
}

#dialogue-text {
    font-family: var(--font-pixel-mono);
    font-size: 20px;
    line-height: 1.4;
    color: var(--text-white);
}

@keyframes flash {
    from { opacity: 0.2; }
    to { opacity: 1; }
}

/* ── SECTION 3: ROADMAP SCREEN ─────────────────────────────────── */
#roadmap-screen {
    background-color: #0d0b18;
    padding: 20px;
}

.roadmap-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.roadmap-header-row h2 {
    font-family: var(--font-pixel-heading);
    font-size: 20px;
    color: var(--neon-yellow);
}

.roadmap-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    padding-left: 50px;
}

.roadmap-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 10px;
    bottom: 10px;
    width: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    z-index: 1;
}

.roadmap-node {
    display: flex;
    align-items: flex-start;
    position: relative;
    width: 100%;
}

.node-icon-box {
    position: absolute;
    left: -50px;
    top: 6px;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 4px solid var(--border-color);
    background-color: #1a1926;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    z-index: 5;
}

.roadmap-node.active .node-icon-box {
    border-color: var(--neon-yellow);
    box-shadow: 0 0 10px var(--neon-yellow);
}

.node-content {
    flex-grow: 1;
    width: 100%;
}

.node-content p {
    font-family: var(--font-pixel-sans);
    font-size: 14px;
    color: var(--text-muted);
    padding: 10px 12px;
    line-height: 1.5;
}

/* ── CONSOLE PHYSICAL CONTROLS ───────────────────────────────────── */
.console-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-top: 10px;
    border-top: 4px double #252430;
    padding-top: 20px;
}

/* D-PAD Control */
.dpad-container {
    position: relative;
    width: 130px;
    height: 130px;
    background-color: #272633;
    border-radius: 50%;
    box-shadow: 
        inset 0 4px 6px rgba(0,0,0,0.6),
        0 4px 0 rgba(255,255,255,0.05);
}

.dpad-button {
    position: absolute;
    background-color: #121118;
    box-shadow: 
        inset 0 2px 0 rgba(255,255,255,0.1),
        0 4px 0 rgba(0,0,0,0.4);
    cursor: pointer;
}

.dpad-button:active {
    background-color: #000;
}

.dpad-button.up {
    top: 12px;
    left: 47px;
    width: 36px;
    height: 40px;
    border-radius: 6px 6px 0 0;
}

.dpad-button.down {
    bottom: 12px;
    left: 47px;
    width: 36px;
    height: 40px;
    border-radius: 0 0 6px 6px;
}

.dpad-button.left {
    top: 47px;
    left: 12px;
    width: 40px;
    height: 36px;
    border-radius: 6px 0 0 6px;
}

.dpad-button.right {
    top: 47px;
    right: 12px;
    width: 40px;
    height: 36px;
    border-radius: 0 6px 6px 0;
}

.dpad-center {
    position: absolute;
    top: 47px;
    left: 47px;
    width: 36px;
    height: 36px;
    background-color: #121118;
    z-index: 10;
}

.dpad-center::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background-color: #252430;
}

/* System selection buttons (Select / Start) */
.console-actions-row {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-buttons-group {
    display: flex;
    gap: 16px;
}

.sys-btn {
    font-family: var(--font-pixel-heading);
    font-size: 7px;
    color: #8b88a5;
    background-color: #1f1e29;
    border: 3px solid #111;
    border-radius: 20px;
    width: 68px;
    height: 28px;
    padding-top: 2px;
    cursor: pointer;
    box-shadow: 
        0 3px 0 #111,
        inset 0 1px 0 rgba(255,255,255,0.1);
    transform: rotate(-15deg);
    outline: none;
    text-align: center;
}

.sys-btn:active {
    transform: rotate(-15deg) translateY(2px);
    box-shadow: 0 1px 0 #111;
}

.label-sub {
    font-size: 6px;
    display: block;
    color: #4a485e;
}

/* Action Circle Buttons A / B */
.action-buttons-group {
    display: flex;
    gap: 16px;
    transform: rotate(-15deg);
}

.action-circle-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid #111;
    font-family: var(--font-pixel-heading);
    font-size: 16px;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    outline: none;
    box-shadow: 
        0 4px 0 #5f0629,
        0 4px 0 2px #111;
    text-shadow: 1px 1px 0 #000;
}

.action-circle-btn.button-b {
    background-color: #8e1546;
}

.action-circle-btn.button-a {
    background-color: var(--neon-pink);
    box-shadow: 
        0 4px 0 #b30349,
        0 4px 0 2px #111;
}

.action-circle-btn:active {
    transform: translateY(3px);
    box-shadow: 
        0 1px 0 #111,
        0 1px 0 2px #111;
}

/* Text alignment helper */
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* ── TAB SYSTEM & CONTRACTS PANEL ───────────────────────────────── */
.tab-header-row {
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    padding: 0 4px;
}

.panel-tab-btn {
    font-family: var(--font-pixel-heading);
    font-size: 8px;
    color: var(--text-muted);
    background-color: rgba(0,0,0,0.3);
    border: 3px solid var(--border-color);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 8px 10px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    margin-top: 2px;
}

.panel-tab-btn:hover {
    color: var(--text-white);
    background-color: rgba(255,255,255,0.05);
}

.panel-tab-btn.active {
    color: var(--neon-yellow);
    background-color: rgba(22, 19, 39, 0.9);
    border-color: var(--border-color);
    position: relative;
    z-index: 10;
    padding-top: 10px;
    margin-top: 0;
}

.tab-content {
    display: none;
    flex-grow: 1;
    height: 100%;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* ── TOWN SHOP & INVENTORY STYLING ───────────────────────────────── */
.shop-inventory-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.shop-balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0,0,0,0.4);
    border: 3px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    font-family: var(--font-pixel-heading);
    font-size: 9px;
}

.shop-store-section, .shop-inventory-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.section-title {
    font-family: var(--font-pixel-heading);
    font-size: 8px;
    margin-bottom: 2px;
    text-shadow: 1px 1px 0 #000;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 180px;
}

.shop-item {
    background-color: rgba(0, 0, 0, 0.3);
    border: 3px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
}

.item-icon-title {
    font-family: var(--font-pixel-sans);
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

.item-effect {
    font-family: var(--font-pixel-mono);
    font-size: 14px;
    color: var(--text-muted);
}

.buy-item-btn {
    font-family: var(--font-pixel-heading);
    font-size: 8px;
    background-color: #3b3a4a;
    color: var(--text-white);
    border: 2px solid #111;
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    box-shadow: 0 2px 0 #111;
    outline: none;
    text-align: center;
}

.buy-item-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #111;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.inventory-slot {
    aspect-ratio: 1;
    border: 3px solid var(--border-color);
    border-radius: 8px;
    background-color: rgba(18, 16, 32, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.inventory-slot:hover {
    border-color: var(--neon-pink);
    background-color: rgba(255, 0, 102, 0.05);
}

.inv-emoji {
    font-size: 20px;
}

.inv-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background-color: var(--neon-pink);
    color: var(--text-white);
    font-family: var(--font-pixel-heading);
    font-size: 8px;
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid #111;
    min-width: 14px;
    text-align: center;
}

.inventory-hint {
    font-family: var(--font-pixel-sans);
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
}

/* ── BATTLE ARENA SCENE OVERLAY ──────────────────────────────────── */
.battle-arena-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #1a052e 0%, #3d1b5c 50%, #150226 100%);
    z-index: 50;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
}

.battle-arena-overlay.active {
    display: flex;
}

.battle-hud {
    background-color: rgba(0,0,0,0.65);
    border: 3px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 160px;
}

.enemy-hud {
    align-self: flex-start;
}

.player-hud {
    align-self: flex-end;
}

.battle-name {
    font-family: var(--font-pixel-heading);
    font-size: 7px;
    font-weight: bold;
}

.battle-hp-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.battle-hp-bar {
    flex-grow: 1;
    height: 8px;
    background-color: #221a35;
    border: 2px solid #5a4b7f;
    border-radius: 3px;
    overflow: hidden;
}

.battle-hp-fill {
    height: 100%;
    width: 100%;
    transition: width 0.25s ease-out;
}

.bg-red { background-color: var(--neon-pink); }
.bg-green { background-color: var(--neon-green); }

.battle-hp-text {
    font-family: var(--font-pixel-mono);
    font-size: 12px;
    min-width: 44px;
    text-align: right;
}

/* Enemy sprite arena */
.enemy-container {
    position: absolute;
    top: 50px;
    right: 40px;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.enemy-sprite {
    font-size: 52px;
    filter: drop-shadow(0 0 10px rgba(255, 0, 102, 0.6));
    animation: enemyFloat 3s infinite ease-in-out;
}

@keyframes enemyFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Combat Actions Menu Grid */
.combat-actions-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
    z-index: 20;
}

.combat-menu-btn {
    font-family: var(--font-pixel-heading);
    font-size: 8px;
    padding: 8px 4px;
    background-color: rgba(18, 16, 32, 0.95);
    color: var(--text-white);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.1s;
    outline: none;
}

.combat-menu-btn:hover {
    border-color: var(--neon-cyan);
    background-color: rgba(0, 240, 255, 0.05);
}

.combat-menu-btn:active {
    transform: translateY(1px);
}

/* Bouncy float damage text indicator */
.damage-indicator {
    position: absolute;
    font-family: var(--font-pixel-heading);
    font-size: 10px;
    font-weight: bold;
    color: var(--neon-yellow);
    text-shadow: 2px 2px 0 #000;
    pointer-events: none;
    z-index: 100;
}

.damage-critical {
    color: var(--neon-pink);
    font-size: 12px;
}

/* Screen shake effect class */
.shake-screen {
    animation: screenShake 0.4s ease-out;
}

@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-4px, -4px); }
    30% { transform: translate(4px, 4px); }
    50% { transform: translate(-4px, 4px); }
    70% { transform: translate(4px, -4px); }
    90% { transform: translate(-2px, -2px); }
}

/* ── NEW WALLET CONNECT ENTRY SCREEN ── */
.wallet-splash-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 500px;
    margin: auto;
    z-index: 10;
}

.wallet-panel {
    width: 100%;
    background-color: rgba(20, 18, 33, 0.95);
    border: 4px solid var(--border-color);
}

.wallet-status-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-pixel-heading);
    font-size: 12px;
    margin-bottom: 15px;
    border-bottom: 2px dashed var(--border-color);
    padding-bottom: 8px;
}

.wallet-desc {
    font-family: var(--font-pixel-sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-align: center;
}

.connect-action-box {
    display: flex;
    justify-content: center;
    width: 100%;
}

.pulsing-text {
    animation: pulseText 1.5s infinite ease-in-out;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.5; text-shadow: 0 0 2px var(--neon-pink); }
    50% { opacity: 1; text-shadow: 0 0 8px var(--neon-pink); }
}

/* ── PARALLAX PIXEL LANDSCAPE ── */
.pixel-sky {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #090518 0%, #151d38 50%, #213c49 100%);
    z-index: 1;
}

.pixel-sun-moon {
    position: absolute;
    top: 30px;
    right: 40px;
    width: 24px;
    height: 24px;
    background-color: #f1c40f;
    box-shadow: 
        0 0 15px #f1c40f,
        inset -3px -3px 0 rgba(0,0,0,0.15);
    border-radius: 4px; /* pixelated look */
}

/* Cloud layers with drifting animations */
.pixel-cloud-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.scene-cloud {
    position: absolute;
    opacity: 0.7;
}

.scene-cloud.cloud-1 {
    top: 25px;
    animation: cloudDrift 35s infinite linear;
}

.scene-cloud.cloud-2 {
    top: 55px;
    animation: cloudDrift 55s infinite linear;
    animation-delay: -15s;
}

@keyframes cloudDrift {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(450px); }
}

/* Mountain layers */
.pixel-mountain-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.scene-mountain {
    position: absolute;
    bottom: 46px; /* slightly embedded in dirt grass */
}

.scene-mountain.m-left {
    left: -20px;
    opacity: 0.55;
}

.scene-mountain.m-right {
    right: -30px;
    opacity: 0.45;
}

/* Scenery pine trees */
.pixel-scenery-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}

.scene-tree {
    position: absolute;
    bottom: 46px;
}

.scene-tree.tree-1 {
    left: 30px;
    opacity: 0.85;
}

.scene-tree.tree-2 {
    left: 80px;
    opacity: 0.9;
}

.scene-tree.tree-3 {
    right: 40px;
    opacity: 0.8;
}

/* Ground block floor */
.pixel-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #3b2219; /* dark dirt */
    background-image: 
        repeating-linear-gradient(45deg, #321c15 0px, #321c15 4px, transparent 4px, transparent 8px),
        linear-gradient(to bottom, #4baf68 0px, #4baf68 6px, #358d4e 6px, #358d4e 10px, transparent 10px);
    border-top: 4px solid #a3e878; /* highlight grass lip */
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.25);
    z-index: 5;
}

.ground-flower {
    position: absolute;
    bottom: 46px;
    z-index: 6;
}

.ground-flower.f-1 {
    left: 140px;
}

.ground-flower.f-2 {
    right: 120px;
}

.active-pet-container {
    bottom: 48px !important; /* Stand directly on solid grass ground */
}

/* ── 2D CUSTOM WALKING WADDLE ANIMATION ── */
.pet-walking {
    animation: walkWaddle 0.4s infinite ease-in-out;
}

@keyframes walkWaddle {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(-6deg) scaleY(0.96) scaleX(1.04);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(6deg) scaleY(0.96) scaleX(1.04);
    }
}

/* ── EVOLUTION CHAMBER MINIGAME OVERLAY ── */
.evo-game-overlay {
    position: absolute;
    inset: 0;
    z-index: 15;
    background: #09061d;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    overflow: hidden;
}

.evo-game-overlay.active {
    display: flex;
}

.evo-bg {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at center, rgba(255, 0, 102, 0.15) 0%, transparent 70%),
        linear-gradient(rgba(18, 16, 32, 0.7) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 16, 32, 0.7) 1px, transparent 1px);
    background-size: 100% 100%, 16px 16px, 16px 16px;
    z-index: 1;
}

.evo-lightning {
    position: absolute;
    inset: 0;
    background-color: #ffffff;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

.evo-chamber-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.evo-hud-bar {
    font-family: var(--font-pixel-heading);
    font-size: 10px;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 0 0 6px var(--neon-pink);
    animation: pulseText 1s infinite alternate;
}

.evo-pet-zone {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 110px;
    width: 110px;
}

.evo-aura-circle {
    position: absolute;
    width: 90px;
    height: 90px;
    border: 3px dashed var(--neon-pink);
    border-radius: 50%;
    animation: rotateAura 6s infinite linear;
    box-shadow: 
        0 0 10px rgba(255, 0, 102, 0.3),
        inset 0 0 10px rgba(255, 0, 102, 0.3);
}

@keyframes rotateAura {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.evo-pet-zone img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    z-index: 2;
    transform-origin: bottom center;
}

.evo-input-zone {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.evo-bar-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-pixel-heading);
    font-size: 8px;
    margin-bottom: 6px;
}

.bar-fill.bar-magenta {
    background-color: var(--neon-pink);
    box-shadow: 
        0 0 8px var(--neon-pink),
        inset 0 2px 0 rgba(255,255,255,0.4);
}

/* ── RETRO MODAL OVERLAY ── */
.retro-modal-overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    background-color: rgba(6, 5, 11, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.retro-modal-overlay.active {
    display: flex;
}

.retro-modal {
    width: 100%;
    max-width: 320px;
    background-color: rgba(20, 18, 33, 0.98);
    border: 4px solid var(--border-color);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.85),
        0 0 15px rgba(255, 0, 102, 0.15);
}

.wallet-modal-icon {
    font-size: 32px;
}

.hud-right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ca-badge {
    font-family: var(--font-pixel-heading);
    font-size: 8px;
    background-color: rgba(18, 16, 32, 0.6);
    border: 2px solid var(--border-color);
    padding: 3px 6px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--neon-cyan);
    display: flex;
    gap: 4px;
    user-select: none;
    transition: all 0.1s;
}

.ca-badge:hover {
    border-color: var(--neon-cyan);
    background-color: rgba(0, 240, 255, 0.05);
}

.ca-badge:active {
    transform: translateY(1px);
}

.ca-label {
    color: var(--text-muted);
}

#quit-game-btn {
    padding: 3px 6px !important;
    font-size: 8px !important;
    min-width: auto !important;
    font-family: var(--font-pixel-heading);
}

.ca-badge.text-magenta {
    color: var(--neon-pink);
}

.ca-badge.text-magenta:hover {
    border-color: var(--neon-pink);
    background-color: rgba(255, 0, 102, 0.05);
}

/* ══════════════════════════════════════════════════════
   🌅 DAY / NIGHT SKY TRANSITIONS
══════════════════════════════════════════════════════ */
.pixel-sky {
    transition: background 4s ease;
}
.pixel-sky.time-dawn {
    background: linear-gradient(to bottom, #1a0a2e 0%, #6b2d6b 40%, #ff8c42 75%, #ffd700 100%) !important;
}
.pixel-sky.time-morning {
    background: linear-gradient(to bottom, #1a5276 0%, #2e86c1 40%, #85c1e9 100%) !important;
}
.pixel-sky.time-noon {
    background: linear-gradient(to bottom, #0e4d8a 0%, #1565c0 45%, #42a5f5 100%) !important;
}
.pixel-sky.time-dusk {
    background: linear-gradient(to bottom, #1a0a2e 0%, #7b3f00 35%, #ff6b35 65%, #ffd700 100%) !important;
}
.pixel-sky.time-night {
    background: linear-gradient(to bottom, #020409 0%, #060d1f 50%, #0d1b3e 100%) !important;
}

/* Stars (night only) */
.pixel-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #ffffff;
    border-radius: 50%;
    animation: twinkle 2s infinite alternate;
}
@keyframes twinkle {
    0% { opacity: 0.2; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.5); }
}

/* Shooting star */
.shooting-star {
    position: absolute;
    width: 4px;
    height: 2px;
    background: linear-gradient(90deg, #fff, transparent);
    border-radius: 2px;
    animation: shootingStar 0.8s linear forwards;
}
@keyframes shootingStar {
    0% { transform: translate(0, 0) rotate(-30deg); opacity: 1; width: 4px; }
    100% { transform: translate(120px, 60px) rotate(-30deg); opacity: 0; width: 60px; }
}

/* ══════════════════════════════════════════════════════
   🌧️ WEATHER OVERLAY
══════════════════════════════════════════════════════ */
.weather-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.raindrop {
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(100, 180, 255, 0.7));
    border-radius: 2px;
    animation: rainFall linear infinite;
}
@keyframes rainFall {
    0% { top: -60px; opacity: 0.8; }
    100% { top: 110%; opacity: 0.3; }
}

.snowflake {
    position: absolute;
    color: white;
    font-size: 10px;
    animation: snowFall linear infinite;
    pointer-events: none;
}
@keyframes snowFall {
    0% { top: -20px; opacity: 0.9; transform: translateX(0) rotate(0deg); }
    100% { top: 105%; opacity: 0.4; transform: translateX(30px) rotate(360deg); }
}

/* Rainbow arc */
.rainbow-arc {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 100px;
    border-radius: 200px 200px 0 0;
    border: 8px solid transparent;
    border-top-color: rgba(255, 0, 0, 0.3);
    box-shadow:
        0 -8px 0 rgba(255, 165, 0, 0.3),
        0 -16px 0 rgba(255, 255, 0, 0.3),
        0 -24px 0 rgba(0, 255, 0, 0.3),
        0 -32px 0 rgba(0, 0, 255, 0.25),
        0 -40px 0 rgba(148, 0, 211, 0.2);
    animation: fadeInOut 8s ease-in-out forwards;
    pointer-events: none;
}
@keyframes fadeInOut {
    0% { opacity: 0; } 10% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; }
}

/* ══════════════════════════════════════════════════════
   💬 PET SPEECH BUBBLE
══════════════════════════════════════════════════════ */
.speech-bubble {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 18, 40, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    padding: 6px 10px;
    white-space: nowrap;
    font-family: var(--font-pixel-mono);
    font-size: 13px;
    color: var(--text-white);
    z-index: 20;
    animation: bubblePop 0.2s ease-out;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
    pointer-events: none;
}
.speech-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--neon-cyan);
}
@keyframes bubblePop {
    0% { transform: translateX(-50%) scale(0.6); opacity: 0; }
    80% { transform: translateX(-50%) scale(1.05); }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* ══════════════════════════════════════════════════════
   🍖 FOOD CATCH MINI-GAME
══════════════════════════════════════════════════════ */
.food-catch-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 15;
}
.food-item-falling {
    position: absolute;
    font-size: 20px;
    cursor: pointer;
    pointer-events: all;
    user-select: none;
    transition: transform 0.05s;
    filter: drop-shadow(0 0 4px rgba(255,255,100,0.6));
    animation: foodWobble 0.4s ease-in-out infinite alternate;
}
.food-item-falling:hover {
    transform: scale(1.3);
}
@keyframes foodWobble {
    0% { transform: rotate(-8deg) scale(1); }
    100% { transform: rotate(8deg) scale(1.1); }
}

/* Combo popup */
.combo-popup {
    position: absolute;
    font-family: var(--font-pixel-heading);
    font-size: 13px;
    color: var(--neon-yellow);
    text-shadow: 0 0 8px var(--neon-yellow);
    pointer-events: none;
    z-index: 30;
    animation: comboFloat 1.2s ease-out forwards;
}
@keyframes comboFloat {
    0% { opacity: 1; transform: translateY(0) scale(1.2); }
    100% { opacity: 0; transform: translateY(-50px) scale(0.8); }
}

/* Floating stat delta (e.g. "+15 SAT") */
.stat-delta-popup {
    position: absolute;
    font-family: var(--font-pixel-mono);
    font-size: 16px;
    font-weight: bold;
    pointer-events: none;
    z-index: 30;
    animation: deltaFloat 1.5s ease-out forwards;
}
.stat-delta-popup.green { color: var(--neon-green); text-shadow: 0 0 6px var(--neon-green); }
.stat-delta-popup.gold { color: var(--neon-yellow); text-shadow: 0 0 6px var(--neon-yellow); }
.stat-delta-popup.red { color: #ff4444; text-shadow: 0 0 6px #ff4444; }
@keyframes deltaFloat {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-40px); }
}

/* ══════════════════════════════════════════════════════
   🏆 ACHIEVEMENT TOAST NOTIFICATIONS
══════════════════════════════════════════════════════ */
#achievement-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.achievement-toast {
    background: linear-gradient(135deg, rgba(20,18,40,0.98), rgba(40,30,60,0.98));
    border: 2px solid var(--neon-yellow);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
    box-shadow: 0 0 16px rgba(241, 196, 15, 0.35);
    animation: toastSlideIn 0.4s ease-out, toastFadeOut 0.5s ease-in 3.5s forwards;
    pointer-events: auto;
}
.achievement-toast .toast-icon { font-size: 22px; flex-shrink: 0; }
.achievement-toast .toast-body { display: flex; flex-direction: column; gap: 2px; }
.achievement-toast .toast-title {
    font-family: var(--font-pixel-heading);
    font-size: 8px;
    color: var(--neon-yellow);
    letter-spacing: 0.5px;
}
.achievement-toast .toast-name {
    font-family: var(--font-pixel-sans);
    font-size: 13px;
    color: var(--text-white);
}
@keyframes toastSlideIn {
    0% { transform: translateX(120%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes toastFadeOut {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* ══════════════════════════════════════════════════════
   🏆 ACHIEVEMENTS GRID (Tab 3)
══════════════════════════════════════════════════════ */
.achievements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    overflow-y: auto;
    max-height: 280px;
}
.achievement-card {
    background: rgba(0,0,0,0.4);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.achievement-card.unlocked {
    border-color: var(--neon-yellow);
    box-shadow: 0 0 8px rgba(241, 196, 15, 0.25);
}
.achievement-card.locked {
    opacity: 0.5;
    filter: grayscale(0.7);
}
.achievement-card .ach-icon { font-size: 22px; }
.achievement-card .ach-name {
    font-family: var(--font-pixel-heading);
    font-size: 7px;
    color: var(--text-white);
    line-height: 1.3;
}
.achievement-card .ach-desc {
    font-family: var(--font-pixel-sans);
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.2;
}

/* ══════════════════════════════════════════════════════
   🌟 STAT DECAY WARNING FLASH
══════════════════════════════════════════════════════ */
.bar-fill.critical-flash {
    animation: critFlash 0.6s ease-in-out infinite alternate;
}
@keyframes critFlash {
    0% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* Sleeping pet zzz */
.zzz-bubble {
    position: absolute;
    font-size: 16px;
    top: -30px;
    right: -10px;
    animation: zzzFloat 2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes zzzFloat {
    0% { opacity: 0; transform: translateY(0) scale(0.8); }
    50% { opacity: 1; transform: translateY(-8px) scale(1); }
    100% { opacity: 0; transform: translateY(-16px) scale(1.2); }
}
