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

body {
    background: radial-gradient(ellipse at center, #0a0e27 0%, #000000 100%);
    color: white;
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#game-container {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff);
    background-size: 300% 300%;
    animation: borderGlow 3s ease-in-out infinite;
    padding: 2px;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

#gameCanvas {
    background-color: #000;
    display: block;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
}

#ui-container {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    padding: 20px;
    width: 100%;
    height: 45px;
    display: flex;
    justify-content: space-between;
    font-size: 24px;
    text-shadow: 2px 2px 4px #000, 0 0 10px currentColor;
}

.ui-element {
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    backdrop-filter: blur(5px);
}

.ui-element span:first-child {
    color: #00ffff;
    margin-right: 10px;
}

.ui-element span:last-child {
    color: #ffff00;
    font-weight: bold;
}

#game-over-ui {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(20, 0, 30, 0.9));
    padding: 40px;
    border: 2px solid #ff00ff;
    border-radius: 10px;
    text-align: center;
    font-size: 28px;
    box-shadow: 0 0 50px rgba(255, 0, 255, 0.5), inset 0 0 30px rgba(255, 0, 255, 0.2);
    backdrop-filter: blur(10px);
}

#game-over-ui h1 {
    font-size: 48px;
    color: #ff0066;
    text-shadow: 0 0 20px currentColor;
    animation: pulse 1s ease-in-out infinite;
}

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

#game-over-ui p {
    margin: 20px 0;
    color: #00ffff;
}

#final-score {
    color: #ffff00;
    font-size: 36px;
    text-shadow: 0 0 10px currentColor;
}

#restart-button {
    margin-top: 30px;
    padding: 15px 40px;
    font-size: 24px;
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.5);
}

#restart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.7);
    background: linear-gradient(45deg, #ff33ff, #33ffff);
}

#restart-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.5);
}

.hidden {
    display: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #ui-container {
        font-size: 18px;
        padding: 10px;
    }
    
    .ui-element {
        padding: 5px 10px;
    }
    
    #game-over-ui {
        padding: 20px;
        font-size: 20px;
    }
    
    #game-over-ui h1 {
        font-size: 36px;
    }
    
    #restart-button {
        font-size: 18px;
        padding: 12px 30px;
    }
}