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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.controls {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 0.2rem;
    padding: 1rem;
    background-color: #2a2a2a;
    border-radius: 8px;
    border: 1px solid #3a3a3a;
    flex-wrap: wrap;
}

.controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.controls button {
    padding: 0.5rem 1.5rem;
    background-color: #4a9eff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.controls button:hover {
    background-color: #3a8eef;
}

.controls button:active {
    background-color: #2a7edf;
}

.controls select,
.controls input[type="number"] {
    padding: 0.4rem 0.8rem;
    background-color: #1a1a1a;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    font-size: 0.9rem;
}

.controls select:focus,
.controls input[type="number"]:focus {
    outline: none;
    border-color: #4a9eff;
}

#seed-input {
    width: 60px;
}

.controls input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4a9eff;
}

.controls input[type="range"] {
    width: 120px;
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

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

.controls input[type="range"]::-webkit-slider-thumb:hover {
    background: #3a8eef;
}

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

.controls input[type="range"]::-moz-range-thumb:hover {
    background: #3a8eef;
}

.controls input[type="range"]::-moz-range-track {
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
}

#density-value {
    min-width: 35px;
    text-align: right;
    color: #4a9eff;
    font-weight: 500;
}

#visualization-container {
    width: 100%;
    max-width: 720px;
    aspect-ratio: 1;
    margin: 0 auto;
    background-color: #2a2a2a;
    border-radius: 8px;
    border: 1px solid #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#heatmap-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.hint {
    margin-top: 0.2rem;
    font-size: 0.9rem;
    color: #cccccc;
    text-align: center;
}
