body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 3840px;
    height: 100%;
    max-height: 2160px;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    display: block;
    background-color: #1e1b4b;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    box-sizing: border-box;
}

input[type="range"] {
    pointer-events: auto !important;
}

label {
    pointer-events: auto !important;
}

#score-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(30, 27, 75, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

#keys-display {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
}

.key {
    width: 50px;
    height: 50px;
    background-color: rgba(30, 27, 75, 0.8);
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    transition: all 0.1s ease;
    backdrop-filter: blur(10px);
}

.key.active {
    background-color: rgba(236, 72, 153, 0.5);
    border-color: #ec4899;
    transform: scale(0.95);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.7);
}

.particle {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
}

#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    backdrop-filter: blur(5px);
}

#game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.screen-content {
    text-align: center;
    color: white;
    max-width: 500px;
    padding: 2rem;
    background-color: rgba(30, 27, 75, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

button {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    background-color: #6366f1;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
}

button:hover {
    background-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.rating {
    font-size: 4rem;
    font-weight: bold;
    margin: 1rem 0;
    text-shadow: 0 0 20px currentColor;
}

.rating-S { color: #fcd34d; }
.rating-A { color: #60a5fa; }
.rating-B { color: #34d399; }
.rating-C { color: #f87171; }
.rating-D { color: #a16207; }

.stats {
    margin-top: 1rem;
    display: flex;
    justify-content: space-around;
    width: 100%;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e0e7ff;
}

.stat-label {
    font-size: 0.875rem;
    color: #94a3b8;
}