body {
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background: #ffd966;
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 24px;
}

#canvas-container {
    max-width: 1000px;
    max-height: 300px;
    margin: 0 auto;
    border: 1px solid #ddd;
    background-color: white;
    padding: 20px;
}

#sorting-container {
    max-width: 1300px;
    height: 475px;
    margin: 0 auto;
    border: 1px solid #ddd;
    background-color: white;
    padding: 20px;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    padding: 10px;
}

.button-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px;
}

input[type="range"] {
    width: 80%;
    padding: 10px;
    appearance: none;
    background: #ddd;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ffd966;
    border: 2px solid #ffd966;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ffd966;
    border: 2px solid #ffd966;
    border-radius: 50%;
    cursor: pointer;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    row-gap: 75px;
    column-gap: 150px;
    align-items: baseline;
    justify-items: center;
    margin: 20px 0;
    padding-left: 200px;
    padding-right: 200px;
    height: 1050px;
}

.visualizer {
    background-color: white;
    border: 1px solid #ddd;
    padding: 20px;
    text-align: center;
    width: 525px;
    height: 450px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    transition: transform 0.2s ease-in-out;
}

.visualizer:hover {
    transform: scale(1.05);
}

.visualizer h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.visualizer p {
    font-size: 16px;
    margin-bottom: 20px;
}

.visualizer a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #ffd966;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

.visualizer a:hover {
    background-color: #ffd966c0;
}

.preview-img {
    width: 100%;
    height: 275px;
    object-fit: contain;
    border-radius: 4px;
}

select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    color: #333;
    font-size: 16px;
    outline: none;
    margin: 3px;
}

select:hover,
select:focus {
    border-color: #999;
}

button {
    display: inline-block;
    padding: 10px 20px;
    min-width: 125px;
    background-color: #ffd966;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    border: none;
    margin: 3px;
    white-space: nowrap;
}

button:hover {
    background-color: #ffd966c0;
}