/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02) 28%, transparent 58%),
        rgba(14, 14, 22, 0.58);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow:
        10px 0 36px rgba(0, 0, 0, 0.32),
        inset -1px 0 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    isolation: isolate;
}
.sidebar::after {
    content: '';
    position: absolute;
    top: 0; right: -1px; bottom: 0;
    width: 1px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.18) 20%,
        rgba(129, 140, 248, 0.2) 50%,
        rgba(255, 255, 255, 0.08) 80%,
        transparent 100%
    );
    pointer-events: none;
}

.header {
    padding: 22px 22px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent);
}

.brand-row {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
}

.brand {
    font-size: 1.35rem; font-weight: 800; letter-spacing: -0.025em;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 0 24px rgba(165, 180, 252, 0.25));
}

.counter {
    font-size: 0.72rem; font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    padding: 5px 11px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    letter-spacing: 0.02em;
}

/* Inventory Grid */
.inventory {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: max-content;
    gap: 8px;
    align-content: start;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.inventory::-webkit-scrollbar { width: 6px; }
.inventory::-webkit-scrollbar-track { background: transparent; }
.inventory::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; }
.inventory::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* --- CANVAS AREA --- */
.canvas {
    flex: 1; position: relative; overflow: hidden;
}

/* --- BOTTOM DOCK (liquid glass) --- */
.bottom-bar {
    position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 20;
    background: rgba(18, 18, 28, 0.78);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    padding: 7px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25);
    overflow: hidden;
    isolation: isolate;
}
.bottom-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 45%);
    pointer-events: none;
}

.trash-zone {
    position: absolute; bottom: 28px; right: 30px;
    width: 76px; height: 76px;
    border-radius: 22px;
    border: 1.5px dashed rgba(148, 163, 184, 0.4);
    background: rgba(15, 15, 22, 0.72);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    display: flex; justify-content: center; align-items: center;
    font-size: 1.9rem; color: #64748b;
    transition: transform 0.25s var(--ease-spring), border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
    z-index: 5;
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.trash-zone.active {
    border-style: solid;
    border-color: #ef4444;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.18);
    transform: scale(1.12) rotate(-3deg);
    box-shadow:
        0 12px 32px rgba(239, 68, 68, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 0 0 4px rgba(239, 68, 68, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    .trash-zone, .trash-zone.active { transition: none; transform: none; }
}
