* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow: hidden;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    padding-top: 20px;
}

.game-container {
    background: rgba(40, 40, 40, 0.95);
    border-radius: 15px;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

canvas {
    background: #242424;
    border-radius: 12px;
    width: 100%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

#score {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.button {
    padding: 12px 30px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.start-button {
    background: linear-gradient(45deg, #ff6b6b, #ff8787);
}

.reset-button {
    background: linear-gradient(45deg, #4ecdc4, #45b7af);
}

.rainbow-button {
    background: linear-gradient(45deg, #845ec2, #7158e2);
}

#colorPicker {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.color-options {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.color-option:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.color-option.active {
    border: 2px solid white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

#trailColor {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 45px;
    height: 45px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

#trailColor::-webkit-color-swatch-wrapper {
    padding: 0;
}

#trailColor::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
    padding: 0;
}

#trailColor::-moz-color-swatch {
    border: none;
    border-radius: 50%;
    padding: 0;
}

#gameOver {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 30, 30, 0.95);
    padding: 30px 50px;
    border-radius: 15px;
    text-align: center;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

#gameOver h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #ff6b6b;
}

#gameOver p {
    font-size: 24px;
    margin-bottom: 30px;
}

label {
    color: #fff;
    font-size: 16px;
}

.canvas-container {
    position: relative;
    width: 100%;
}

#startOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
    backdrop-filter: blur(3px);
}

#startOverlay:hover {
    background: rgba(0, 0, 0, 0.8);
}

#startOverlay h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #ff6b6b;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#startOverlay p {
    font-size: 18px;
    margin: 5px 0;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
} 