/* ── 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: hidden;
}

.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;
}

.contract-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding: 2px;
}

.contract-card {
    background-color: rgba(0, 0, 0, 0.35);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.6);
}

.contract-card-header {
    font-family: var(--font-pixel-heading);
    font-size: 9px;
    margin-bottom: 8px;
}

.contract-address-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(18, 16, 32, 0.8);
    border: 2px solid #2d2a45;
    border-radius: 6px;
    padding: 6px 10px;
    gap: 8px;
    margin-bottom: 8px;
}

.addr-text {
    font-family: var(--font-pixel-mono);
    font-size: 18px;
    color: var(--text-white);
    word-break: break-all;
    user-select: all;
    line-height: 1.2;
}

.copy-ca-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 8px;
    cursor: pointer;
    box-shadow: 0 2px 0 #111;
    outline: none;
    flex-shrink: 0;
}

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

.copy-ca-btn.copied {
    background-color: var(--neon-green) !important;
    color: #000 !important;
}

.explore-link {
    font-family: var(--font-pixel-mono);
    font-size: 16px;
    color: var(--neon-cyan);
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.explore-link:hover {
    color: var(--text-white);
    text-shadow: 0 0 6px var(--neon-cyan);
}
