/* pixelator.css */
:root {
    --bg-main: #0f172a;
    --bg-panel: #1e293b;
    --text-main: #e2e8f0;
    --accent-pink: #ec4899;
    --accent-violet: #8b5cf6;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Editor Grid */
.editor-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex-grow: 1;
    width: 100%;
}

@media (max-width: 768px) {
    .editor-container {
        grid-template-columns: 1fr;
    }
}

/* Controls Panel */
.controls-panel {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
}

.control-group {
    margin-bottom: 25px;
}

.control-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #cbd5e1;
}

.value-display {
    color: var(--accent-pink);
    font-family: 'Fira Code', monospace;
}

/* Sliders */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--accent-pink);
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #334155;
    border-radius: 2px;
}

/* Canvas Area */
.canvas-area {
    background: #020617;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
    min-height: 500px;
}

canvas {
    max-width: 100%;
    max-height: 100%;
    image-rendering: pixelated;
    /* Crucial for blocky effect */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Stats Footer */
.stats-bar {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    display: flex;
    justify-content: space-around;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.stat-value {
    color: var(--accent-violet);
    font-weight: 700;
}

/* Upload Button */
.upload-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #334155;
    color: white;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px dashed #64748b;
}

.upload-btn:hover {
    background: #475569;
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

input[type="file"] {
    display: none;
}