/* Lerio Pixel Art Design System */
:root {
    --brand-red: #E63946;
    --brand-red-hover: #C52A36;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --text-black: #111111;
    --text-hint: #718096;
    --border-color: #E2E8F0;
    --border-brand: #E63946;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar & Header */
.navbar {
    background: var(--bg-white);
    border-bottom: 2px solid var(--border-brand);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-black);
    font-weight: 800;
    font-size: 1.3rem;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background-color: var(--brand-red);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 3px 6px rgba(230, 57, 70, 0.3);
}

.nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-black);
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    background: rgba(230, 57, 70, 0.08);
    color: var(--brand-red);
}

.btn-primary {
    background: var(--text-black);
    color: var(--bg-white);
    border: 2px solid var(--text-black);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-black);
    border: 2px solid var(--border-brand);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: var(--brand-red);
    color: white;
}

/* Layout Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    width: 100%;
    flex: 1;
}

/* Editor Workspace */
.editor-workspace {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 20px;
    align-items: start;
}

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

.card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.card-brand-border {
    border-color: var(--border-brand);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-black);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Canvas Box */
.canvas-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

#pixel-canvas {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border: 2px solid var(--text-black);
    box-shadow: var(--shadow-md);
    cursor: crosshair;
    background-color: #FFFFFF;
}

.hint-text {
    color: var(--text-hint);
    font-size: 0.85rem;
    margin-top: 6px;
}

/* Tools Panel */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.tool-btn {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-black);
    transition: all 0.2s;
}

.tool-btn:hover, .tool-btn.active {
    border-color: var(--brand-red);
    background: rgba(230, 57, 70, 0.08);
    color: var(--brand-red);
}

/* Palette Swatches */
.palette-swatches {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.color-swatch {
    aspect-ratio: 1;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid rgba(0,0,0,0.1);
    transition: transform 0.15s;
}

.color-swatch:hover, .color-swatch.active {
    transform: scale(1.15);
    border-color: var(--text-black);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Artworks & Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.art-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.art-card:hover {
    border-color: var(--brand-red);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.art-preview {
    width: 100%;
    aspect-ratio: 1;
    background: #FAFAFA;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.art-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.art-info {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.art-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-black);
}

.art-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-hint);
    margin-top: 10px;
}

.like-btn {
    background: transparent;
    border: none;
    color: var(--brand-red);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    color: var(--text-hint);
    font-size: 0.88rem;
    margin-top: 40px;
}
