/* ==========================================================================
   WINTER STUDIO - RETRO GAMING PORTFOLIO STYLE SHEET
   ========================================================================== */

/* --- Design Tokens & Variables --- */
:root {
    --bg-dark: #060913;          /* Deep icy night */
    --bg-panel: #0d1527;         /* Frozen dark blue panel */
    --bg-panel-light: #16223f;   /* Lighter icy blue panel */
    --primary-cyan: #00f0ff;     /* Neon Cyan / Frost magic */
    --primary-blue: #3b82f6;     /* Winter Blue */
    --accent-red: #ff3e3e;       /* Retro Red (HP, Zombies) */
    --accent-green: #00ff66;     /* Arcade Green (Success, Level Up) */
    --accent-yellow: #ffd700;    /* Pixel Gold (Coins, Points) */
    --accent-purple: #a855f7;    /* Retro Purple */
    --text-main: #e2e8f0;        /* Frosty White text */
    --text-muted: #64748b;       /* Muted ice slate */
    --border-pixel: #1e293b;
    --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 20px rgba(0, 240, 255, 0.2);
    --glow-red: 0 0 10px rgba(255, 62, 62, 0.5), 0 0 20px rgba(255, 62, 62, 0.2);
    --glow-green: 0 0 10px rgba(0, 255, 102, 0.5), 0 0 20px rgba(0, 255, 102, 0.2);
}

/* --- Base Resets & Typography --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Share Tech Mono', monospace;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    /* Retro grid background */
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(20, 30, 60, 0.6) 0%, rgba(6, 9, 19, 1) 100%),
        linear-gradient(rgba(18, 30, 50, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 30, 50, 0.1) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
}

h1, h2, h3, .marquee-title, .level-title, .selector-label, .btn-retro, .hud-label, .hud-value, .stat-val, .cart-label-text, .brand-sub, .coin-insert-text, .social-title {
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
}

/* --- CRT Screen Overlay and Effects --- */
#crt-overlay {
    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%), linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.05));
    background-size: 100% 4px, 6px 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

#crt-overlay.disabled {
    opacity: 0 !important;
}

.crt-screen::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
    background-size: 100% 2px;
    z-index: 10000;
    pointer-events: none;
}

/* Vignette shadow frame */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.8);
    z-index: 9998;
    pointer-events: none;
}

/* CRT Screen flicker animation */
@keyframes crt-flicker {
    0% { opacity: 0.978; }
    50% { opacity: 0.992; }
    100% { opacity: 0.978; }
}
#crt-overlay:not(.disabled) {
    animation: crt-flicker 0.15s infinite;
}

/* --- Snow Falling Particle Canvas --- */
#snow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    pointer-events: none;
}

/* --- Common UI Helper Classes --- */
.text-glow {
    text-shadow: var(--glow-cyan);
}
.text-glow-blue {
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}
.text-glow-red {
    text-shadow: var(--glow-red);
}
.text-highlight {
    color: var(--primary-cyan);
}
.text-cyan { color: var(--primary-cyan); }
.text-yellow { color: var(--accent-yellow); }
.text-red { color: var(--accent-red); }
.text-green { color: var(--accent-green); }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* Pixel box styling with retro double border and shadow */
.pixel-box {
    background: var(--bg-panel);
    border: 4px solid #000;
    box-shadow: 
        inset -4px -4px 0px 0px rgba(255, 255, 255, 0.05),
        inset 4px 4px 0px 0px rgba(255, 255, 255, 0.1),
        4px 4px 0px 0px #000;
    padding: 16px;
    position: relative;
    border-radius: 2px;
}

/* Retro Pixel buttons */
.btn-retro {
    background: var(--bg-panel-light);
    color: var(--text-main);
    border: 4px solid #000;
    box-shadow: 
        inset -4px -4px 0px 0px rgba(0, 0, 0, 0.4),
        inset 4px 4px 0px 0px rgba(255, 255, 255, 0.15),
        3px 3px 0px 0px #000;
    padding: 10px 16px;
    font-size: 10px;
    cursor: pointer;
    outline: none;
    transition: all 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    user-select: none;
}

.btn-retro:hover {
    background: var(--primary-blue);
    color: #fff;
    box-shadow: 
        inset -4px -4px 0px 0px rgba(0, 0, 0, 0.6),
        inset 4px 4px 0px 0px rgba(255, 255, 255, 0.3),
        3px 3px 0px 0px #000;
}

.btn-retro:active {
    box-shadow: 
        inset 4px 4px 0px 0px rgba(0, 0, 0, 0.5),
        1px 1px 0px 0px #000;
    transform: translate(2px, 2px);
}

.btn-retro.active {
    background: var(--primary-cyan);
    color: #000;
    box-shadow: 
        inset 4px 4px 0px 0px rgba(0, 0, 0, 0.5),
        1px 1px 0px 0px #000;
}

.btn-sm {
    padding: 6px 8px;
    font-size: 8px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   ARCADE CABINET STRUCTURE
   ========================================================================== */
.arcade-cabinet {
    width: 100%;
    max-width: 950px;
    background: #111827; /* Dark shell */
    border: 8px solid #1f2937;
    border-radius: 12px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(59, 130, 246, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 10;
    position: relative;
    border-image: linear-gradient(135deg, #1f2937, #1e3a8a, #0d1527) 1;
}

/* Cabinet side decals */
.arcade-cabinet::before, .arcade-cabinet::after {
    content: "";
    position: absolute;
    top: 0;
    width: 15px;
    height: 100%;
    background: repeating-linear-gradient(45deg, #1e3a8a, #1e3a8a 10px, #00f0ff 10px, #00f0ff 20px);
    z-index: 11;
}
.arcade-cabinet::before { left: 0; border-right: 4px solid #000; }
.arcade-cabinet::after { right: 0; border-left: 4px solid #000; }

/* Marquee Header */
.cabinet-marquee {
    background: #020617;
    border-bottom: 6px solid #000;
    padding: 20px 20px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.marquee-logo-wrap {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.marquee-logo {
    height: 38px;
    max-width: 100px;
    object-fit: contain;
    image-rendering: auto;
}

.marquee-title {
    font-size: 22px;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 6px;
    animation: text-pulse 2s infinite alternate;
}

.marquee-sub {
    font-size: 9px;
    color: var(--primary-cyan);
    letter-spacing: 1.5px;
}

@keyframes text-pulse {
    0% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.8), 0 0 10px var(--primary-cyan), 0 0 20px var(--primary-cyan);
    }
    100% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 25px var(--primary-cyan), 0 0 40px var(--primary-cyan);
    }
}

/* Arcade Screen Container */
.arcade-screen {
    background: #050b18;
    padding: 24px;
    position: relative;
    border-bottom: 8px solid #000;
    margin: 0 15px; /* Stay inside side decals */
}

/* Glass screen curvature border simulation */
.screen-border-effect {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.95);
    border: 4px solid #111;
    pointer-events: none;
    z-index: 90;
}

/* HUD Top Stats Bar */
.hud-bar {
    display: grid;
    grid-template-columns: 1.5fr 2.5fr 2fr 1fr;
    background: #000;
    border: 4px solid #1e293b;
    padding: 10px 14px;
    margin-bottom: 20px;
    align-items: center;
    gap: 10px;
    border-radius: 2px;
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 9px;
}

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

.hud-value {
    color: #fff;
}

/* Health Bar (HP) */
.hud-hp-bar-container {
    flex-grow: 1;
    height: 12px;
    background: #27272a;
    border: 2px solid #000;
    padding: 1px;
}

.hud-hp-bar {
    height: 100%;
    background: var(--accent-red);
    transition: width 0.3s ease;
    box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   GAME LEVEL CONTAINER & TRANSITIONS
   ========================================================================== */
.game-screen-content {
    min-height: 380px;
    position: relative;
}

.game-level {
    display: none;
    animation: screen-pixelate 0.35s steps(8) forwards;
}

.game-level.active {
    display: block;
}

.level-title {
    font-size: 11px;
    color: var(--text-muted);
    border-bottom: 2px dashed var(--border-pixel);
    padding-bottom: 8px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

@keyframes screen-pixelate {
    0% {
        opacity: 0;
        transform: scale(0.98);
        filter: brightness(1.5) blur(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1) blur(0);
    }
}

/* ==========================================================================
   LEVEL 1: PLAYER PROFILE
   ========================================================================== */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 20px;
}

/* Avatar Card */
.profile-avatar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: rgba(13, 21, 39, 0.8);
}

.sprite-container {
    width: 140px;
    height: 140px;
    background: #000;
    border: 4px solid var(--border-pixel);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.2);
}

/* Custom CSS Pixel Avatar */
.pixel-avatar {
    width: 120px;
    height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-image 0.2s steps(1);
}

/* Class Selector */
.class-selector {
    width: 100%;
    text-align: center;
}

.selector-label {
    font-size: 8px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.selector-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.class-info {
    font-size: 8px;
    background: #000;
    padding: 6px 10px;
    border: 2px solid var(--border-pixel);
    width: 100%;
    display: flex;
    justify-content: space-between;
}

/* Details Card & RPG Stats */
.profile-details-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel-header {
    font-size: 9px;
    color: var(--accent-yellow);
    border-left: 4px solid var(--accent-yellow);
    padding-left: 8px;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.rpg-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border: 2px solid var(--border-pixel);
}

.stat-row {
    display: grid;
    grid-template-columns: 1.8fr 3fr 1fr;
    align-items: center;
    gap: 10px;
    font-size: 11px;
}

.stat-name {
    font-weight: bold;
    color: var(--text-main);
}

.stat-bar-container {
    height: 10px;
    background: #111;
    border: 1px solid #333;
    padding: 1px;
}

.stat-bar {
    height: 100%;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.stat-val {
    font-size: 8px;
    text-align: right;
    color: #fff;
}

/* Stat bar colors */
.bg-cyan { background: var(--primary-cyan); }
.bg-green { background: var(--accent-green); }
.bg-yellow { background: var(--accent-yellow); }
.bg-red { background: var(--accent-red); }

.pixel-text {
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.text-sm {
    font-size: 12px;
}

/* ==========================================================================
   LEVEL 2: POLY MERCENARIOS SHOWCASE
   ========================================================================== */
.game-showcase-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}

.showcase-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-badge {
    align-self: flex-start;
    font-family: 'Press Start 2P', cursive;
    font-size: 7px;
    background: var(--accent-red);
    color: #fff;
    padding: 4px 8px;
    box-shadow: var(--glow-red);
    border: 2px solid #000;
}

.game-banner-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 4px solid var(--border-pixel);
    overflow: hidden;
    position: relative;
}

.game-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease-in-out;
}

.store-links-container {
    margin-top: auto;
}

/* Store Badge Button */
.btn-store {
    width: 100%;
    padding: 16px;
    font-size: 11px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: #111;
    border-color: var(--accent-green);
    color: var(--accent-green);
    box-shadow: 
        inset -4px -4px 0px 0px rgba(0, 0, 0, 0.4),
        inset 4px 4px 0px 0px rgba(0, 255, 102, 0.15),
        4px 4px 0px #000;
}

.btn-store:hover {
    background: var(--accent-green);
    color: #000;
    box-shadow: 
        inset -4px -4px 0px 0px rgba(0, 0, 0, 0.6),
        inset 4px 4px 0px 0px rgba(255, 255, 255, 0.4),
        4px 4px 0px #000;
}

.play-store-icon {
    transition: transform 0.2s ease;
}
.btn-store:hover .play-store-icon {
    transform: scale(1.15) rotate(5deg);
}

.bullet-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border: 2px solid var(--border-pixel);
    margin: 10px 0;
}

.feature-tag {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-tag span {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
}

/* Carousel Thumbnails */
.screenshot-carousel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.carousel-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.carousel-thumb {
    aspect-ratio: 16 / 9;
    border: 2px solid #000;
    background: #000;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.6;
    transition: all 0.15s ease;
    outline: none;
}

.carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-thumb:hover, .carousel-thumb.active {
    opacity: 1;
    border-color: var(--primary-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 240, 255, 0.2);
}

.carousel-caption {
    font-size: 10px;
    color: var(--primary-cyan);
    margin-top: 4px;
    min-height: 15px;
}

/* ==========================================================================
   LEVEL 3: CART PLAY LOG
   ========================================================================== */
.cartridge-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
}

.cartridge-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Game Cartridge Items */
.cartridge-item {
    background: #334155;
    border: 4px solid #000;
    border-radius: 4px;
    padding: 12px 14px;
    cursor: pointer;
    position: relative;
    box-shadow: 
        inset 0 3px 0 rgba(255, 255, 255, 0.15),
        inset 0 -3px 0 rgba(0, 0, 0, 0.3),
        3px 3px 0 #000;
    transition: all 0.1s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}

.cartridge-item::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: rgba(255, 255, 255, 0.15);
}

/* Active cartridge is pushed in */
.cartridge-item.active {
    background: #1e3a8a;
    border-color: var(--primary-cyan);
    box-shadow: 
        inset 0 4px 10px rgba(0, 0, 0, 0.6),
        0 0 10px rgba(0, 240, 255, 0.3);
    transform: translate(2px, 2px);
}

.cartridge-item:hover:not(.active) {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 
        inset 0 3px 0 rgba(255, 255, 255, 0.25),
        inset 0 -3px 0 rgba(0, 0, 0, 0.4),
        3px 5px 0 #000;
}

.cartridge-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.cart-label-text {
    font-size: 8px;
    color: #fff;
}

.cart-label-sub {
    font-size: 7px;
    color: var(--text-muted);
}
.cartridge-item.active .cart-label-sub {
    color: var(--primary-cyan);
}

/* Visual Grip texture on retro cassette */
.cartridge-grip {
    width: 25px;
    height: 100%;
    background: repeating-linear-gradient(90deg, #1e293b, #1e293b 3px, #0f172a 3px, #0f172a 6px);
    opacity: 0.5;
    border-left: 2px solid #000;
}

/* Detail panel */
.cartridge-viewer {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    font-family: 'Press Start 2P', cursive;
    font-size: 7px;
    padding: 4px 8px;
    border: 2px solid #000;
    color: #000;
}
.badge-cyan { background: var(--primary-cyan); }
.badge-green { background: var(--accent-green); }
.badge-red { background: var(--accent-red); }

.project-stat-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border: 2px solid var(--border-pixel);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.project-links {
    margin-top: auto;
}

/* ==========================================================================
   LEVEL 4: CONTACT & CO-OP
   ========================================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 20px;
}

.contact-dialog {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dialog-speaker {
    display: flex;
    align-items: center;
    gap: 10px;
}

.speaker-avatar {
    width: 32px;
    height: 32px;
    background: var(--bg-panel-light);
    border: 2px solid var(--primary-cyan);
    background-image: url("assets/logo_blue.png");
    background-size: cover;
    background-position: center;
    border-radius: 4px;
}

.speaker-name {
    font-size: 9px;
}

.dialog-bubble {
    background: #000;
    border: 3px solid var(--border-pixel);
    padding: 12px;
    position: relative;
    border-radius: 4px;
}

/* Social Grid Links */
.social-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: auto;
}

.social-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.15s ease;
}

.social-card:hover {
    border-color: var(--primary-cyan);
    transform: translateX(4px);
    box-shadow: 
        inset -4px -4px 0px 0px rgba(0, 0, 0, 0.4),
        inset 4px 4px 0px 0px rgba(255, 255, 255, 0.1),
        4px 4px 0px rgba(0, 240, 255, 0.3);
}

.social-title {
    font-size: 8px;
    color: var(--text-muted);
}
.social-card:hover .social-title {
    color: var(--primary-cyan);
}

.social-handle {
    font-size: 11px;
    color: #fff;
}

.social-icon {
    grid-row: span 2;
    width: 28px;
    height: 28px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Custom retro CSS shapes for social icons */
.icon-linkedin {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300f0ff'%3E%3Cpath d='M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3a3.26 3.26 0 0 0-3.26-3.26c-.85 0-1.84.52-2.32 1.3v-1.11h-2.79v8.37h2.79v-4.93c0-.77.62-1.4 1.39-1.4a1.4 1.4 0 0 1 1.4 1.4v4.93h2.79M6.88 8.56a1.68 1.68 0 0 0 1.68-1.68c0-.93-.75-1.69-1.68-1.69a1.69 1.69 0 0 0-1.69 1.69c0 .93.76 1.68 1.69 1.68m1.39 9.94v-8.37H5.5v8.37h2.77z'/%3E%3C/svg%3E");
}
.icon-googleplay {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300ff66'%3E%3Cpath d='M3.6 2.25c-.25 0-.47.1-.64.28L12.56 12l-9.6 9.47c.17.18.39.28.64.28.23 0 .44-.08.62-.22l14.33-8.28c.67-.39.67-1.03 0-1.42L4.22 2.47c-.18-.14-.39-.22-.62-.22zM5.1 4.7L13.84 12 5.1 19.3V4.7z'/%3E%3C/svg%3E");
}
.icon-github {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e2e8f0'%3E%3Cpath d='M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34-.46-1.16-1.11-1.47-1.11-1.47-.9-.62.07-.6.07-.6 1 .07 1.53 1.03 1.53 1.03.9 1.52 2.34 1.07 2.91.83.09-.65.35-1.09.63-1.34-2.22-.25-4.55-1.11-4.55-4.92 0-1.11.38-2 1.03-2.71-.1-.25-.45-1.29.1-2.64 0 0 .84-.27 2.75 1.02.79-.22 1.65-.33 2.5-.33.85 0 1.71.11 2.5.33 1.91-1.29 2.75-1.02 2.75-1.02.55 1.35.2 2.39.1 2.64.65.71 1.03 1.6 1.03 2.71 0 3.82-2.34 4.66-4.57 4.91.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2z'/%3E%3C/svg%3E");
}

/* Contact Form */
.contact-form-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pixel-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 8px;
    color: var(--text-muted);
}

.pixel-input {
    background: #000;
    border: 3px solid var(--border-pixel);
    padding: 10px;
    color: #fff;
    font-size: 11px;
    border-radius: 2px;
    outline: none;
    transition: border-color 0.2s ease;
}

.pixel-input::placeholder {
    color: #3f4f6b;
}

.pixel-input:focus {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}

.pixel-textarea {
    resize: none;
}

/* ==========================================================================
   TOAST POPUP MESSAGES
   ========================================================================== */
.toast-popup {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: var(--accent-yellow);
    border: 4px solid var(--accent-yellow);
    box-shadow: var(--glow-green);
    padding: 10px 20px;
    z-index: 100;
    animation: toast-slide 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-popup span {
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    letter-spacing: 1px;
}

@keyframes toast-slide {
    0% { bottom: -50px; opacity: 0; }
    100% { bottom: 20px; opacity: 1; }
}

/* ==========================================================================
   ARCADE GAMEPAD CONSOLE PANEL (FOOTER)
   ========================================================================== */
.console-panel {
    background: #27272a;
    border-top: 8px solid #000;
    padding: 24px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 20px;
    margin: 0 15px; /* Stay inside side decals */
    position: relative;
    box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.15);
}

/* Left: D-PAD (Arrow buttons) */
.controller-left {
    display: flex;
    justify-content: center;
}

.dpad {
    position: relative;
    width: 110px;
    height: 110px;
}

.dpad-center {
    position: absolute;
    top: 35px;
    left: 35px;
    width: 40px;
    height: 40px;
    background: #18181b;
    z-index: 5;
    border: 3px solid #000;
}

.dpad-btn {
    position: absolute;
    background: #18181b;
    border: 3px solid #000;
    cursor: pointer;
    z-index: 4;
}

.dpad-btn:hover {
    background: #3f3f46;
}

.dpad-btn:active {
    background: var(--primary-cyan);
}

.dpad-up {
    top: 5px;
    left: 35px;
    width: 40px;
    height: 35px;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
}
.dpad-up::after {
    content: "▲";
    color: #444;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.dpad-down {
    bottom: 5px;
    left: 35px;
    width: 40px;
    height: 35px;
    border-top: 0;
    border-radius: 0 0 4px 4px;
}
.dpad-down::after {
    content: "▼";
    color: #444;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.dpad-left {
    top: 35px;
    left: 5px;
    width: 35px;
    height: 40px;
    border-right: 0;
    border-radius: 4px 0 0 4px;
}
.dpad-left::after {
    content: "◀";
    color: #444;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    margin-top: 4px;
}

.dpad-right {
    top: 35px;
    right: 5px;
    width: 35px;
    height: 40px;
    border-left: 0;
    border-radius: 0 4px 4px 0;
}
.dpad-right::after {
    content: "▶";
    color: #444;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    margin-top: 4px;
}

/* Center: Select & Start Buttons */
.controller-center {
    display: flex;
    justify-content: center;
}

.menu-buttons {
    display: flex;
    gap: 20px;
}

.menu-btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.menu-btn {
    width: 50px;
    height: 16px;
    background: #71717a;
    border: 3px solid #000;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 
        inset 0 -2px 0 rgba(0,0,0,0.4),
        0 2px 0 #000;
    transform: rotate(-12deg);
}

.menu-btn:hover {
    background: #a1a1aa;
}

.menu-btn:active {
    background: var(--primary-cyan);
    transform: rotate(-12deg) translateY(2px);
    box-shadow: none;
}

.menu-btn-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 7px;
    color: #888;
}

/* Right: A/B Action Buttons */
.controller-right {
    display: flex;
    justify-content: center;
}

.action-buttons {
    display: flex;
    gap: 20px;
}

.action-btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.action-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid #000;
    cursor: pointer;
    outline: none;
    box-shadow: 
        inset 0 4px 0 rgba(255, 255, 255, 0.25),
        inset 0 -4px 0 rgba(0, 0, 0, 0.4),
        0 4px 0 #000;
    position: relative;
    user-select: none;
}

.btn-b {
    background: #ea580c; /* B Button Orange-red */
}
.btn-b:hover { background: #f97316; }

.btn-a {
    background: #dc2626; /* A Button Red */
}
.btn-a:hover { background: #ef4444; }

.action-btn:active {
    transform: translateY(3px);
    box-shadow: 
        inset 0 4px 0 rgba(0, 0, 0, 0.4),
        0 1px 0 #000;
}

.action-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px #000;
}

/* Cabinet Trim (Coin door & slots) */
.cabinet-lower-trim {
    background: #111827;
    border-top: 8px solid #000;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.coin-slots {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.coin-entry {
    background: #1e293b;
    border: 3px solid #000;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 
        inset 0 2px 0 rgba(255,255,255,0.1),
        0 3px 0 #000;
    border-radius: 2px;
}

.coin-entry:hover {
    border-color: var(--accent-yellow);
}

.coin-insert-text {
    font-size: 7px;
    color: var(--accent-red);
    text-shadow: 0 0 5px rgba(255, 62, 62, 0.4);
    animation: flash 1s infinite alternate;
}

.coin-hole {
    width: 6px;
    height: 18px;
    background: #000;
    border-radius: 1px;
    border: 1px solid #334155;
}

.coin-value {
    font-family: 'Press Start 2P', cursive;
    font-size: 7px;
    color: var(--text-muted);
}

.brand-sub {
    font-size: 7px;
    color: var(--text-muted);
}

@keyframes flash {
    0% { opacity: 0.2; }
    100% { opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Tablet & Smaller Desktops (Under 1024px) */
@media (max-width: 1024px) {
    body {
        padding: 10px;
    }
    
    .profile-layout, .game-showcase-layout, .cartridge-layout, .contact-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .profile-avatar-card {
        flex-direction: row;
        justify-content: space-around;
        padding: 20px;
    }
    
    .selector-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .cartridge-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .cartridge-item {
        flex-shrink: 0;
        width: 220px;
    }
    
    .dpad {
        width: 90px;
        height: 90px;
    }
    
    .dpad-center {
        top: 30px;
        left: 30px;
        width: 30px;
        height: 30px;
    }
    
    .dpad-btn {
        width: 30px;
        height: 30px;
    }
    
    .dpad-up { top: 0; left: 30px; }
    .dpad-down { bottom: 0; left: 30px; }
    .dpad-left { top: 30px; left: 0; }
    .dpad-right { top: 30px; right: 0; }
}

/* Mobile Devices (Under 768px) */
@media (max-width: 768px) {
    .arcade-cabinet {
        border-width: 4px;
    }
    
    .arcade-cabinet::before, .arcade-cabinet::after {
        width: 8px;
    }
    
    .arcade-screen {
        margin: 0 8px;
        padding: 14px;
    }
    
    .hud-bar {
        grid-template-columns: 1fr 1.5fr;
        grid-template-rows: auto auto;
        gap: 8px;
        padding: 8px 10px;
    }
    
    .hud-item {
        font-size: 8px;
    }
    
    .marquee-title {
        font-size: 18px;
    }
    
    .marquee-sub {
        font-size: 7px;
    }
    
    .console-panel {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 16px;
        padding: 16px 10px;
        margin: 0 8px;
    }
    
    .controller-left, .controller-center, .controller-right {
        order: unset;
    }
    
    /* Re-order Gamepad on Mobile */
    .controller-left { order: 2; }
    .controller-center { order: 1; }
    .controller-right { order: 3; }
    
    .profile-avatar-card {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .selector-buttons {
        grid-template-columns: 1fr;
    }
    
    .stat-row {
        grid-template-columns: 2fr 1fr;
        grid-template-rows: auto auto;
        gap: 4px;
    }
    
    .stat-bar-container {
        grid-column: span 2;
    }
    
    .carousel-thumbs {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .social-grid {
        grid-template-columns: 1fr;
    }
}

/* Extra Small Screens (Under 480px) */
@media (max-width: 480px) {
    .marquee-title {
        font-size: 14px;
    }
    
    .level-title {
        font-size: 9px;
    }
    
    .text-sm {
        font-size: 11px;
    }
}

/* ==========================================================================
   TUTORIAL OVERLAY (FIRST VISITORS)
   ========================================================================== */
.tutorial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 11, 24, 0.96);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    padding: 20px;
    border-radius: 4px;
    backdrop-filter: blur(2px);
    animation: overlay-fade 0.25s ease-out forwards;
}

.tutorial-box {
    max-width: 440px;
    width: 100%;
    border-color: var(--primary-cyan) !important;
    box-shadow: 
        var(--glow-cyan),
        inset -4px -4px 0px 0px rgba(255, 255, 255, 0.05),
        inset 4px 4px 0px 0px rgba(255, 255, 255, 0.1),
        8px 8px 0px #000 !important;
    animation: box-slide 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes overlay-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes box-slide {
    from { 
        transform: scale(0.85) translateY(-15px); 
        opacity: 0; 
    }
    to { 
        transform: scale(1) translateY(0); 
        opacity: 1; 
    }
}

.tutorial-logo-wrap {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tutorial-logo {
    height: 48px;
    max-width: 110px;
    object-fit: contain;
    image-rendering: auto;
}

.cabinet-lower-trim a:hover {
    color: var(--primary-cyan) !important;
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.4);
}
