/* ============================================================
   AQW DATABASE — style.css
   Paleta: fundo #0a0a12 | dourado #c8a84b | azul-gelo #7bb3d4
   Fontes: Cinzel (titulos) + Source Sans 3 (corpo)
   Mobile-first
   ============================================================ */

/* --- Reset & base -------------------------------------------*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0a0a12;
  --bg-alt:       #0f0f1c;
  --bg-card:      #141428;
  --bg-card-hover:#1a1a33;
  --border:       #2a2a45;
  --gold:         #c8a84b;
  --gold-dim:     #7a6428;
  --blue:         #7bb3d4;
  --text:         #d4d4e8;
  --text-dim:     #7a7a9a;
  --red:          #c84b4b;
  --green:        #4bc870;

  /* raridades */
  --rare:         #e05c5c;
  --seasonal:     #e0975c;
  --awesome:      #7bb3d4;
  --legend:       #9f6fe0;
  --epic:         #c86be0;
  --weird:        #7ab87a;
  --unknown:      #555577;

  --radius:       6px;
  --radius-lg:    12px;
  --shadow:       0 2px 12px rgba(0,0,0,0.5);
  --transition:   0.18s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100dvh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Typography --------------------------------------------*/
h1, h2, h3, .logo-title {
  font-family: "Cinzel", Georgia, serif;
  line-height: 1.2;
}

.gold { color: var(--gold); }

/* --- Buttons -----------------------------------------------*/
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: var(--radius);
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter var(--transition), opacity var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }

.btn-primary {
  background: linear-gradient(135deg, #b8922e, var(--gold));
  color: #0a0a12;
}
.btn-discord {
  background: #5865f2;
  color: #fff;
}
.btn-whatsapp {
  background: #25d366;
  color: #0a0a12;
}

/* --- Header ------------------------------------------------*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,18,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.logo-block { display: flex; flex-direction: column; line-height: 1.1; }
.logo-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.05em;
}
.logo-accent { color: var(--blue); }
.logo-sub { font-size: 0.7rem; color: var(--text-dim); letter-spacing: 0.08em; }

.header-nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.header-nav a { color: var(--text-dim); font-size: 0.9rem; transition: color var(--transition); }
.header-nav a:hover { color: var(--gold); text-decoration: none; }

/* --- Hero --------------------------------------------------*/
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(200,168,75,0.08) 0%, transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 1.2rem 3rem;
  text-align: center;
}

/* Banner SWF via Ruffle */
.swf-banner-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  overflow: hidden;
  background: #000;
}
.swf-banner-wrap object,
.swf-banner-wrap ruffle-embed {
  display: block;
  width: 100%;
  max-width: 760px;
  height: 137px;
  border: none;
}
.hero-inner { max-width: 680px; margin: 0 auto; }
.hero-title { font-size: clamp(1.8rem, 5vw, 3rem); margin-bottom: 1rem; color: #e8e8f4; }
.hero-sub { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 2rem; }
.hero-stats { margin-top: 2rem; }
.stat-pill {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* --- Sections ----------------------------------------------*/
.section { padding: 3.5rem 1.2rem; }
.section-alt { background: var(--bg-alt); }
.section-inner { max-width: 1100px; margin: 0 auto; }

.section-heading {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.section-desc { color: var(--text-dim); margin-bottom: 1.8rem; }
.section-title {
  font-family: "Cinzel", serif;
  font-size: 1rem;
  color: var(--blue);
  margin: 1.5rem 0 0.8rem;
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.inv-stats {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 400;
}
.highlight-rare { color: var(--rare); font-weight: 600; }

/* --- Lead gate ---------------------------------------------*/
.lead-gate {
  background: var(--bg-card);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 680px;
}
.gate-label { margin-bottom: 1.2rem; color: var(--text); }
.lead-form .form-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.lead-form input {
  flex: 1 1 180px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.55rem 0.9rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}
.lead-form input:focus { border-color: var(--gold); }
.gate-note { margin-top: 1rem; font-size: 0.85rem; color: var(--text-dim); }

/* --- Lookup bar --------------------------------------------*/
.lookup-bar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.lookup-bar input {
  flex: 1 1 220px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.6rem 1rem;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
}
.lookup-bar input:focus { border-color: var(--gold); }
.lookup-note { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 1.5rem; }

/* --- Search bar --------------------------------------------*/
.search-bar { margin-bottom: 1.5rem; }
.search-bar input {
  width: 100%;
  max-width: 560px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.65rem 1rem;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
}
.search-bar input:focus { border-color: var(--gold); }

/* --- Search filters panel ----------------------------------*/
.search-filters { margin-bottom: 1.5rem; }
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 130px;
}
.filter-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.filter-select,
.filter-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.4rem 0.6rem;
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition);
  max-width: 200px;
}
.filter-select:focus,
.filter-input:focus { border-color: var(--gold); }
.filter-select:disabled,
.filter-input:disabled { opacity: 0.45; cursor: not-allowed; }

/* --- Character result block --------------------------------*/
.char-results { margin-top: 1rem; }
.char-header { margin-bottom: 1.2rem; }

/* --- Character viewer SWF (Ruffle) -------------------------*/
.char-viewer-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  background: #f5e6b4;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.char-viewer-slot {
  width: 715px;
  max-width: 100%;
  height: 455px;
}
.char-viewer-slot object,
.char-viewer-slot ruffle-player,
.char-viewer-slot ruffle-object {
  width: 100%;
  height: 100%;
  display: block;
}
.viewer-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-dim);
  font-size: 0.95rem;
  text-align: center;
  padding: 1rem;
}
.viewer-play-btn {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: #1a1008;
  border: none;
  cursor: pointer;
  color: #f5e6b4;
  font-family: inherit;
  transition: background 0.15s;
}
.viewer-play-btn:hover { background: #261810; }
.viewer-play-btn::before {
  content: '\25B6';
  font-size: 2.5rem;
  opacity: 0.85;
  line-height: 1;
}
.viewer-play-btn span {
  font-size: 0.85rem;
  opacity: 0.65;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.viewer-play-btn:hover::before { opacity: 1; }
.viewer-play-btn:hover span    { opacity: 0.9; }

/* --- Outfit Builder ----------------------------------------*/
.outfit-builder { margin-bottom: 1.5rem; }
.outfit-builder-hint {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}
.outfit-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}
.outfit-slot-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.outfit-slot-label {
  width: 56px;
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: right;
}
.outfit-select {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.85rem;
  padding: 0.3rem 0.5rem;
  max-width: 100%;
}
.outfit-preview-btn {
  display: inline-block;
  background: var(--gold);
  color: #1a1408;
  border: none;
  border-radius: 5px;
  padding: 0.45rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.outfit-preview-btn:hover { opacity: 0.85; }
.char-name {
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 0.3rem;
}
.char-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* --- Equipped table ----------------------------------------*/
.equipped-table {
  width: 100%;
  max-width: 640px;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.equipped-table th {
  text-align: left;
  padding: 0.4rem 0.8rem;
  border-bottom: 1px solid var(--border);
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.equipped-table td { padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--border); }
.slot-label { color: var(--text-dim); font-size: 0.85rem; width: 80px; }

/* --- Item cards --------------------------------------------*/
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--unknown);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.item-card:hover { background: var(--bg-card-hover); }
.item-card:focus { outline: 2px solid var(--gold-dim); outline-offset: 2px; }

/* Linha compacta (sempre visivel) */
.card-compact { display: flex; align-items: baseline; gap: 0.5rem; }
.item-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #e8e8f4;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-rarity { font-size: 0.72rem; white-space: nowrap; font-family: "Cinzel", serif; flex-shrink: 0; }
.item-category-badge {
  font-size: 0.68rem;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 0.3em;
}
.item-event-badge {
  font-size: 0.68rem;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 3px;
  padding: 0 0.3em;
  opacity: 0.8;
}
.card-compact .meta-year { font-size: 0.72rem; color: var(--text-dim); flex-shrink: 0; }

/* card-tip: conteúdo para tooltip flutuante (não exibido inline) */
.card-tip { display: none; }
.meta-parent { font-size: 0.78rem; color: var(--text-dim); }
.item-tags { font-size: 0.72rem; color: var(--text-dim); }
.tag-icons { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; margin-top: 2px; }
.tag-icon  { height: 18px; width: auto; display: inline-block; vertical-align: middle; opacity: 0.9; border-radius: 2px; }
.tag-icon:hover { opacity: 1; transform: scale(1.15); transition: transform 0.1s; }
.wiki-link { font-size: 0.78rem; color: var(--blue); align-self: flex-start; }
.wiki-link:hover { color: var(--gold); text-decoration: none; }

/* --- Access type: cor do nome pelo tipo de acesso (lógica wiki) ---*/
/* legend/member required → nome dourado; AC/free/outros → padrão   */
.access-legend .item-title,
.access-member .item-title { color: var(--gold); }

/* --- Floating item tooltip ----------------------------------*/
#item-tooltip {
  position: fixed;
  z-index: 9999;
  background: #1e1e38;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 0.85rem;
  min-width: 150px;
  max-width: 220px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  font-size: 0.82rem;
}
#item-tooltip.visible { opacity: 1; }
.tip-parent { color: var(--text-dim); }
.tip-event  { color: var(--blue); border: 1px solid var(--blue); border-radius: 3px; padding: 0 0.3em; display: inline-block; width: fit-content; font-size: 0.72rem; }
.tip-item-img {
  display: block;
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 0.3rem;
  background: rgba(0,0,0,0.3);
}

/* Cores por raridade */
.rarity-rare          { border-left-color: var(--rare);     }
.rarity-seasonal-rare { border-left-color: var(--rare);     }
.rarity-seasonal      { border-left-color: var(--seasonal); }
.rarity-awesome       { border-left-color: var(--awesome);  }
.rarity-legend        { border-left-color: var(--legend);   }
.rarity-epic          { border-left-color: var(--epic);     }
.rarity-artifact      { border-left-color: var(--gold-dim); }
.rarity-weird         { border-left-color: var(--weird);    }
.rarity-common        { border-left-color: var(--border);   }
.rarity-unknown       { border-left-color: var(--unknown);  }

.rarity-rare          .item-rarity { color: var(--rare);     }
.rarity-seasonal-rare .item-rarity { color: var(--rare);     }
.rarity-seasonal      .item-rarity { color: var(--seasonal); }
.rarity-awesome       .item-rarity { color: var(--awesome);  }
.rarity-legend        .item-rarity { color: var(--legend);   }
.rarity-epic          .item-rarity { color: var(--epic);     }
.rarity-artifact      .item-rarity { color: var(--gold-dim); }
.rarity-weird         .item-rarity { color: var(--weird);    }

/* Inline card (na tabela de equipados) */
.inline-card {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border-left: 3px solid var(--unknown);
  border-radius: var(--radius);
  padding: 0.3rem 0.7rem;
  font-size: 0.9rem;
}
.small { font-size: 0.75rem; }

/* --- Inventory section -------------------------------------*/
.inventory-section { margin-top: 1.5rem; }
.inventory-notice {
  background: var(--bg-card);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  max-width: 560px;
}

.unmatched-block {
  margin-top: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
}
.unmatched-block summary {
  cursor: pointer;
  color: var(--text-dim);
  list-style: none;
}
.unmatched-block summary:hover { color: var(--text); }
.unmatched-wiki-link { color: var(--text-dim); text-decoration: none; }
.unmatched-wiki-link:hover { color: var(--gold); text-decoration: underline; }

/* --- Section divider (inventory → badges) ------------------*/
.section-divider {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2rem 0 1.5rem;
}

/* --- Badges section ----------------------------------------*/
.badges-section { margin-top: 0; }

.badge-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-bottom: .5rem;
}
.badge-filter-bar--rarity { margin-bottom: 1rem; }
.badge-filter-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
  margin-right: .15rem;
}
.badge-filter-btn {
  padding: .25rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: .8rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.badge-filter-btn:hover { background: var(--bg-card); color: var(--text); }
.badge-filter-btn.active { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.badge-filter-btn--rarity.active { background: var(--blue); border-color: var(--blue); color: var(--bg); }
.badge-filter-count { opacity: .7; font-size: .75em; }

.badge-categories-wrap { display: flex; flex-direction: column; gap: 0.8rem; }
.badge-category.hidden { display: none; }
.badge-card.hidden { display: none; }

/* Rarity pills e year dentro do badge-card */
.badge-rarity {
  font-size: .58rem;
  padding: .1rem .3rem;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: .1rem;
}
.badge-rarity-rare        { background: rgba(224,92,92,.18);  color: var(--rare); }
.badge-rarity-seasonal    { background: rgba(224,151,92,.18); color: var(--seasonal); }
.badge-rarity-pseudo-rare { background: rgba(200,120,80,.12); color: #c88060; }
.badge-year {
  font-size: .6rem;
  color: var(--text-dim);
  margin-top: .05rem;
}

.badge-highlight-block { display: flex; flex-direction: column; gap: 0.8rem; }

.badge-category {}
.badge-cat-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin: 0.6rem 0 0.4rem;
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 84px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.3rem;
  cursor: pointer;
  transition: border-color var(--transition);
}
.badge-card:hover { border-color: var(--gold); }
.badge-card img { width: 64px; height: 58px; object-fit: contain; }
.badge-title {
  font-size: 0.62rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
}

.badge-others {
  margin-top: 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
}
.badge-others summary {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.88rem;
  list-style: none;
}
.badge-others summary:hover { color: var(--text); }
.badge-others[open] .badge-highlight-block { margin-top: 0.8rem; }

/* --- Not found / misc states -------------------------------*/
.not-found-list { list-style: none; padding: 0.5rem 0; }
.not-found-list li { color: var(--text-dim); font-size: 0.85rem; padding: 0.15rem 0; }
.not-in-db { color: var(--text-dim); font-size: 0.88rem; }
.no-results { color: var(--text-dim); font-size: 0.9rem; padding: 0.5rem 0; }
.error { color: var(--red); font-size: 0.9rem; padding: 0.5rem 0; }
.loading { color: var(--text-dim); font-size: 0.9rem; padding: 0.5rem 0; }

/* Eval summary */
.eval-summary {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
}
.stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: 0.25rem 0.9rem; }
.stat.found { border-color: var(--green); color: var(--green); }
.stat.missed { border-color: var(--red); color: var(--red); }
.stat.total { color: var(--text-dim); }
.not-found-title { color: var(--red); }

/* --- Community section -------------------------------------*/
.community-block { text-align: center; }
.community-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --- Footer ------------------------------------------------*/
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* --- Manual inventory textarea ----------------------------*/
.manual-inventory { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.eval-textarea {
  width: 100%;
  max-width: 640px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.8rem 1rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
  display: block;
  margin-bottom: 0.8rem;
  transition: border-color var(--transition);
}
.eval-textarea:focus { border-color: var(--gold); }
.eval-results { margin-top: 1rem; }

/* --- Eval tabs (Bank & Buyback Analysis) -------------------*/
.eval-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.eval-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.eval-tab.active,
.eval-tab:hover { border-color: var(--gold); color: var(--gold); }
.eval-tab-hint { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 0.6rem; }
.stat.source { border-color: var(--blue); color: var(--blue); }

/* --- Results controls (sort + print) ----------------------*/
.results-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.view-label { font-size: 0.82rem; color: var(--text-dim); }
.view-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.view-select:focus { border-color: var(--gold); }
.result-group { margin-bottom: 1.2rem; }
.group-header {
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  color: var(--blue);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: capitalize;
}
.group-count {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 400;
}
.btn-print {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.btn-print:hover { border-color: var(--gold); color: var(--gold); }

/* --- Pagination -------------------------------------------*/
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}
.page-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.page-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.page-btn:disabled { opacity: 0.4; cursor: default; }
.page-info { font-size: 0.85rem; color: var(--text-dim); }

/* --- Utility ----------------------------------------------*/
.hidden { display: none !important; }

/* --- Char inventory list (CharPage) -----------------------*/
.equipped-section { margin-bottom: 1.2rem; }

.char-inv-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem 1.2rem;
  margin-top: 0.6rem;
}
.char-inv-parent {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.char-inv-count {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 400;
}
.char-inv-list {
  list-style: none;
  padding: 0;
}
.char-inv-item {
  font-size: 0.82rem;
  line-height: 1.45;
  padding: 0.05rem 0;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.char-inv-item:hover { opacity: 0.75; }
.char-inv-rarity {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-style: italic;
  flex-shrink: 0;
}
.char-inv-year {
  font-size: 0.65rem;
  color: var(--text-dim);
  flex-shrink: 0;
}
.char-inv-variant {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-style: italic;
  flex-shrink: 0;
}

/* --- CharPage layout --------------------------------------*/
/* Replica fiel do layout de account.aq.com/CharPage adaptado ao tema escuro */

/* Card wrapper: header dourado + body — mesma hierarquia do original */
.cp-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}
.cp-card-header {
  background: linear-gradient(135deg, #1e1a08, #2a220a);
  border-bottom: 1px solid var(--gold-dim);
  padding: 0.5rem 1rem;
  text-align: center;
}
.cp-name {
  font-family: "Cinzel", serif;
  font-size: 1.6rem;
  color: var(--gold);
  margin: 0;
  letter-spacing: 0.04em;
}
.cp-section-title {
  font-family: "Cinzel", serif;
  font-size: 1rem;
  color: var(--gold);
  margin: 0;
  cursor: default;
}
.cp-section-count {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 400;
}
.cp-card-body {
  background: var(--bg-alt);
  padding: 0.8rem 1rem;
}

/* Equipados em duas colunas lado a lado, sem cabeçalho de tabela */
.cp-equip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2.5rem;
  max-width: 720px;
}
.cp-equip-col {
  display: flex;
  flex-direction: column;
}
.cp-equip-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.2rem 0;
  font-size: 0.9rem;
}
.cp-equip-label {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  min-width: 0;
}
.cp-equip-value {
  color: var(--text);
  word-break: break-word;
}

/* Achievements: envolto em cp-card — margem gerida pelo próprio cp-card */
.badges-section { margin-bottom: 0; }

.badge-categories-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.badge-category .badge-cat-title {
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
  margin: 0 0 0.5rem;
}
.badge-category .badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.badge-category .badge-card {
  width: 84px;
  padding: 0.25rem 0.3rem 0.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.badge-category .badge-card img { width: 64px; height: 58px; object-fit: contain; }
.badge-category .badge-card[data-rarity="rare"]        { border-color: rgba(224,92,92,.55); }
.badge-category .badge-card[data-rarity="seasonal"]    { border-color: rgba(224,151,92,.55); }
.badge-category .badge-card[data-rarity="pseudo-rare"] { border-color: rgba(200,128,96,.5); }
.badge-category .badge-card .badge-rarity { display: none; }
.badge-category .badge-card:hover .badge-rarity { display: inline-block; }

/* Filtros do inventário */
.inv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.inv-filter-bar {
  display: flex;
  gap: 0.4rem;
}
.inv-filter-btn {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.inv-filter-btn:hover {
  border-color: var(--gold-dim);
  color: var(--text);
}
.inv-filter-btn.active {
  background: rgba(200,168,75,.15);
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* Inventory dentro do cp-card */
.inventory-section .char-inv-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0 1rem;
  align-items: start;
}
.inventory-section .char-inv-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.inventory-section .char-inv-group {
  min-width: 0;
}
.inventory-section .char-inv-parent {
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--blue);
  margin: 0 0 0.3rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.inventory-section .char-inv-count {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.62rem;
  color: var(--text-dim);
  font-weight: 400;
}
.inventory-section .char-inv-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.inventory-section .char-inv-item {
  font-size: 0.82rem;
  line-height: 1.35;
  padding: 0.04rem 0;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: nowrap;
  color: var(--text);
}

/* ===========================================================
   PAYWALL — Bank / Buyback (75% bloqueado)
   =========================================================== */

.paywall-wrapper {
  position: relative;
  overflow: hidden;
  min-height: 120px;
}

.paywall-overlay {
  position: absolute;
  top: 25%;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(10,10,18,0.75) 8%,
    rgba(10,10,18,0.98) 22%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  z-index: 5;
  padding-top: 10%;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 1.5rem;
}

.paywall-lock-icon {
  font-size: 2.25rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(200,168,75,.35));
}

.paywall-msg {
  font-family: "Cinzel", serif;
  font-size: 1rem;
  color: var(--text);
  text-align: center;
  max-width: 300px;
  line-height: 1.4;
}

.paywall-msg small {
  display: block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
  font-style: italic;
}

.paywall-sub {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.82rem;
  color: var(--gold);
  text-align: center;
  opacity: 0.85;
}

.paywall-cta-btn {
  font-family: "Cinzel", serif;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.55rem 1.5rem;
  border-radius: 4px;
  border: 1.5px solid var(--gold);
  background: rgba(200,168,75,0.12);
  color: var(--gold);
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background var(--transition);
}

.paywall-cta-btn:hover {
  background: rgba(200,168,75,0.22);
}

/* ===========================================================
   SHOWCASE — 3 paineis lado a lado
   =========================================================== */

.showcase-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .showcase-panels { grid-template-columns: 1fr; }
}

.sc-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem 1rem;
  min-width: 0;
}

.sc-panel-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: .6rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .4rem;
}

.sc-placeholder {
  color: var(--text-dim);
  font-size: .85rem;
  font-style: italic;
  padding: .5rem 0;
}

.sc-groups { display: flex; flex-direction: column; gap: .25rem; }

/* Source badges (cross-source indicators) */
.sc-source-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  padding: 0 .3em;
  border-radius: 3px;
  line-height: 1.4;
  margin-left: .25em;
  vertical-align: middle;
}
.sc-badge-inventory { background: #3a7bd5; color: #fff; }
.sc-badge-bank      { background: #2e9b6e; color: #fff; }
.sc-badge-buyback   { background: #b85c00; color: #fff; }
.inventory-section .char-inv-item:hover { opacity: 0.78; }
.inventory-section .char-inv-rarity {
  font-size: 0.62rem;
  color: var(--text-dim);
  font-style: italic;
  display: none;
}
.inventory-section .char-inv-item:hover .char-inv-rarity {
  display: inline;
}
.inventory-section .char-inv-year {
  font-size: 0.62rem;
  color: var(--text-dim);
  margin-left: auto;
}

@media (max-width: 900px) {
  .inventory-section .char-inv-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .cp-equip-grid { grid-template-columns: 1fr; gap: 0; }
  .cp-name { font-size: 1.3rem; }
  .inventory-section .char-inv-cols { grid-template-columns: 1fr; }
}

/* --- Responsive -------------------------------------------*/
@media (max-width: 600px) {
  .header-nav { gap: 0.8rem; }
  .card-grid { grid-template-columns: 1fr; }
  .lead-form .form-row { flex-direction: column; }
  .lookup-bar { flex-direction: column; }
  .lookup-bar input { width: 100%; }
}

/* --- Print ------------------------------------------------*/
@media print {
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }

  .site-header, .hero, #lookup .lead-gate, .lookup-bar, .lookup-note,
  .eval-tabs, .eval-tab-hint, .eval-textarea, #eval-btn, #char-btn,
  #char-input, .results-controls, #community, .site-footer,
  .swf-banner-wrap, .char-viewer-wrap, .btn-print,
  .unmatched-block, .char-meta { display: none !important; }

  body { background: #fff; color: #111; }
  .section, .section-alt { background: #fff; padding: 0.5rem 0; }
  .section-heading, .section-title { color: #333; }

  /* Mostrar conteúdo do card-tip inline no papel */
  .card-tip { display: flex !important; flex-direction: column; gap: 0.2rem; margin-top: 0.3rem; }
  .item-card {
    background: #fff;
    border: 1px solid #ccc;
    page-break-inside: avoid;
    break-inside: avoid;
    cursor: default;
  }
  .item-card:focus { outline: none; }
  .item-title { color: #111; }
  .meta-parent, .item-tags { color: #555; }
  .wiki-link { color: #0070c0; }
  .rarity-rare .item-rarity          { color: var(--rare);     }
  .rarity-seasonal-rare .item-rarity { color: var(--rare);     }
  .rarity-seasonal .item-rarity      { color: var(--seasonal); }
  .rarity-legend .item-rarity        { color: var(--legend);   }
  .rarity-epic .item-rarity          { color: var(--epic);     }

  .eval-summary { margin-bottom: 0.5rem; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .result-group { page-break-inside: avoid; break-inside: avoid; }
}
