:root {
    --bg: #0b0e14;
    --panel: #111826;
    --text: #e6e6e6;
    --muted: #9aa4b2;
    --accent: #4f46e5;
    --accent-2: #22c55e;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

ul, ol {
    color: var(--muted);
}

.container {
    max-width: 920px;
    margin: 40px auto;
    padding: 0 16px;
}

h1 {
    font-size: 28px;
    margin: 0 0 12px;
}

p {
    color: var(--muted);
    margin-top: 0;
}

form {
    background: var(--panel);
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 16px;
}

.uploader {
    border: 1px dashed #334155;
    border-radius: 10px;
    padding: 12px;
    background: #0d1420;
    cursor: pointer;
}

#dropZone {
    padding: 24px;
    text-align: center;
    color: var(--muted);
}

input[type="file"] {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    position: absolute;
    z-index: -1;
}

.options {
    display: flex;
    gap: 16px;
    align-items: center;
    margin: 12px 0;
}

.options label {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--muted);
}

.options input[type="color"] {
    width: 44px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
}

.preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.preview-item {
    background: #0b1220;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.preview-item img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    background: #0b0e14;
    border-radius: 8px;
    display: block;
    margin: 0 auto 6px;
}

.preview-item small {
    color: var(--muted);
}

button,
.button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.secondary {
    background: #263043;
}

.actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.result {
    margin-top: 18px;
    background: var(--panel);
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 16px;
}

.hidden {
    display: none;
}

pre {
    white-space: pre-wrap;
    background: #0b1220;
    border: 1px solid #1e293b;
    padding: 12px;
    border-radius: 10px;
    overflow: auto;
}

footer {
    color: var(--muted);
    margin-top: 16px;
    text-align: center;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
