body {
    font-family: sans-serif;
    text-align: center;
    margin-top: 30px;
    background-color: #1e1e1e; /* dark background */
    color: #eee; /* light text */
}

canvas {
    background: #577db7; /* dark canvas background */
    image-rendering: pixelated;
    display: block;
    margin: 20px auto;
    border: 1px solid #555;
}

select {
    font-size: 16px;
    padding: 4px;
    background: #333;
    color: #eee;
    border: 1px solid #555;
}

/* Horizontal layout for drag & drop fields */
.drop-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.drop-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.drop-field {
    border: 2px dashed #888;
    padding: 5px;
    margin: 5px;
    width: 80px;
    height: 80px;
    cursor: pointer;
    position: relative;
    background-color: #2a2a2a;
}

.drop-field.dragover {
    border-color: #1e90ff;
    background-color: #3a3a3a;
}

.drop-field.active {
    border-color: #ff5555;
}

.drop-field canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Wrapper to center everything */
#controlsWrapper {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

#controls {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: sans-serif;
}

.control-btn {
    background: #4caf50;
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.control-btn:hover {
    background: #45a049;
}

.speed-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

#speedSlider {
    -webkit-appearance: none;
    width: 120px;
    height: 6px;
    background: #555;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    transition: background 0.2s;
}

#speedSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #4caf50;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

#speedSlider::-webkit-slider-thumb:hover {
    background: #45a049;
}

#speedSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #4caf50;
    border-radius: 50%;
    cursor: pointer;
}

#previewWrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#leftPanel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    left: 0;
    top: 0;
    margin-left: 20px;
}

.vertical-drop-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drop-label {
    font-size: 14px;
    margin-bottom: 4px;
    text-align: center;
    font-weight: bold;
    color: #eee;
}

.drop-field {
    border: 1px solid #666;
    width: 80px;
    height: 80px;
    background: #2a2a2a;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    margin-top: 5px;
    gap: 6px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0;
    right: 0; bottom: 0;
    background-color: #555;
    border-radius: 20px;
    transition: 0.2s;
}

.slider::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: #eee;
    border-radius: 50%;
    transition: 0.2s;
}

input:checked + .slider {
    background-color: #4caf50;
}

input:checked + .slider::before {
    transform: translateX(16px);
}

.toggle-text {
    font-size: 0.9em;
    color: #eee;
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
    -webkit-appearance: none;
    background: #555;
    outline: none;
    border-radius: 20px;
    transition: background 0.3s;
    vertical-align: middle;
    cursor: pointer;
}

.toggle-switch:checked {
    background: #4caf50;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 2px;
    left: 2px;
    background: #eee;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch:checked::after {
    left: 22px;
}

.instructions {
    max-width: 700px;
    margin: 30px auto 0;
    padding: 16px 20px;
    background: #252525;
    border: 1px solid #444;
    border-radius: 8px;
    text-align: left;
}

.instructions h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #fff;
}

.instructions ul {
    margin: 0;
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
    line-height: 1.4;
    color: #ddd;
}

.app-header {
    margin-bottom: 20px;
}

.app-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
}

.app-subtitle {
    margin-top: 4px;
    font-size: 14px;
    color: #aaa;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

#canvasArea {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#canvasDropOverlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(30, 144, 255, 0.12);
    border: 3px dashed #1e90ff;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #e5efff;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-align: center;
    z-index: 9999;
}

#canvasDropOverlay.active {
    opacity: 1;
}



