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

body {
    font-family: sans-serif;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    display: inline-block;
}

#game-canvas {
    display: block;
    background-color: #2a2a2a;
    border: 2px solid #444;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

@font-face {
    font-family: 'Metal Vengeance';
    src: url('assets/fonts/Metal Vengeance.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

#score {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Metal Vengeance', sans-serif;
    font-size: 64px;
    text-align: center;
}

#game-status {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    font-family: sans-serif;
    font-size: 12px;
    text-align: center;
}

#controls-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 15px;
    min-width: 600px;
    width: 600px;
    pointer-events: auto;
    color: white;
    font-size: 14px;
    transition: min-width 0.3s ease-out, width 0.3s ease-out, padding 0.3s ease-out;
}

#controls-menu.collapsed {
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    padding: 8px 12px;
    display: inline-block;
}

#controls-menu h3 {
    margin-bottom: 15px;
    font-size: 16px;
    text-align: right;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s, margin-bottom 0.3s ease-out, padding-bottom 0.3s ease-out;
    white-space: nowrap;
}

#controls-menu.collapsed h3 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    display: inline-block;
    width: auto;
    max-width: none;
}

#controls-menu h3:hover {
    color: #4a9eff;
}

#toggle-icon {
    font-size: 12px;
    margin-left: 8px;
    transition: transform 0.3s;
    display: inline-block;
}

#controls-menu.collapsed #toggle-icon {
    transform: rotate(-90deg);
}

#controls-content {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    overflow: hidden;
    max-height: 500px;
    opacity: 1;
    display: flex;
    gap: 20px;
}

#controls-menu.collapsed #controls-content {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    display: none;
}

.controls-column {
    flex: 1;
    min-width: 0;
}

.controls-column h4 {
    margin-bottom: 10px;
    font-size: 13px;
    color: #4a9eff;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: #333;
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #4a9eff;
    cursor: pointer;
    border-radius: 50%;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #4a9eff;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

