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

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    background: linear-gradient(135deg, #0a0908 0%, #1a1614 100%);
    background-attachment: fixed;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #f5f5f5;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    position: relative;
}

/* Hi-Score Marquee */
.hiscore-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(90deg, #000000 0%, #1a1614 50%, #000000 100%);
    border-bottom: 2px solid #8b7355;
    overflow: hidden;
    z-index: 100;
    display: none; /* Initially hidden, shown after GAME OVER */
    align-items: center;
}

.hiscore-scroll {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.hiscore-text {
    display: inline-block;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    color: #a89482;
    text-shadow: 0 0 6px rgba(168, 148, 130, 0.3);
    white-space: nowrap;
    transform: translateX(100%); /* Start off-screen, animation will be added via JS */
}

@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Current Score Display - Top Right */
.current-score {
    position: fixed;
    top: 50px; /* Below the hi-score area */
    right: 20px;
    text-align: right;
    font-family: 'Press Start 2P', monospace; /* 8-bit pixelated font */
    color: #f0f0f0;
    z-index: 200;
    font-size: 14px;
    line-height: 1.4;
    display: none; /* Hidden until game starts */
}

.score-label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 18px; /* Reduced by 25% from 24px */
    letter-spacing: 1.5px;
    color: #e8e8e8; /* Off-white color */
}

.score-value {
    font-size: 18px; /* Same size as score label */
    font-weight: bold;
    color: #e8e8e8; /* Off-white color */
    text-shadow: 0 0 4px rgba(232, 232, 232, 0.3);
}

/* Player 1UP Display - Top Left */
.player-1up {
    position: fixed;
    top: 50px; /* Same level as score */
    left: 20px;
    text-align: left;
    font-family: 'Press Start 2P', monospace;
    color: #f0f0f0;
    z-index: 200;
    font-size: 14px;
    line-height: 1.4;
}

.player-label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 18px;
    letter-spacing: 1.5px;
    color: #e8e8e8;
}

.player-value {
    font-size: 18px;
    font-weight: bold;
    color: #e8e8e8;
    text-shadow: 0 0 4px rgba(232, 232, 232, 0.3);
}

/* Konami Code Sequence Display - Below Press Start */
.konami-sequence {
    position: fixed;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Press Start 2P', monospace;
    color: #e8e8e8;
    z-index: 200;
    text-align: center;
    background: none;
    border: none;
    padding: 0;
}

.konami-title {
    display: none; /* Hide the title completely */
}

.konami-icons {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.konami-icon {
    font-size: 24px;
    color: #00FF00;
    padding: 8px 12px;
    border: 2px solid #00FF00;
    background: rgba(0, 255, 0, 0.1);
    min-width: 40px;
    text-align: center;
    border-radius: 3px;
    text-shadow: 0 0 8px #00FF00;
    animation: konamiPulse 0.5s ease-out;
}

@keyframes konamiPulse {
    0% { 
        transform: scale(0.5);
        opacity: 0;
    }
    50% { 
        transform: scale(1.2);
        opacity: 1;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Initial Entry System for Konami Code */
.initial-entry-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.initial-entry-container {
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    color: #e8e8e8;
}

.initial-entry-title {
    font-size: 32px;
    color: #00FF00;
    margin-bottom: 20px;
    text-shadow: 0 0 15px #00FF00;
    animation: pulse 2s infinite;
}

.initial-entry-score {
    font-size: 48px;
    color: #FFD700;
    margin-bottom: 30px;
    text-shadow: 0 0 20px #FFD700;
}

.initial-entry-prompt {
    font-size: 18px;
    margin-bottom: 40px;
    color: #e8e8e8;
}

.initial-entry-input {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.initial-char {
    font-size: 36px;
    color: #888;
    border: 2px solid #444;
    padding: 10px 15px;
    min-width: 50px;
    background: rgba(0, 0, 0, 0.3);
}

.initial-char.active {
    color: #00FF00;
    border-color: #00FF00;
    background: rgba(0, 255, 0, 0.1);
    text-shadow: 0 0 10px #00FF00;
    animation: blink 1s infinite;
}

.initial-entry-controls {
    font-size: 12px;
    line-height: 1.6;
    color: #888;
}

.initial-entry-controls div {
    margin-bottom: 5px;
}

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

.container {
    text-align: center;
    padding: 2rem;
    animation: fadeIn 1.5s ease-in-out;
    transform: translateY(-15%); /* Restored original position - hi-score won't bump logo */
}

.domain-name {
    font-size: clamp(1.125rem, 3.75vw, 2.25rem);
    font-weight: 400;
    margin-bottom: 2rem;
    display: inline-block;
    cursor: pointer;
    user-select: none;
}

/* YEG styling - Edmonton's official blue shades */
.yeg {
    font-family: 'Press Start 2P', monospace;
    letter-spacing: 0.1em;
    animation: pixelGlow 2s ease-in-out infinite alternate;
}

.yeg .y { 
    color: #004B87; /* Edmonton Oilers blue */
    text-shadow: 2px 2px 0px #002244;
    display: inline-block;
    cursor: pointer;
    position: relative;
    z-index: 10;
}
.yeg .e { 
    color: #0066CC; /* Slightly lighter blue */
    text-shadow: 2px 2px 0px #003366;
    display: inline-block;
    cursor: pointer;
    position: relative;
    z-index: 10;
}
.yeg .g { 
    color: #0080FF; /* Bright Edmonton blue */
    text-shadow: 2px 2px 0px #004080;
    display: inline-block;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

/* PIXEL styling - 8-bit gaming colors */
.pixel {
    font-family: 'Press Start 2P', monospace;
    letter-spacing: 0.05em;
    margin-left: 0.15em;
    animation: pixelGlow 2s ease-in-out infinite alternate;
    animation-delay: 1s;
}

.pixel .p { 
    color: #FF6B6B; /* Red */
    text-shadow: 2px 2px 0px #CC5555;
    display: inline-block;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

/* Letter animations - only active when game is playing */
.game-active .pixel .p { 
    animation: pixelShake 2s ease-in-out infinite;
}
.pixel .i { 
    color: #4ECDC4; /* Cyan */
    text-shadow: 2px 2px 0px #3BA39C;
    display: inline-block;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.game-active .pixel .i { 
    animation: pixelWiggle 2.5s ease-in-out infinite;
    animation-delay: 0.2s;
}
.pixel .x { 
    color: #FFE66D; /* Yellow */
    text-shadow: 2px 2px 0px #CCB855;
    display: inline-block;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.game-active .pixel .x { 
    animation: pixelDance 3s ease-in-out infinite;
    animation-delay: 0.4s;
}
.pixel .e2 { 
    color: #95E77E; /* Green */
    text-shadow: 2px 2px 0px #76B865;
    display: inline-block;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.game-active .pixel .e2 { 
    animation: pixelVibrate 2.2s ease-in-out infinite;
    animation-delay: 0.6s;
}
.pixel .l { 
    color: #FF8CC6; /* Pink */
    text-shadow: 2px 2px 0px #CC709E;
    display: inline-block;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.game-active .pixel .l { 
    animation: pixelGlitch 2.8s ease-in-out infinite;
    animation-delay: 0.8s;
}

/* .com styling - grayed out */
.com {
    font-family: 'Press Start 2P', monospace;
    color: #666666;
    text-shadow: 2px 2px 0px #333333;
    font-size: 0.7em;
    vertical-align: baseline;
    margin-left: 0.1em;
    opacity: 0.7;
}

.insert-coin {
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    font-family: 'Press Start 2P', monospace;
    font-weight: 400;
    letter-spacing: 0.05em; /* Reduced from 0.15em for tighter spacing */
    text-transform: uppercase;
    color: #8b7355;
    margin-bottom: 1rem;
    opacity: 0.9;
    animation: blink 1s steps(2) infinite;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

.insert-coin.player-ready {
    color: #4ECDC4;
    animation: none;
    text-shadow: 0 0 15px rgba(78, 205, 196, 0.6);
    transform: translateX(-50%) scale(1.1);
}

.insert-coin.press-start {
    color: #FFE66D;
    animation: pulseBlink 0.8s steps(2) infinite;
    text-shadow: 0 0 10px rgba(255, 230, 109, 0.5);
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-top: 2rem;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    text-align: center;
}

.insert-coin.game-active {
    color: #95E77E;
    animation: none;
    text-shadow: 0 0 20px rgba(149, 231, 126, 0.7);
    transform: translateX(-50%) scale(1.2);
}

.insert-coin.game-over {
    color: #FF6B6B;
    animation: flashRed 0.3s ease-in-out infinite;
    text-shadow: 0 0 15px rgba(255, 107, 107, 0.8);
    cursor: pointer;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-top: 2rem;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
}

/* Continue countdown appears below INSERT COIN */
.continue-countdown-display {
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    font-family: 'Press Start 2P', monospace;
    color: #FFE66D;
    animation: countdownPulse 1s ease-in-out infinite;
    text-shadow: 0 0 12px rgba(255, 230, 109, 0.7);
    cursor: pointer;
    user-select: none;
    text-align: center;
    margin-top: 1rem;
    display: none; /* Hidden by default */
    line-height: 1.8; /* Add extra spacing between lines */
}

.loading-container {
    margin: 2rem auto 0 auto;
    width: min(280px, 90vw);
    max-width: 280px;
    height: clamp(1rem, 2.5vw, 1.5rem); /* Same height as PRESS START */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    z-index: 200;
}

.loading-bar {
    width: 100%;
    height: 100%; /* Fill the container height */
    background-color: #1a1614;
    border: 3px solid #95E77E;
    border-radius: 0; /* Remove rounded corners for blocky retro feel */
    overflow: hidden;
    position: relative;
    box-shadow: 
        0 0 0 1px #000000,
        inset 0 0 0 2px #2a2520,
        0 0 15px rgba(149, 231, 126, 0.4);
    font-family: 'Press Start 2P', monospace;
}

.loading-fill {
    height: 100%;
    background: #95E77E; /* Solid retro green, no gradients */
    width: 0%;
    transition: none; /* Remove smooth transitions for chunkier feel */
    box-shadow: 
        inset 0 2px 0 rgba(181, 255, 155, 0.8),
        inset 0 -2px 0 rgba(117, 181, 98, 0.8);
    position: relative;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.loading-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 2px,
        rgba(255, 255, 255, 0.15) 2px,
        rgba(255, 255, 255, 0.15) 4px
    );
}

.loading-fill.complete {
    animation: loadingFlash 0.3s ease-out;
}

.subtitle {
    font-size: clamp(0.8rem, 2.2vw, 1.2rem);
    font-weight: 300;
    color: #a89482;
    opacity: 0.8;
    letter-spacing: 0.05em;
    margin-top: 1.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pixelGlow {
    from {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
    }
    to {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
    }
}

@keyframes pixelShake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-1px, -1px) rotate(-0.5deg); }
    20% { transform: translate(1px, 0) rotate(0.5deg); }
    30% { transform: translate(0, 1px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(-0.5deg); }
    50% { transform: translate(-1px, 1px) rotate(0.5deg); }
    60% { transform: translate(0, -1px) rotate(0deg); }
    70% { transform: translate(-1px, 0) rotate(-0.5deg); }
    80% { transform: translate(1px, 1px) rotate(0.5deg); }
    90% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes pixelWiggle {
    0%, 100% { transform: translate(0, 0) skewX(0deg); }
    25% { transform: translate(1px, 0) skewX(1deg); }
    50% { transform: translate(-1px, 1px) skewX(-1deg); }
    75% { transform: translate(0, -1px) skewX(0.5deg); }
}

@keyframes pixelDance {
    0%, 100% { transform: translate(0, 0) scale(1); }
    20% { transform: translate(-1px, 1px) scale(1.02); }
    40% { transform: translate(1px, -1px) scale(0.98); }
    60% { transform: translate(-1px, -1px) scale(1.01); }
    80% { transform: translate(1px, 1px) scale(0.99); }
}

@keyframes pixelVibrate {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-1px); }
    20%, 40%, 60%, 80% { transform: translateX(1px); }
}

@keyframes pixelGlitch {
    0%, 100% { transform: translate(0, 0); filter: hue-rotate(0deg); }
    20% { transform: translate(-1px, 0); filter: hue-rotate(5deg); }
    40% { transform: translate(-1px, -1px); filter: hue-rotate(-5deg); }
    60% { transform: translate(0, 1px); filter: hue-rotate(3deg); }
    80% { transform: translate(1px, 0); filter: hue-rotate(-3deg); }
}

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

@keyframes pulseBlink {
    0%, 49% {
        opacity: 1;
        transform: scale(1);
    }
    50%, 100% {
        opacity: 0.4;
        transform: scale(0.98);
    }
}

@keyframes flashRed {
    0%, 100% { 
        opacity: 1; 
        text-shadow: 0 0 15px rgba(255, 107, 107, 0.8);
    }
    50% { 
        opacity: 0.3; 
        text-shadow: 0 0 25px rgba(255, 107, 107, 1);
    }
}

@keyframes loadingFlash {
    0% { 
        background: #95E77E;
        box-shadow: inset 0 2px 0 rgba(181, 255, 155, 0.8),
                    inset 0 -2px 0 rgba(117, 181, 98, 0.8);
    }
    50% { 
        background: #B8FF9B;
        box-shadow: 
            inset 0 2px 0 rgba(255, 255, 255, 1),
            inset 0 -2px 0 rgba(149, 231, 126, 1),
            0 0 20px rgba(149, 231, 126, 1);
    }
    100% { 
        background: #95E77E;
        box-shadow: inset 0 2px 0 rgba(181, 255, 155, 0.8),
                    inset 0 -2px 0 rgba(117, 181, 98, 0.8);
    }
}

@keyframes countdownPulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 12px rgba(255, 230, 109, 0.7);
    }
    50% { 
        opacity: 0.7;
        transform: scale(0.95);
        text-shadow: 0 0 20px rgba(255, 230, 109, 1);
    }
}

@keyframes letterShotRight {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
        filter: blur(0px);
    }
    20% {
        transform: translate(50px, -30px) rotate(180deg) scale(0.8);
        opacity: 0.8;
        filter: blur(1px);
    }
    50% {
        transform: translate(150px, -100px) rotate(540deg) scale(0.4);
        opacity: 0.4;
        filter: blur(3px);
    }
    80% {
        transform: translate(300px, -200px) rotate(900deg) scale(0.1);
        opacity: 0.1;
        filter: blur(8px);
    }
    100% {
        transform: translate(500px, -350px) rotate(1440deg) scale(0);
        opacity: 0;
        filter: blur(15px);
    }
}

@keyframes letterShotLeft {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
        filter: blur(0px);
    }
    20% {
        transform: translate(-50px, -30px) rotate(-180deg) scale(0.8);
        opacity: 0.8;
        filter: blur(1px);
    }
    50% {
        transform: translate(-150px, -100px) rotate(-540deg) scale(0.4);
        opacity: 0.4;
        filter: blur(3px);
    }
    80% {
        transform: translate(-300px, -200px) rotate(-900deg) scale(0.1);
        opacity: 0.1;
        filter: blur(8px);
    }
    100% {
        transform: translate(-500px, -350px) rotate(-1440deg) scale(0);
        opacity: 0;
        filter: blur(15px);
    }
}

@keyframes letterShotUp {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
        filter: blur(0px);
    }
    20% {
        transform: translate(20px, -60px) rotate(270deg) scale(0.8);
        opacity: 0.8;
        filter: blur(1px);
    }
    50% {
        transform: translate(50px, -200px) rotate(720deg) scale(0.4);
        opacity: 0.4;
        filter: blur(3px);
    }
    80% {
        transform: translate(80px, -400px) rotate(1080deg) scale(0.1);
        opacity: 0.1;
        filter: blur(8px);
    }
    100% {
        transform: translate(100px, -600px) rotate(1440deg) scale(0);
        opacity: 0;
        filter: blur(15px);
    }
}

.pixel-shot-right {
    animation: letterShotRight 1.5s ease-out forwards !important;
    pointer-events: none;
}

.pixel-shot-left {
    animation: letterShotLeft 1.5s ease-out forwards !important;
    pointer-events: none;
}

.pixel-shot-up {
    animation: letterShotUp 1.5s ease-out forwards !important;
    pointer-events: none;
}

/* Edmonton Info Card */
.info-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%) translateY(100px);
    width: 90%;
    max-width: 400px;
    background: linear-gradient(135deg, #0a0908 0%, #1a1614 50%, #2a2520 100%);
    border: 3px solid #8b7355;
    border-radius: 0;
    box-shadow: 
        0 0 0 1px #000000,
        inset 0 0 0 2px #3a3530,
        0 0 20px rgba(139, 115, 85, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.8);
    font-family: 'Press Start 2P', monospace;
    z-index: 200;
    opacity: 0;
    transition: all 0.5s ease-out;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.info-card.show {
    transform: translateX(-50%) translateY(-50%);
    opacity: 1;
}

.info-card.fade-out {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    transition: all 1s ease-in-out;
}

.info-card-content {
    padding: 20px;
    text-align: center;
}

.info-card-title {
    font-size: 12px;
    color: #FFE66D;
    text-shadow: 2px 2px 0px #CCB855;
    margin: 0 0 15px 0;
    letter-spacing: 0.1em;
    animation: blink 2s steps(2) infinite;
}

.info-card-fact {
    font-size: 8px;
    line-height: 1.6;
    color: #f5f5f5;
    margin: 0 0 20px 0;
    padding: 0 10px;
    text-shadow: 1px 1px 0px #000000;
    letter-spacing: 0.05em;
}

.weather-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #8b7355;
}

.weather-icon {
    width: 48px;
    height: 48px;
    background: rgba(76, 205, 196, 0.3);
    border: 2px solid rgba(59, 163, 156, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    image-rendering: pixelated;
    position: relative;
}

.weather-details {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather-temp {
    font-size: 12px;
    color: #95E77E;
    text-shadow: 2px 2px 0px #76B865;
    font-weight: normal;
}

.weather-desc {
    font-size: 8px;
    color: #a89482;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* 8-bit Weather Icons */
.weather-sunny {
    background: rgba(255, 230, 109, 0.2);
    border-color: rgba(204, 184, 85, 0.4);
    position: relative;
}

.weather-sunny::before {
    content: '☀';
    font-size: 28px;
    color: #FF8C00;
    text-shadow: 1px 1px 0px #CC7000;
    opacity: 0.8;
}

.weather-cloudy {
    background: rgba(168, 148, 130, 0.2);
    border-color: rgba(139, 115, 85, 0.4);
}

.weather-cloudy::before {
    content: '☁';
    font-size: 26px;
    color: #f5f5f5;
    text-shadow: 1px 1px 0px #666;
    opacity: 0.8;
}

.weather-rainy {
    background: rgba(76, 205, 196, 0.2);
    border-color: rgba(59, 163, 156, 0.4);
}

.weather-rainy::before {
    content: '🌧';
    font-size: 24px;
    opacity: 0.8;
}

.weather-snowy {
    background: rgba(245, 245, 245, 0.2);
    border-color: rgba(224, 224, 224, 0.4);
}

.weather-snowy::before {
    content: '❄';
    font-size: 24px;
    color: #87CEEB;
    text-shadow: 1px 1px 0px #5F9EA0;
    opacity: 0.8;
}

.weather-stormy {
    background: rgba(102, 102, 102, 0.2);
    border-color: rgba(68, 68, 68, 0.4);
}

.weather-stormy::before {
    content: '⛈';
    font-size: 24px;
    opacity: 0.8;
}

.weather-foggy {
    background: rgba(153, 153, 153, 0.2);
    border-color: rgba(119, 119, 119, 0.4);
}

.weather-foggy::before {
    content: '🌫';
    font-size: 22px;
    opacity: 0.8;
}

/* Matrix Easter Egg - Pi Symbol */
.pi-symbol {
    position: fixed;
    font-family: Georgia, 'Times New Roman', serif; /* Standard serif font for mathematical symbol */
    font-size: 24px;
    color: rgba(139, 115, 85, 0.4); /* Much more visible for desktop */
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    z-index: 50;
    animation: piPulse 4s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    image-rendering: auto; /* Override pixelated rendering from body */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-style: italic; /* Italic for mathematical look */
    /* Position will be set randomly via JavaScript */
}

/* Mobile-specific styles for pi symbol */
@media (max-width: 768px) {
    .pi-symbol {
        font-size: 28px; /* Bigger on mobile for easier tapping */
        color: rgba(139, 115, 85, 0.35); /* More visible on mobile */
        padding: 10px; /* Add tap area padding */
        margin: -10px; /* Compensate for padding in positioning */
    }
}

.pi-symbol:hover {
    opacity: 1;
    color: #00FF00; /* Matrix green on hover */
    text-shadow: 0 0 15px #00FF00;
    transform: scale(1.2);
    image-rendering: auto; /* Ensure smooth rendering on hover */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@keyframes piPulse {
    0%, 100% { 
        opacity: 0.15; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.3; 
        transform: scale(1.05);
    }
}

/* Matrix Rain Effect */
.matrix-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 9999;
    opacity: 0;
    /* No transition - instant appearance */
}

.matrix-overlay.show {
    opacity: 1;
}

.matrix-overlay.fade-out {
    opacity: 0;
    transition: opacity 3s ease-in-out;
}

#matrixCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Matrix Text Sequence */
.matrix-text-sequence {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.matrix-text-sequence.show {
    opacity: 1;
}

.matrix-text-content {
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

.matrix-text-line {
    font-family: 'Press Start 2P', monospace;
    font-size: 18px;
    color: #00FF00;
    margin: 40px 0;
    min-height: 40px;
    text-shadow: 0 0 20px #00FF00;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.matrix-text-line.typing {
    opacity: 1;
}

@media (max-width: 768px) {
    .matrix-text-line {
        font-size: 14px;
        margin: 30px 0;
    }
    
    .matrix-text-content {
        padding: 20px;
    }
}

/* Neo's Choice Dialog */
.neo-choice {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.neo-choice.show {
    opacity: 1;
}

.choice-content {
    max-width: 800px;
    padding: 40px;
    text-align: center;
    font-family: 'Press Start 2P', monospace;
}

.choice-title {
    font-size: 18px;
    color: #00FF00;
    margin: 0 0 30px 0;
    text-shadow: 0 0 20px #00FF00;
    animation: textGlow 2s ease-in-out infinite alternate;
}

.choice-text {
    font-size: 12px;
    color: #ffffff;
    margin: 0 0 40px 0;
    line-height: 1.8;
}

.pills {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin: 0 0 40px 0;
    flex-wrap: wrap;
}

.pill {
    background: transparent;
    border: 3px solid;
    padding: 20px;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 300px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.blue-pill {
    border-color: #0066FF;
    color: #0066FF;
}

.blue-pill:hover {
    background: #0066FF;
    color: #ffffff;
    box-shadow: 0 0 30px #0066FF;
    transform: scale(1.05);
}

.red-pill {
    border-color: #FF0000;
    color: #FF0000;
}

.red-pill:hover {
    background: #FF0000;
    color: #ffffff;
    box-shadow: 0 0 30px #FF0000;
    transform: scale(1.05);
}

.pill-text {
    font-size: 10px;
    font-weight: bold;
}

.pill-desc {
    font-size: 7px;
    line-height: 1.4;
    opacity: 0.8;
}

.choice-footer {
    font-size: 8px;
    color: #888888;
    font-style: italic;
    margin: 0;
}

@keyframes textGlow {
    from { text-shadow: 0 0 20px #00FF00; }
    to { text-shadow: 0 0 30px #00FF00, 0 0 40px #00FF00; }
}

@media (max-width: 768px) {
    .pills {
        flex-direction: column;
        align-items: center;
    }
    
    .pill {
        width: 280px;
    }
    
    .choice-title {
        font-size: 14px;
    }
    
    .choice-content {
        padding: 20px;
    }
}

/* Retro scanline effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
    transform: translateY(-15%);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .domain-name {
        font-size: clamp(1.15rem, 6.9vw, 2.875rem);
        width: 95%;
        max-width: 95%;
        text-align: center;
        white-space: nowrap;
        overflow: visible;
        display: inline-block;
    }
    
    /* Make Player 1UP same size as INSERT COIN on mobile */
    .player-1up {
        font-size: clamp(0.8rem, 2vw, 1.2rem);
    }
    
    .player-label, .player-value {
        font-size: clamp(0.8rem, 2vw, 1.2rem);
    }
    
    /* Make Score same size as INSERT COIN on mobile */
    .current-score {
        font-size: clamp(0.8rem, 2vw, 1.2rem);
    }
    
    .score-label, .score-value {
        font-size: clamp(0.8rem, 2vw, 1.2rem);
    }
}