/* Common C64 Style Sheet */
/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

/* Body Base Styles */
body {
    font-family: 'Press Start 2P', cursive;
    background: #1a1a1a;
    color: #7c70da;
    overflow-x: hidden;
}

/* CRT Monitor Effect */
.monitor-container {
    position: relative;
    max-width: 1200px;
    margin: 20px auto;
    padding: 30px 20px 40px;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 20px;
    box-shadow: 
        0 0 40px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.monitor-container::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 6px;
    background: #4a4a4a;
    border-radius: 3px;
}

/* Screen Effect */
.screen {
    background: #3e31a2;
    border: 8px solid #5a5a5a;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 
        inset 0 0 50px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(124, 112, 218, 0.2);
    position: relative;
    overflow: hidden;
}

/* Scanline Effect */
.screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 10;
}

/* Subtle Glow Effect */
.screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
}

/* Content Layer */
.content {
    position: relative;
    z-index: 5;
}

/* Header Base Styles */
header {
    text-align: left;
    margin-bottom: 20px;
}

/* Typography */
h1 {
    font-size: 24px;
    color: #a3a3ff;
    text-shadow: 2px 2px 0 #5050c8;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

h2 {
    color: #a3a3ff;
    font-size: 18px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0 #5050c8;
}

p {
    margin-bottom: 12px;
    color: #a3a3ff;
}

/* Cursor Animation */
.cursor {
    display: inline-block;
    width: 12px;
    height: 20px;
    background: #a3a3ff;
    animation: blink 1s infinite;
    margin-left: 5px;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nav-btn {
    background: #7c70da;
    color: #3e31a2;
    border: 3px solid #a3a3ff;
    padding: 15px 25px;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 4px 4px 0 #5050c8;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    background: #a3a3ff;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #5050c8;
}

/* Content Box */
.content-box {
    background: rgba(124, 112, 218, 0.1);
    border: 2px solid #7c70da;
    padding: 15px;
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 11px;
}

/* Pixel Divider */
.pixel-divider {
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #7c70da 0px,
        #7c70da 8px,
        transparent 8px,
        transparent 16px
    );
    margin: 15px 0;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #7c70da;
    font-size: 9px;
    color: #7c70da;
}

/* Game Card Base */
.game-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    padding: 15px;
    background: rgba(124, 112, 218, 0.05);
    border: 2px solid rgba(124, 112, 218, 0.3);
    border-radius: 5px;
}

/* Mini Monitor */
.mini-monitor {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    padding: 12px 10px 20px;
    border-radius: 6px;
    box-shadow: 
        0 0 15px rgba(0, 0, 0, 0.5),
        inset 0 0 10px rgba(0, 0, 0, 0.3);
    position: relative;
    margin-bottom: 10px;
    width: 100%;
    max-width: 450px;
}

.mini-monitor::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 3px;
    background: #4a4a4a;
    border-radius: 2px;
}

/* Monitor Controls */
.monitor-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding-top: 6px;
}

.monitor-buttons {
    display: flex;
    gap: 6px;
}

.monitor-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #5a5a5a, #2a2a2a);
    border: 1px solid #1a1a1a;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.5),
        0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
}

.monitor-button.power {
    background: radial-gradient(circle at 30% 30%, #4a4a4a, #2a2a2a);
}

.monitor-button.power::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: #44ff44;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px #44ff44;
}

.monitor-year {
    color: #7c70da;
    font-size: 9px;
    margin-left: 5px;
    font-weight: bold;
}

/* Mini Screen */
.mini-screen {
    background: #000000;
    border: 3px solid #5a5a5a;
    border-radius: 3px;
    padding: 0;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(124, 112, 218, 0.3);
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 2/1;
}

.mini-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

/* Game Canvas */
#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Game Info Overlay */
#gameInfo {
    position: absolute;
    top: 5px;
    left: 10px;
    color: white;
    font-size: 10px;
    z-index: 100;
    text-shadow: 1px 1px 2px black;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 3px;
}

/* Mobile Controls */
.mobile-controls {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 150;
}

.control-btn {
    width: 50px;
    height: 50px;
    background: rgba(93, 173, 226, 0.7);
    border: 3px solid #5dade2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.control-btn:active {
    background: rgba(93, 173, 226, 1);
    transform: scale(0.95);
}

@media (min-width: 768px) {
    .mobile-controls {
        display: none;
    }
}

/* Game Overlays */
#gameOver, #gameWon, #startScreen, #levelComplete {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border: 3px solid #a3a3ff;
    text-align: center;
    z-index: 200;
    color: #a3a3ff;
}

/* Animations */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
}
