:root {
    --bg-console: #1a1a1a;
    --screen-bg: #000000;
    --neon-green: #39ff14;
    --neon-pink: #ff00ff;
    --neon-blue: #00ffff;
    --text-retro: 'VT323', monospace;
    --font-header: 'Press Start 2P', cursive;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #050505;
    color: var(--neon-green);
    font-family: var(--text-retro);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CRT Effect Overlay */
.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.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 10;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.97; }
    5% { opacity: 0.95; }
    10% { opacity: 0.9; }
    /* ... */
    100% { opacity: 0.97; }
}

/* Console Container */
.console-container {
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    border: 4px solid #333;
    border-radius: 20px;
    padding: 2rem;
    background-color: var(--screen-bg);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2), inset 0 0 50px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header */
.console-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid var(--neon-green);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

h1 {
    font-family: var(--font-header);
    font-size: 1.5rem;
    color: var(--neon-blue);
    text-shadow: 2px 2px var(--neon-pink);
    letter-spacing: 2px;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

.status-bar {
    font-size: 1.5rem;
    display: flex;
    gap: 2rem;
}

/* Menu */
.game-menu {
    flex: 1;
    overflow-y: auto;
}

.menu-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #fff;
    text-shadow: 0 0 10px #fff;
}

/* Cartridges Grid */
.cartridge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    padding: 0 2rem;
}

.cartridge-link {
    text-decoration: none;
    color: inherit;
    display: block; /* Takes up the grid cell space */
}

.cartridge {
    background: #222;
    border: 4px solid #444;
    border-radius: 5px; /* Boxy retro look */
    height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    box-shadow: 5px 5px 0px #111;
}

.cartridge:hover {
    transform: translateY(-10px);
    box-shadow: 10px 10px 0px var(--neon-green);
    border-color: var(--neon-green);
}

.cartridge-label {
    background: #111;
    width: 85%;
    height: 120px;
    margin-top: 15px;
    border-radius: 4px 4px 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-bottom: 4px solid #888;
}

.game-icon {
    font-size: 3rem;
    color: var(--neon-pink);
    margin-bottom: 0.5rem;
}

.cartridge-label h3 {
    font-family: var(--font-header);
    font-size: 0.7rem;
    color: #fff;
    text-align: center;
    line-height: 1.4;
}

.cartridge-sticker {
    background: linear-gradient(to bottom, #333, #000);
    width: 85%;
    padding: 5px;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    border-top: 2px solid #555;
    margin-bottom: auto;
}

.btn-start {
    margin-bottom: 20px;
    font-family: var(--font-header);
    background: var(--neon-green);
    color: #000;
    border: none;
    padding: 10px 20px;
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 3px 3px 0 #005500;
}

.btn-start:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #005500;
}

/* Footer */
.console-footer {
    border-top: 2px solid var(--neon-green);
    padding-top: 1rem;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
}

.back-link {
    color: var(--neon-pink);
    text-decoration: none;
    text-transform: uppercase;
}

.back-link:hover {
    background: var(--neon-pink);
    color: #000;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #111; 
}
::-webkit-scrollbar-thumb {
    background: var(--neon-green); 
}
