/* ===================================================
   ITENS FINDER — PREMIUM RPG/FANTASY THEME STYLES
   =================================================== */

@font-face {
  font-family: "Tormenta";
  src: url("Tormenta.ttf") format("truetype");
}

/* ===== PALETA E VARIÁVEIS DE TEMA ===== */
:root {
  /* Tema Sangue */
  --bg-main: #0a0404;
  --surface: #120a0a;
  --card-bg: rgba(22, 14, 14, 0.75);
  --border: rgba(204, 13, 13, 0.25);
  --border-solid: #cc0d0d;
  --gold: #cc0d0d;
  --gold-light: #ff2e2e;
  --gold-dim: #8f1313;
  --text-main: #e8e4e4;
  --muted: #a39898;
  --glow: rgba(204, 13, 13, 0.35);
  --accent: #cc0d0d;
  --accent-hover: #ff2e2e;
  --accent-glow: rgba(204, 13, 13, 0.35);
  --radius: 16px;
  --bg-input: #1c0e0e;
  --border-input: rgba(204, 13, 13, 0.35);
  --shadow-main: rgba(0, 0, 0, 0.5);
}

.theme-dark {
  /* Tema Sombras */
  --bg-main: #06070c;
  --surface: #0b0e1a;
  --card-bg: rgba(18, 23, 38, 0.72);
  --border: rgba(201, 147, 58, 0.2);
  --border-solid: #c9933a;
  --gold: #c9933a;
  --gold-light: #e8bc60;
  --gold-dim: #7a5820;
  --text-main: #e2d8c3;
  --muted: #8e7d65;
  --glow: rgba(200, 150, 50, 0.22);
  --accent: #c9933a;
  --accent-hover: #e8bc60;
  --accent-glow: rgba(200, 150, 50, 0.22);
  --radius: 16px;
  --bg-input: #0f1322;
  --border-input: rgba(201, 147, 58, 0.3);
  --shadow-main: rgba(0, 0, 0, 0.5);
}

.theme-classic {
  --bg-body: #f0ece4;
  --bg-main: #f0ece4;
  --surface: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.92);
  --border: #b0b8c8;
  --border-solid: #2c3e50;
  --gold: #2c3e50;
  --gold-light: #34495e;
  --gold-dim: #e74c3c;
  --text-main: #2c3e50;
  --muted: #7f8c8d;
  --glow: rgba(44, 62, 80, 0.15);
  --accent: #e74c3c;
  --accent-hover: #c0392b;
  --accent-glow: rgba(231, 76, 60, 0.2);
  --radius: 16px;
  --bg-input: #ffffff;
  --border-input: #b0b8c8;
  --shadow-main: rgba(44, 62, 80, 0.08);
}

/* ===== CONFIGURAÇÕES GLOBAIS ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(201, 147, 58, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(224, 72, 63, 0.03) 0%, transparent 70%);
}

.theme-light::before {
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(186, 142, 67, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(168, 36, 28, 0.05) 0%, transparent 70%);
}

/* ===== SCROLLBARS ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-solid);
  border-radius: 999px;
  border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

/* ===== CABEÇALHO (estilo padronizado) ===== */
.header {
  position: relative;
  text-align: center;
  padding: 28px 20px 22px;
  border-bottom: 2px solid var(--border-solid);
  background: var(--surface);
  box-shadow: 0 4px 20px var(--shadow-main);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.header-title {
  font-family: "Tormenta", serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: var(--gold);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin: 0;
  line-height: 1.2;
}

.header-btns {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.header-home-btn {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 0.9rem;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.header-home-btn:hover {
  border-color: var(--gold-light);
  box-shadow: 0 0 10px var(--glow);
}

.header-theme-btn {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  color: var(--gold);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.header-theme-btn:hover {
  border-color: var(--gold-light);
  box-shadow: 0 0 12px var(--glow);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .header-title { font-size: 1.1rem; }
  .header-home-btn span { display: none; }
  .header-btns { position: static; transform: none; justify-content: center; margin-top: 10px; }
}

/* ===== CONTAINER E GRID PRINCIPAL ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
  position: relative;
  z-index: 1;
}

.container-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* ===== SEÇÃO DE FILTROS & MOCHILA ===== */
.filters-section,
.inventory-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px var(--shadow-main);
  overflow: hidden;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.filter-group:last-child {
  border-bottom: none;
}

.filter-label,
.filter-label-hint {
  font-family: "Tormenta", serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 8px;
  white-space: nowrap;
}

.filter-label-hint {
  color: var(--accent);
}

/* ===== INPUTS / SELETORES ===== */
.search-bar {
  position: relative;
  width: 100%;
}

.search-icon {
  width: 18px;
  height: 18px;
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  opacity: .7;
  pointer-events: none;
}

.search-input {
  padding-left: 44px !important;
}

.search-input,
.quantity-select,
.quantity-input,
select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-input);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.05rem;
  outline: none;
  transition: all 0.25s ease;
}

.quantity-select,
select {
  cursor: pointer;
  font-family: "Tormenta", serif;
  font-size: 0.85rem;
  padding-right: 30px;
}

.search-input:focus,
.quantity-select:focus,
.quantity-input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--glow);
  background: var(--surface);
}

/* ===== BOTÕES ===== */
.filter-btn,
.view-btn {
  font-family: "Tormenta", serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-btn:hover,
.view-btn:hover {
  background: var(--glow);
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px var(--glow);
}

.filter-btn.active,
.view-btn.active {
  background: var(--gold);
  border-color: var(--gold-light);
  color: var(--bg-main);
  font-weight: 700;
  box-shadow: 0 0 14px var(--glow);
}

#specificFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

#specificFilters .group-btn {
  border-style: dashed;
  background: rgba(201, 147, 58, 0.05);
}

#specificFilters .group-btn:hover {
  background: rgba(201, 147, 58, 0.15);
}

.subfilter-hint {
  font-family: "Tormenta", serif;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  width: 100%;
  margin-bottom: 2px;
}

.view-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ===== GRID DE ITENS ===== */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 20px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px var(--shadow-main);
}

.item-card {
  background: rgba(11, 14, 26, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.theme-light .item-card {
  background: rgba(253, 251, 247, 0.55);
}

.item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--glow);
  border-color: var(--gold);
  background: var(--surface);
}

.item-name {
  font-family: "Cinzel", serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 8px;
  line-height: 1.2;
}

.item-card:hover .item-name {
  color: var(--gold-light);
}

.theme-light .item-card:hover .item-name {
  color: var(--gold-dim);
}

/* ===== ORNAMENT DIVIDER DIAMOND ===== */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
  opacity: 0.5;
}
.ornament::before, .ornament::after {
  content: '';
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.ornament-diamond {
  width: 10px;
  height: 10px;
  background: var(--gold);
  transform: rotate(45deg);
  margin: 0 10px;
}

/* ===== TABELA DE ITENS ===== */
.item-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.1rem;
}

.item-table th {
  background: var(--surface);
  font-family: "Cinzel", serif;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 2px solid var(--gold);
}

.item-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}

.item-table tr:hover {
  background: rgba(201, 147, 58, 0.06);
}

/* ===== INVENTÁRIO / MOCHILA ===== */
.inventory-title {
  font-family: "Cinzel", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--bg-main);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  padding: 14px 18px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  position: relative;
}

.inventory-title::before {
  content: "🎒";
  font-size: 1.3rem;
}

.inventory-list {
  padding: 14px;
  max-height: 400px;
  overflow-y: auto;
}

.inventory-empty {
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  color: var(--muted);
  text-align: center;
  padding: 24px 0;
}

.inventory-table-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.inventory-table thead th {
  background: var(--surface);
  color: var(--gold);
  padding: 10px 12px;
  text-align: left;
  font-family: "Tormenta", serif;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--gold);
}

.inventory-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.05rem;
}

.inventory-table tbody tr:hover {
  background: rgba(201, 147, 58, 0.05);
}

.inventory-table tbody tr:last-child td {
  border-bottom: none;
}

.inv-name {
  font-weight: 700;
}

.inv-muted {
  opacity: .7;
  font-size: 0.85em;
  margin-left: 6px;
}

.inv-num {
  text-align: center;
  white-space: nowrap;
}

.inv-actions {
  text-align: right;
  width: 44px;
}

/* ===== RESUMO DO INVENTÁRIO ===== */
.inventory-summary {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  margin-top: 8px;
}

.theme-light .inventory-summary {
  background: rgba(0, 0, 0, 0.03);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Tormenta", serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.summary-price {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(20, 24, 40, 0.8) 100%);
  border-radius: 50px;
  padding: 10px 16px;
  border: 1px solid var(--border);
}

.theme-light .summary-price {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(245, 239, 224, 0.8) 100%);
}

#totalCost {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-light);
}

.theme-light #totalCost {
  color: var(--gold);
}

#totalSpaces {
  font-weight: 700;
  color: var(--gold-light);
}

.theme-light #totalSpaces {
  color: var(--gold);
}

#totalVestidos {
  font-weight: 700;
  color: #4ade80;
}

.theme-light #totalVestidos {
  color: #16a34a;
}

/* ===== BOTÕES DE EXCLUSÃO / AÇÕES DO INVENTÁRIO ===== */
.remove-item-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.remove-item-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 10px var(--accent-glow);
}

.inventory-top-btn {
  margin: 12px auto 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.inventory-top-btn:hover {
  background: var(--gold-dim);
  color: var(--gold-light);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 0 10px var(--glow);
}

.btn-exportar-ficha {
  background: linear-gradient(135deg, #8b0000 0%, #a52a2a 100%);
  color: #f1e0c6 !important;
  border: 1px solid #5d0000;
  font-family: "Tormenta", serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  width: 100%;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.btn-exportar-ficha:hover {
  background: linear-gradient(135deg, #a52a2a 0%, #bf3636 100%);
  border-color: #f1e0c6;
  box-shadow: 0 0 15px rgba(241, 224, 198, 0.5);
  transform: translateY(-2px);
  color: #ffffff !important;
}

.btn-limpar-estilo {
  background: var(--surface);
  color: var(--muted) !important;
  border: 1px solid var(--border);
  font-family: "Tormenta", serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 10px 15px;
  border-radius: 8px;
  width: 100%;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-limpar-estilo:hover {
  background: #7f1d1d;
  color: #ffffff !important;
  border-color: #b91c1c;
  box-shadow: 0 0 10px rgba(185, 28, 28, 0.4);
}

/* ===== MODAL DE EQUIPAMENTOS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: rgba(6, 7, 12, 0.85);
  backdrop-filter: blur(4px);
  z-index: 9998;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  width: min(650px, calc(100vw - 24px));
  max-height: min(88vh, 850px);
  overflow-y: auto;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-main) 100%);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 20px var(--glow);
  position: relative;
  padding: 24px;
}

.theme-light .modal-content {
  background: linear-gradient(180deg, #faf6ee 0%, #f3ebd8 100%);
  border-color: var(--border-solid);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 0 10px var(--accent-glow);
}

.modal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(11, 14, 26, 0.8);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10005;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.modal-nav-btn:hover {
  background: var(--gold-dim);
  color: var(--gold-light);
  border-color: var(--gold);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 0 12px var(--glow);
}

.modal-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.modal-nav-btn:disabled {
  opacity: 0.15;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(11, 14, 26, 0.3);
}

.modal-nav-btn.modal-nav-prev {
  left: 24px;
}

.modal-nav-btn.modal-nav-next {
  right: 24px;
}

@media (max-width: 820px) {
  .modal-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .modal-nav-btn.modal-nav-prev {
    left: 8px;
  }
  .modal-nav-btn.modal-nav-next {
    right: 8px;
  }
}

.modal-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-right: 36px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.modal-title {
  font-family: "Cinzel", serif;
  color: var(--gold-light);
  font-size: 1.45rem;
  margin: 0;
  font-weight: 700;
}

.theme-light .modal-title {
  color: var(--gold);
}

.modal-price {
  font-weight: 700;
  font-family: "Tormenta", serif;
  color: var(--gold);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 50px;
  white-space: nowrap;
  font-size: 0.9rem;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-image-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.modal-image-container {
  width: 100%;
  min-height: 150px;
  max-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  overflow: hidden;
}

.theme-light .modal-image-container {
  background: rgba(0, 0, 0, 0.04);
}

.modal-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.modal-add-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.15);
  min-width: 160px;
}

.modal-add-item label {
  font-family: "Tormenta", serif;
  font-weight: 700;
  color: var(--gold);
  font-size: 0.8rem;
}

.add-item-btn {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--gold-light);
  background: var(--gold);
  color: var(--bg-main);
  font-family: "Tormenta", serif;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.add-item-btn:hover {
  background: var(--gold-light);
  box-shadow: 0 0 12px var(--glow);
  transform: translateY(-1px);
}

.quantity-input {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-input);
  padding: 0 10px;
  font-weight: 700;
  text-align: center;
  width: 80px;
}

#modalBadges,
.modal-badges {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.modal-section {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 6px;
}

.modal-section h3 {
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--gold);
}

.modal-section p {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--text-main);
  margin: 0;
}

/* ===== STATS DO MODAL ===== */
.modal-stats-container {
  margin-top: 6px;
}

.modal-stats {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.12);
  overflow-x: auto;
}

.stat-box {
  min-width: 105px;
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
}

.stat-label {
  font-family: "Tormenta", serif;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 2px;
}

.stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

/* ===== CUSTOMIZADOR DE ITENS ===== */
#itemCustomizer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.customizer-section {
  padding: 14px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.customizer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.customizer-header label {
  font-family: "Tormenta", serif;
  font-weight: 700;
  color: var(--gold);
  font-size: 0.9rem;
}

.customizer-header .quantity-select {
  width: auto;
  min-width: 160px;
  padding: 8px 12px;
  border-radius: 8px;
}

.customizer-selectors {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.material-selector {
  margin-top: 6px;
  border-color: var(--gold) !important;
}

.curse-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ===================================================
   ASSINATURA / CRÉDITOS (STR-style)
   =================================================== */
.sig-wrap {
  max-width: 1200px;
  margin: 40px auto 48px;
  padding: 0 16px;
}

.sig-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: 0 8px 32px var(--shadow-main);
  overflow: hidden;
}

.sig-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--surface);
  color: var(--gold);
  border-bottom: 2px solid var(--border-solid);
  position: relative;
}

.sig-summary::-webkit-details-marker {
  display: none;
}

.sig-summary-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sig-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 50px;
  background: var(--gold-dim);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 11px;
  font-family: "Tormenta", serif;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.sig-title {
  font-family: "Tormenta", serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.sig-summary-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sig-hint {
  font-size: 12px;
  color: var(--muted);
}

.sig-chevron {
  font-size: 16px;
  transition: transform .2s ease;
  color: var(--gold);
}

.sig-card[open] .sig-chevron {
  transform: rotate(180deg);
}

.sig-body {
  padding: 20px;
  background: rgba(0, 0, 0, 0.15);
}

.sig-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 16px;
}

.sig-h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  font-family: "Tormenta", serif;
  color: var(--gold);
}

.sig-p {
  margin: 0 0 10px;
  color: var(--text-main);
  line-height: 1.5;
  font-size: 1.15rem;
}

.sig-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .sig-grid {
    grid-template-columns: 1fr;
  }
  .sig-hint {
    display: none;
  }
}

.sig-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sig-h4 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: "Tormenta", serif;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .8px;
}

.sig-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-decoration: none;
  background: var(--surface);
  transition: all 0.2s ease;
  margin-bottom: 10px;
  color: var(--text-main);
}

.sig-link:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  background: var(--glow);
  box-shadow: 0 4px 10px var(--glow);
}

.sig-link-name {
  font-weight: 700;
  color: var(--gold);
  font-size: 14px;
}

.sig-link-url {
  color: var(--muted);
  font-size: 12px;
}

.sig-ext {
  color: var(--gold);
  font-size: 14px;
}

.sig-link-primary {
  border-color: var(--gold);
  box-shadow: 0 0 10px var(--glow);
}

.sig-link-primary:hover {
  border-color: var(--gold-light);
  box-shadow: 0 0 15px var(--glow);
}

.sig-note {
  margin-top: 14px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: rgba(0, 0, 0, 0.1);
  padding: 14px;
}

.sig-note-title {
  font-weight: 700;
  font-family: "Tormenta", serif;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.sig-note-text {
  color: var(--text-main);
  font-size: 1.1rem;
  line-height: 1.45;
}

.sig-footer {
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  justify-content: center;
}

.sig-footer-text {
  color: var(--muted);
  font-size: 12px;
}

/* ===================================================
   RANDOMIZADOR — BOTÃO INLINE E MODAL
   =================================================== */
.rand-inline-btn {
  background: var(--surface) !important;
  color: var(--gold) !important;
  border-color: var(--border-solid) !important;
}

.rand-inline-btn:hover {
  background: var(--gold) !important;
  border-color: var(--gold-light) !important;
  color: var(--bg-main) !important;
  box-shadow: 0 0 10px var(--glow) !important;
}

.rand-modal-content {
  max-width: 560px;
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 20px var(--glow);
}

.rand-body {
  padding: 0;
}

.rand-config {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 14px;
}

.rand-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.rand-label {
  font-size: .8rem;
  font-family: "Tormenta", serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gold);
  margin: 0;
}

.rand-mode-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rand-mode-btn {
  flex: 1;
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-main);
  font-weight: 700;
  font-family: "Tormenta", serif;
  font-size: .8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rand-mode-btn.active {
  background: var(--gold);
  color: var(--bg-main);
  border-color: var(--gold-light);
  box-shadow: 0 0 10px var(--glow);
}

.rand-mode-btn:hover:not(.active) {
  background: var(--glow);
  border-color: var(--gold);
}

.rand-row {
  flex-direction: row;
  gap: 12px;
}

.rand-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rand-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-input);
  background: var(--bg-input);
  font-weight: 600;
  font-family: "Tormenta", serif;
}

.rand-generate-btn {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  border-radius: 8px;
}

.rand-result {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 14px;
}

.rand-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.rand-result-label {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gold);
  margin: 0;
}

.rand-reroll-btn {
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 700;
  font-family: "Tormenta", serif;
  font-size: .8rem;
  color: var(--gold);
  transition: all 0.2s ease;
  cursor: pointer;
}

.rand-reroll-btn:hover {
  background: var(--gold);
  color: var(--bg-main);
  transform: scale(1.03);
  box-shadow: 0 0 10px var(--glow);
}

.rand-result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.rand-result-name {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: "Cinzel", serif;
  margin: 0 0 4px;
  color: var(--gold-light);
}

.theme-light .rand-result-name {
  color: var(--gold);
}

.rand-result-price {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: "Cinzel", serif;
  color: var(--gold);
  margin: 0 0 10px;
}

.rand-result-desc {
  font-size: .95rem;
  color: var(--text-main);
  margin: 0;
  line-height: 1.5;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.theme-light .rand-result-desc {
  background: rgba(0, 0, 0, 0.04);
}

.rand-customizations {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.rand-custom-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
}

.rand-custom-group-title {
  font-size: .75rem;
  font-weight: 700;
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gold);
  margin: 0 0 4px;
}

.rand-custom-item {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 2px 0;
}

.rand-custom-item-desc {
  font-size: .85rem;
  color: var(--muted);
  margin: 0;
}

/* ===================================================
   RESPONSIVO (DESKTOP / GAVETA MOBILE)
   =================================================== */
@media (min-width: 1024px) {
  .container-grid {
    grid-template-columns: 3fr 1.15fr;
    align-items: start;
  }

  .inventory-container {
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
  }
}

#closeInventoryBtn {
  display: none;
}

@media (max-width: 1023px) {
  #closeInventoryBtn {
    display: flex;
  }

  #mobileInventoryBtn.float-btn {
    display: flex;
  }

  .inventory-container {
    position: fixed;
    top: 0;
    right: -100%;
    width: 92%;
    max-width: 420px;
    height: 100vh;
    height: 100svh;
    z-index: 2000;
    background: var(--surface);
    border-left: 2px solid var(--border-solid);
    border-radius: 0;
    overflow-y: auto;
    transition: right .25s ease-in-out;
    box-shadow: -10px 0 30px rgba(0, 0, 0, .5);
  }

  .inventory-container.active {
    right: 0;
  }

  .inventory-close-mobile {
    display: flex;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 999;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    background: var(--surface);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }

  .inventory-close-mobile:hover {
    background: var(--accent);
    color: #fff;
  }

  .inventory-list {
    max-height: calc(100vh - 290px);
  }
}

.floating-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  pointer-events: none;
}

#mobileInventoryBtn.float-btn {
  pointer-events: auto;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--bg-main);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px var(--shadow-main);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

#mobileInventoryBtn.float-btn:hover {
  transform: translateY(-2px);
  background: var(--gold-light);
  box-shadow: 0 10px 22px var(--glow);
}

#mobileInvCount.mobile-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--bg-main);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

@media (max-width: 720px) {
  .modal-content {
    width: calc(100vw - 16px);
    max-height: calc(100svh - 40px);
    padding: 16px;
    overflow-y: auto;
  }

  #itemCustomizer {
    gap: 8px;
  }

  .modal-image-row {
    grid-template-columns: 1fr;
  }

  .modal-add-item {
    flex-direction: row;
    align-items: center;
    min-width: auto;
    justify-content: space-between;
  }

  .modal-add-item .quantity-input {
    width: 60px;
  }

  .modal-add-item .add-item-btn {
    flex: 1;
  }

  .modal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .modal-title {
    font-size: 1.25rem;
  }

  .modal-image-container {
    height: 160px;
  }

  .modal-stats {
    flex-wrap: wrap;
  }

  .stat-box {
    min-width: 90px;
  }
}

.theme-classic body {
  background: var(--bg-body) !important;
}

.theme-classic .header {
  background: linear-gradient(185deg, #2c3e50 0%, #1a252f 100%) !important;
  border-bottom: 2px solid #e74c3c !important;
}

.theme-classic .header-title {
  color: #ecf0f1 !important;
  text-shadow: none !important;
}

.theme-classic .header-home-btn {
  color: #ecf0f1 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: rgba(0, 0, 0, 0.2) !important;
}

.theme-classic .header-home-btn:hover {
  border-color: #e74c3c !important;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.3) !important;
}

/* ===== THEME SWITCHER ===== */
.theme-switcher {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px;
  transition: border-color 0.25s ease;
}

.theme-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transition: background 0.25s ease, transform 0.1s;
  opacity: 0.55;
}

.theme-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.15);
}

.theme-btn.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.theme-dark .theme-switcher {
  border-color: rgba(201, 147, 58, 0.3);
}

.theme-classic .theme-switcher {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.2);
}