* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.game-container {
    position: relative;
    width: 1000px;
    height: 800px;
    border: 2px solid #0ff;
    box-shadow: 0 0 20px #0ff;
    overflow: hidden;
    animation: borderPulse 3s infinite alternate;
}

@keyframes borderPulse {
    0% { border-color: #0ff; box-shadow: 0 0 20px #0ff; }
    25% { border-color: #ff00ff; box-shadow: 0 0 20px #ff00ff; }
    50% { border-color: #ffff00; box-shadow: 0 0 20px #ffff00; }
    75% { border-color: #00ff00; box-shadow: 0 0 20px #00ff00; }
    100% { border-color: #ff0000; box-shadow: 0 0 20px #ff0000; }
}

#gameCanvas {
    background-color: #000;
    width: 100%;
    height: 100%;
}

.registration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.registration h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #0ff;
    text-shadow: 0 0 10px #0ff;
    letter-spacing: 3px;
    animation: textGlitch 2s infinite;
}

@keyframes textGlitch {
    0% { transform: skew(0deg); }
    20% { transform: skew(0deg); }
    21% { transform: skew(10deg); }
    23% { transform: skew(-10deg); }
    25% { transform: skew(0deg); }
    90% { transform: skew(0deg); }
    91% { transform: skew(-5deg); }
    93% { transform: skew(5deg); }
    95% { transform: skew(0deg); }
}

.timer {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #fff;
}

.players {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 80%;
}

.player {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    transition: transform 0.3s;
}

.player:hover {
    transform: scale(1.05) rotate(1deg);
}

.player.active {
    border-color: #0ff;
    box-shadow: 0 0 10px #0ff;
    animation: wobble 2s infinite;
}

@keyframes wobble {
    0% { transform: translateX(0); }
    15% { transform: translateX(-5px) rotate(-2deg); }
    30% { transform: translateX(5px) rotate(2deg); }
    45% { transform: translateX(-5px) rotate(-1deg); }
    60% { transform: translateX(5px) rotate(1deg); }
    75% { transform: translateX(-3px) rotate(-0.5deg); }
    100% { transform: translateX(0); }
}

.color-box {
    width: 30px;
    height: 30px;
    margin-right: 15px;
    border-radius: 3px;
    animation: colorPulse 3s infinite;
}

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

.red {
    background-color: #ff0000;
    box-shadow: 0 0 10px #ff0000;
}

.yellow {
    background-color: #ffff00;
    box-shadow: 0 0 10px #ffff00;
}

.purple {
    background-color: #ff00ff;
    box-shadow: 0 0 10px #ff00ff;
}

.blue {
    background-color: #00f;
    box-shadow: 0 0 10px #00f;
}

.green {
    background-color: #0f0;
    box-shadow: 0 0 10px #0f0;
}

.player-name {
    flex: 1;
    font-size: 1.2rem;
}

.status {
    font-size: 0.9rem;
    color: #999;
}

.status.joined {
    color: #0f0;
    animation: pulse 1s infinite;
}

.game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.game-over h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #f00;
    text-shadow: 0 0 10px #f00;
    animation: gameOverPulse 0.5s infinite alternate;
}

@keyframes gameOverPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

#winner {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #0ff;
    animation: winnerSpin 5s infinite;
}

@keyframes winnerSpin {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

#restartButton {
    padding: 10px 20px;
    font-size: 1.2rem;
    background-color: #0ff;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
    0% { transform: scale(1); background-color: #0ff; }
    50% { transform: scale(1.1); background-color: #ff00ff; }
    100% { transform: scale(1); background-color: #0ff; }
}

#restartButton:hover {
    background-color: #fff;
    box-shadow: 0 0 15px #0ff;
    transform: rotate(5deg) scale(1.1);
}

.hidden {
    display: none;
}

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

.pulse {
    animation: pulse 1.5s infinite;
}

/* Weird visual effects */
.message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: bold;
    z-index: 100;
    animation: messageAppear 0.5s;
}

@keyframes messageAppear {
    0% { transform: translate(-50%, -50%) scale(0); }
    80% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}