diff --git a/client/src/components/ControlPanel.css b/client/src/components/ControlPanel.css index 210a01b..3d19cd5 100644 --- a/client/src/components/ControlPanel.css +++ b/client/src/components/ControlPanel.css @@ -564,49 +564,100 @@ box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); } -/* Inventory List */ -.inventory-list { +/* Inventory Grid */ +.inventory-grid { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 0.5rem; + max-height: 400px; + overflow-y: auto; + padding: 0.5rem; + background: #0f172a; + border-radius: 0.5rem; + border: 1px solid #1e293b; +} + +.inventory-slot { + aspect-ratio: 1; display: flex; flex-direction: column; - gap: 0.5rem; - max-height: 300px; - overflow-y: auto; -} - -.inventory-item { - display: flex; align-items: center; - gap: 0.625rem; - padding: 0.625rem; - background: #1f2937; - border: 1px solid #374151; + justify-content: center; + background: #1e293b; + border: 2px solid #334155; border-radius: 0.375rem; + padding: 0.5rem; transition: all 0.2s; + cursor: pointer; + position: relative; + overflow: hidden; } -.inventory-item:hover { +.inventory-slot.empty { + background: #0f172a; + border-style: dashed; + border-color: #1e293b; +} + +.inventory-slot.filled { + background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); + border-color: #3b82f6; + box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1); +} + +.inventory-slot.filled:hover { border-color: #60a5fa; - background: #1e3a5f; - transform: translateX(4px); + background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%); + box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3); + transform: translateY(-2px); } -.item-icon { - font-size: 1.25rem; - flex-shrink: 0; +.slot-item { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.25rem; } -.item-name { - flex: 1; - color: #e5e7eb; - font-size: 0.8125rem; - text-transform: capitalize; +.slot-item .item-icon { + font-size: 1.5rem; + filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); } -.item-count { - color: #9ca3af; - font-weight: 600; +.slot-item .item-count { + position: absolute; + bottom: 0.25rem; + right: 0.25rem; + background: rgba(0, 0, 0, 0.8); + color: #fff; + font-size: 0.625rem; + font-weight: 700; + padding: 0.125rem 0.375rem; + border-radius: 0.25rem; font-family: 'Courier New', monospace; - font-size: 0.8125rem; + text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); +} + +.slot-name { + position: absolute; + top: 0.25rem; + left: 0.25rem; + right: 0.25rem; + font-size: 0.5rem; + color: #94a3b8; + font-weight: 600; + text-transform: uppercase; + text-align: center; + line-height: 1.1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.slot-number { + font-size: 0.75rem; + color: #475569; + font-weight: 600; } /* Responsive Design */ @@ -618,10 +669,43 @@ .action-grid { grid-template-columns: 1fr; } + + .inventory-grid { + grid-template-columns: repeat(4, 1fr); + } } @media (max-width: 768px) { .turtle-grid { grid-template-columns: 1fr; } + + .panel-content { + flex-direction: column; + } + + .turtle-list { + border-bottom: 1px solid #374151; + border-right: none; + } + + .inventory-grid { + grid-template-columns: repeat(4, 1fr); + } } + +@media (max-width: 480px) { + .inventory-grid { + grid-template-columns: repeat(4, 1fr); + gap: 0.375rem; + } + + .inventory-slot { + padding: 0.375rem; + } + + .slot-item .item-icon { + font-size: 1.25rem; + } +} +