/* Donkey Kong - Retro Arcade Styling */

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

body {
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 480px;
    height: 600px;
    background-color: #000;
    border: 4px solid #444;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* UI Overlay */
.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
}

.ui-top {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.ui-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ui-label {
    color: #ff0;
    font-size: 10px;
    margin-bottom: 4px;
    text-shadow: 2px 2px 0 #000;
}

.ui-value {
    font-size: 14px;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 20;
    text-align: center;
}

.screen.hidden {
    display: none;
}

.screen-content {
    padding: 20px;
}

/* Title Screen */
.game-title {
    color: #f00;
    font-size: 32px;
    text-shadow: 3px 3px 0 #ff0, 6px 6px 0 #000;
    margin-bottom: 10px;
    animation: pulse 1s ease-in-out infinite;
}

.game-subtitle {
    color: #fff;
    font-size: 12px;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.title-characters {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px 0;
    font-size: 40px;
}

.title-dk {
    animation: bounce 0.5s ease-in-out infinite;
}

.title-mario {
    animation: bounce 0.5s ease-in-out infinite 0.1s;
}

.title-pauline {
    animation: bounce 0.5s ease-in-out infinite 0.2s;
}

.press-start {
    color: #ff0;
    font-size: 14px;
    margin-top: 20px;
    animation: blink 1s step-end infinite;
}

.controls-info {
    margin: 20px 0;
    line-height: 2;
}

.controls-info p {
    color: #0ff;
    font-size: 10px;
    margin: 8px 0;
}

.high-score-display {
    color: #ff0;
    font-size: 12px;
    margin-top: 20px;
}

/* Level Intro Screen */
.level-title {
    color: #fff;
    font-size: 36px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 #f00;
}

.level-subtitle {
    color: #0ff;
    font-size: 18px;
    margin-top: 10px;
    letter-spacing: 2px;
}

.get-ready {
    color: #ff0;
    font-size: 16px;
    margin-top: 30px;
    animation: pulse 0.5s ease-in-out infinite;
}

/* Game Over Screen */
.game-over-title {
    color: #f00;
    font-size: 36px;
    text-shadow: 3px 3px 0 #000;
    animation: shake 0.5s ease-in-out;
}

.final-scores {
    margin: 20px 0;
}

.final-scores p,
.final-score-text {
    color: #fff;
    font-size: 14px;
    margin: 10px 0;
}

/* Victory Screen */
.victory-title {
    color: #0f0;
    font-size: 36px;
    text-shadow: 3px 3px 0 #000;
    animation: pulse 0.5s ease-in-out infinite;
}

.victory-characters {
    font-size: 48px;
    margin: 20px 0;
    animation: pulse 1s ease-in-out infinite;
}

/* Pause Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 25;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background-color: #000;
    border: 4px solid #fff;
    padding: 30px 50px;
}

.overlay-content h2 {
    color: #ff0;
    font-size: 28px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0 #f00;
}

.overlay-content p {
    color: #fff;
    font-size: 12px;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

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

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Responsive Scaling */
@media (max-width: 500px) {
    #game-container {
        width: 100vw;
        height: 125vw;
        max-height: 100vh;
        border-width: 2px;
    }
    
    .ui-label {
        font-size: 8px;
    }
    
    .ui-value {
        font-size: 12px;
    }
    
    .game-title {
        font-size: 24px;
    }
    
    .game-subtitle {
        font-size: 10px;
    }
    
    .press-start {
        font-size: 12px;
    }
    
    .controls-info p {
        font-size: 8px;
    }
    
    .level-title {
        font-size: 28px;
    }
    
    .level-subtitle {
        font-size: 14px;
    }
    
    .get-ready {
        font-size: 14px;
    }
    
    .game-over-title,
    .victory-title {
        font-size: 28px;
    }
    
    .final-scores p,
    .final-score-text {
        font-size: 12px;
    }
    
    .overlay-content {
        padding: 20px 30px;
    }
    
    .overlay-content h2 {
        font-size: 24px;
    }
}