/* Doggo Adventure - Retro Style CSS */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
    background: linear-gradient(45deg, #0f0f23, #1a1a2e, #16213e);
    font-family: 'Press Start 2P', monospace;
    color: #00ff00;
    overflow: hidden;
    min-height: 100vh;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Retro scanlines effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 0, 0.03) 2px,
        rgba(0, 255, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1000;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    border: 6px solid #ff6b35;
    border-radius: 0;
    box-shadow: 
        0 0 20px rgba(255, 107, 53, 0.8),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(to bottom, #87CEEB 0%, #87CEEB 60%, #98FB98 60%, #98FB98 100%);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Main Menu Styling */
#mainMenu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, #1a1a2e 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, #16213e 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, #0f0f23 0%, transparent 50%),
        linear-gradient(45deg, #0f0f23, #1a1a2e);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#gameTitle {
    font-size: 4rem;
    color: #ff6b35;
    text-shadow: 
        4px 4px 0px #000,
        8px 8px 0px #ff6b35,
        12px 12px 0px #000;
    margin-bottom: 3rem;
    animation: titleGlow 3s infinite;
    text-align: center;
    line-height: 1.2;
}

@keyframes titleGlow {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 
            4px 4px 0px #000,
            8px 8px 0px #ff6b35,
            12px 12px 0px #000;
    }
    50% { 
        transform: scale(1.05);
        text-shadow: 
            4px 4px 0px #000,
            8px 8px 0px #ff6b35,
            12px 12px 0px #000,
            0 0 20px #ff6b35;
    }
}

#storyText {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: #00ff00;
    padding: 20px;
    border: 3px solid #ff6b35;
    border-radius: 0;
    font-size: 0.7rem;
    line-height: 1.6;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 
        inset 0 0 10px rgba(0, 255, 0, 0.3),
        0 0 20px rgba(255, 107, 53, 0.5);
}

#closeStory {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b35;
    color: white;
    border: 2px solid #000;
    width: 30px;
    height: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: 'Press Start 2P', monospace;
}

#closeStory:hover {
    background: #f7931e;
    transform: scale(1.1);
}

#closeStory:active {
    transform: scale(0.95);
}

.menuButton {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    border: 4px solid #000;
    color: #fff;
    padding: 20px 40px;
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    cursor: pointer;
    margin: 15px;
    transition: all 0.2s;
    text-shadow: 2px 2px 0px #000;
    position: relative;
    box-shadow: 
        4px 4px 0px #000,
        8px 8px 0px #ff6b35;
}

.menuButton:hover {
    background: linear-gradient(45deg, #f7931e, #ff6b35);
    transform: translateY(-2px);
    box-shadow: 
        6px 6px 0px #000,
        12px 12px 0px #ff6b35;
}

.menuButton:active {
    transform: translateY(2px);
    box-shadow: 
        2px 2px 0px #000,
        4px 4px 0px #ff6b35;
}

.menuButton.selected {
    background: linear-gradient(45deg, #00ff00, #00cc00);
    box-shadow: 
        4px 4px 0px #000,
        8px 8px 0px #00ff00;
    animation: selectedPulse 1s infinite;
}

@keyframes selectedPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* HUD Styling */
#hud {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    z-index: 100;
}

.hudElement {
    background: rgba(0, 0, 0, 0.9);
    color: #00ff00;
    padding: 15px 20px;
    border: 3px solid #ff6b35;
    border-radius: 0;
    font-size: 0.8rem;
    box-shadow: 
        inset 0 0 10px rgba(0, 255, 0, 0.3),
        0 0 15px rgba(255, 107, 53, 0.5);
    text-shadow: 1px 1px 0px #000;
}

/* Instructions */
#instructions {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.9);
    color: #00ff00;
    padding: 20px;
    border: 3px solid #ff6b35;
    border-radius: 0;
    font-size: 0.6rem;
    max-width: 350px;
    box-shadow: 
        inset 0 0 10px rgba(0, 255, 0, 0.3),
        0 0 15px rgba(255, 107, 53, 0.5);
    line-height: 1.5;
}

/* Retro scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #000;
    border: 2px solid #ff6b35;
}

::-webkit-scrollbar-thumb {
    background: #00ff00;
    border: 2px solid #000;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Retro button animations */
@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.menuButton.pressed {
    animation: buttonPress 0.1s;
}

/* Power-up indicator styling */
.powerUpIndicator {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 10px;
    font-size: 0.6rem;
    text-shadow: 1px 1px 0px #000;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Retro CRT monitor effect */
#gameContainer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Pixel perfect scaling */
canvas {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}
