body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.container {
    border: 1px solid #333;
    padding: 20px;
    border-radius: 5px;
    background-color: #242424;
    max-width: none;
    margin: 20px;
}

h1 {
    color: #4a90e2;
    margin-bottom: 20px;
}

.controls-section {
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    background-color: #3a3a3a;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #4a4a4a;
}

button:disabled {
    background-color: #2a2a2a;
    color: #666;
    cursor: not-allowed;
}

#downloadBinButton {
    background-color: #2d4159;
    color: #4a90e2;
    border-color: #4a90e2;
    width: 100%;
}

#downloadBinButton:hover {
    background-color: #4a90e2;
    color: #fff;
}

.main-container {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.controls-container {
    flex: 0 0 300px;
}

.controls {
    margin: 20px 0;
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 5px;
    border: 1px solid #333;
}

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

.control-group label {
    display: block;
    margin-bottom: 8px;
    color: #e0e0e0;
}

.control-group span {
    margin-left: 10px;
    color: #4a90e2;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 16px;
}

input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 2px;
    background: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
}

input[type="range"] {
    width: 100%;
    max-width: 400px;
    background-color: #3a3a3a;
    height: 6px;
    border-radius: 3px;
    -webkit-appearance: none;
}

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

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

select {
    width: 100%;
    padding: 10px;
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 16px;
    cursor: pointer;
}

select:hover {
    background-color: #4a4a4a;
}

select option {
    background-color: #3a3a3a;
    color: #e0e0e0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
}

input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #4a90e2;
}

input[type="file"] {
    width: 100%;
    padding: 10px;
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
    padding: 8px 16px;
    margin-right: 10px;
    background-color: #4a4a4a;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background-color: #5a5a5a;
}

.info-text {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
    font-style: italic;
}

#status {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
}

.success {
    background-color: #1b3320;
    color: #4caf50;
    border: 1px solid #2d592f;
}

.error {
    background-color: #331b1b;
    color: #f44336;
    border: 1px solid #592d2d;
}

.info {
    background-color: #1b2433;
    color: #2196f3;
    border: 1px solid #2d4159;
}

#fps {
    color: #4a90e2;
    font-family: monospace;
    font-size: 14px;
    margin-top: 10px;
}

.preview-section {
    flex: 1;
}

.preview-container {
    display: flex;
    justify-content: center;
}

.preview-box {
    text-align: center;
}

.preview-box h3 {
    color: #4a90e2;
    margin: 0 0 0 0;
}

#previewCanvas {
    width: 240px;
    height: 576px;
    background-color: #000;
    border: 1px solid #333;
    image-rendering: pixelated;
    display: block;
}

#processCanvas {
    display: none;
}

#centeredIndicator {
    display: inline;
    transition: opacity 0.2s ease;
    margin-left: 8px;
    font-size: 14px;
}
