/* Make contact items more legible and style links */
.contact-item {
    font-size: 2em;
}
.contact-item a {
    color: inherit;
    text-decoration: underline;
    font-size: inherit;
}
.contact-item a:visited {
    color: inherit;
}
.contact-item a:hover {
    color: inherit;
    text-decoration: underline;
}
/* Game Boy Green (#8BAC0F) on Black Theme */
:root {
    --gameboy-green: #8BAC0F;
    --gameboy-dark: #0F380F;
    --gameboy-light: #9BBC0F;
    --black: #000000;
    --white: #FFFFFF;
}

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

body {
    background: var(--black);
    color: var(--gameboy-green);
    font-family: 'Courier New', monospace;
    overflow: hidden;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    animation: crt-flicker 0.15s infinite;
}

/* CRT Monitor Effects - Subtle and Authentic */
body {
    animation: crt-flicker 0.5s infinite;
}

@keyframes crt-flicker {
    0% { opacity: 1; }
    50% { opacity: 0.995; }
    100% { opacity: 1; }
}

/* CRT scanlines - vertical lines going top to bottom */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(139, 172, 15, 0.03) 0px,
        rgba(139, 172, 15, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 1000;
    pointer-events: none;
}

/* CRT curvature and vignette */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 30%,
        rgba(0, 0, 0, 0.2) 100%
    );
    z-index: 1001;
    pointer-events: none;
}

/* Subtle screen shake */
#screen {
    position: relative;
    animation: screen-shake 8s ease-in-out infinite;
}

@keyframes screen-shake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(0.2px, 0); }
    50% { transform: translate(-0.2px, 0.1px); }
    75% { transform: translate(0.1px, -0.1px); }
}

/* Subtle color bleeding for CRT */
.game-title,
.subtitle,
.press-start {
    position: relative;
}

.game-title::before,
.subtitle::before,
.press-start::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    color: var(--gameboy-green);
    opacity: 0.3;
    transform: translate(1px, 0);
    z-index: -1;
}

/* Very subtle static noise */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(139, 172, 15, 0.01) 0px,
        rgba(139, 172, 15, 0.01) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 999;
    pointer-events: none;
    opacity: 0.5;
}

#game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#screen {
    width: 640px;
    height: 480px;
    border: 4px solid var(--gameboy-green);
    position: relative;
    background: var(--black);
    box-shadow: 0 0 20px var(--gameboy-green);
}

.level {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    padding: 20px;
}

.level.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Level 1 - Title Screen */
#level-1 {
    text-align: center;
}

.game-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 var(--gameboy-dark);
    letter-spacing: 4px;
}

.subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.8;
}

.press-start {
    font-size: 16px;
    margin-bottom: 30px;
    animation: blink 1.5s infinite;
}

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

.player-sprite {
    font-size: 32px;
    animation: float 2s ease-in-out infinite;
}

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

/* Level 2 - Character Profile */
#level-2 {
    padding: 30px;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    font-size: 14px;
    border: 2px solid var(--gameboy-green);
    padding: 10px;
    width: 100%;
}

.dialog-box {
    border: 2px solid var(--gameboy-green);
    padding: 20px;
    margin-bottom: 30px;
    width: 100%;
    background: var(--black);
}

.npc-name {
    color: var(--gameboy-light);
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}

.dialog-text {
    font-size: 14px;
    line-height: 1.6;
}

.character-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.stat {
    font-size: 14px;
    padding: 5px;
}

.navigation-hint {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 20px;
}

/* Level 3 - Coming Soon */
#level-3 {
    text-align: center;
}

.coming-soon {
    font-size: 36px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.sub-text {
    font-size: 18px;
    opacity: 0.8;
}

/* Level 4 - Contact Shrine */
#level-4 {
    text-align: center;
}

.contact-shrine {
    border: 2px solid var(--gameboy-green);
    padding: 40px;
    background: var(--black);
}

.shrine-title {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--gameboy-light);
}

.contact-options {
    margin-bottom: 30px;
}

.contact-item {
    font-size: 14px;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid var(--gameboy-green);
}

.save-point {
    font-size: 12px;
    opacity: 0.7;
    animation: blink 2s infinite;
}

/* Controls */
#controls {
    margin-top: 20px;
    font-size: 12px;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    #screen {
        width: 90vw;
        max-width: 400px;
        height: 300px;
    }
    
    .game-title {
        font-size: 32px;
    }
    
    .character-stats {
        grid-template-columns: 1fr;
    }
}
