/* === INVENTORY UI — TAB modal with 4 tabs === */

.inv-modal {
  position: fixed;
  inset: 0;
  z-index: 650;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Consolas', 'JetBrains Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.inv-modal.visible { opacity: 1; pointer-events: auto; }
.inv-modal.hidden { display: none; }

.inv-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}

.inv-modal-panel {
  position: relative;
  width: min(720px, 92vw);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  background: rgba(14, 8, 6, 0.96);
  border: 1px solid rgba(255, 160, 60, 0.5);
  border-radius: 14px;
  padding: 20px 24px 16px 24px;
  color: #ffcf8a;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(255, 140, 60, 0.18),
    inset 0 0 30px rgba(255, 120, 40, 0.06);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.2, 1.2, 0.3, 1);
}
.inv-modal.visible .inv-modal-panel { transform: translateY(0) scale(1); }

.inv-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 140, 60, 0.18);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.inv-modal-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffe7b3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 14px rgba(255, 140, 60, 0.25);
}
.inv-modal-close {
  background: transparent;
  border: 1px solid rgba(255, 140, 60, 0.3);
  color: rgba(255, 200, 140, 0.7);
  border-radius: 4px;
  width: 26px; height: 26px;
  font-family: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.inv-modal-close:hover {
  border-color: rgba(255, 140, 60, 0.7);
  color: #ffe7b3;
  background: rgba(255, 140, 60, 0.12);
}

/* Tabs row */
.inv-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.inv-tab {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 200, 140, 0.55);
  background: transparent;
  border: 1px solid rgba(255, 140, 60, 0.18);
  border-radius: 5px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.inv-tab:hover {
  border-color: rgba(255, 140, 60, 0.45);
  color: #ffcf8a;
}
.inv-tab.active {
  background: rgba(255, 140, 60, 0.18);
  border-color: rgba(255, 160, 60, 0.7);
  color: #ffe7b3;
  box-shadow: 0 0 12px rgba(255, 140, 60, 0.25), inset 0 0 8px rgba(255, 140, 60, 0.12);
  text-shadow: 0 0 6px rgba(255, 140, 60, 0.5);
}

/* Body — scrollable */
.inv-tab-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 4px 8px 4px;
  min-height: 240px;
}
.inv-tab-body::-webkit-scrollbar { width: 8px; }
.inv-tab-body::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
.inv-tab-body::-webkit-scrollbar-thumb { background: rgba(255,140,60,0.3); border-radius: 4px; }

.inv-empty {
  color: rgba(255, 200, 140, 0.5);
  font-size: 13px;
  font-style: italic;
  text-align: center;
  padding: 60px 20px;
  line-height: 1.6;
}

.inv-modal-footer {
  margin-top: 12px;
  text-align: center;
  font-size: 10px;
  color: rgba(255, 200, 140, 0.45);
  letter-spacing: 1px;
}
.inv-modal-footer .key {
  display: inline-block;
  background: rgba(255, 140, 60, 0.12);
  border: 1px solid rgba(255, 140, 60, 0.3);
  border-radius: 3px;
  padding: 1px 6px;
  margin: 0 3px;
  color: #ffcf8a;
}

/* ============================================ */
/*  RECURSOS LIST                                 */
/* ============================================ */
.inv-resources {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.inv-res-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(28, 16, 10, 0.7);
  border: 1px solid rgba(255, 140, 60, 0.2);
  border-radius: 8px;
  padding: 12px 18px;
}
.inv-res-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 0 6px rgba(255, 140, 60, 0.35));
}
.inv-res-info { flex: 1; }
.inv-res-name {
  font-size: 14px;
  font-weight: 600;
  color: #ffe7b3;
  margin-bottom: 2px;
}
.inv-res-desc {
  font-size: 11px;
  color: rgba(255, 200, 140, 0.55);
  font-style: italic;
}
.inv-res-count {
  font-size: 22px;
  font-weight: 700;
  color: #ffe0a8;
  text-shadow: 0 0 10px rgba(255, 140, 60, 0.4);
  font-variant-numeric: tabular-nums;
  min-width: 60px;
  text-align: right;
}

/* ============================================ */
/*  GRID OF CARDS (sementes / ovos / criaturas)    */
/* ============================================ */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.inv-card {
  --card-color: #999;
  --card-glow: rgba(255, 255, 255, 0.3);
  background: rgba(28, 16, 10, 0.75);
  border: 1.5px solid var(--card-color);
  border-radius: 10px;
  padding: 14px 10px 10px 10px;
  text-align: center;
  box-shadow: 0 0 14px var(--card-glow), inset 0 0 12px var(--card-glow);
  transition: transform 0.18s ease;
}
.inv-card:hover {
  transform: translateY(-2px);
}
.inv-card-icon {
  height: 54px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 8px var(--card-glow));
}
.inv-card-icon svg { max-width: 100%; max-height: 100%; }
.inv-card-creature {
  align-items: center;
}
.inv-creature-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.inv-card-rarity {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--card-color);
  margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.inv-card-name {
  font-size: 12px;
  color: #ffe7b3;
  margin-bottom: 5px;
  font-weight: 500;
  line-height: 1.2;
}
.inv-card-count {
  font-size: 13px;
  color: #ffd9a0;
  font-weight: 700;
}
