/* ============================================================
   DUNGEON EVOLUTION — polish.css
   Ajustes finais de polimento visual e UX
   ============================================================ */

/* ── Safe area para dispositivos com notch ── */
body {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Previne seleção de texto em elementos de UI ── */
.btn, .nav-item, .tab-btn, .sheet-tab,
.market-tab, .master-tab, .sess-tab,
.filter-btn, .type-btn, .rarity-btn,
.bottom-nav, .attr-btn {
  user-select: none;
  -webkit-user-select: none;
}

/* ── Feedback de toque no mobile ── */
.btn:active, .nav-item:active,
.card:active, .inv-item-card:active,
.listing-card:active, .history-session-card:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* ── Scroll suave em todas as listas ── */
.xp-table-body,
.inv-content,
.drop-results,
.bazaar-items-section,
.tx-list,
.skills-section {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* ── Input number sem setas no mobile ── */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] { -moz-appearance: textfield; }

/* ── Placeholder nos selects ── */
select option[value=""] { color: var(--text-muted); }

/* ── Focus visível para acessibilidade ── */
:focus-visible {
  outline: 2px solid var(--gold-dim);
  outline-offset: 2px;
}

/* ── Animações de entrada por página ── */
.page > *:first-child { animation: fadeIn 0.3s ease; }

/* ── Cards com borda esquerda colorida ── */
.inv-item-card,
.bazaar-item-card,
.listing-card {
  border-left-style: solid;
}

/* ── Toast melhorado ── */
.toast {
  min-width: 200px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Gold pill reutilizável ── */
.gold-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px;
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--gold-dim);
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.82rem; font-weight: 700;
  color: var(--gold);
}

/* ── Skeleton loading (placeholder visual) ── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-card-hover) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ── Melhorias na barra de navegação ── */
.bottom-nav {
  box-shadow: 0 -1px 0 var(--border-card),
              0 -8px 24px rgba(0,0,0,0.4);
}

/* Indicador ativo na bottom nav */
.nav-item.active {
  position: relative;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px;
  background: var(--gold);
  border-radius: 0 0 2px 2px;
}

/* ── Modal com swipe visual ── */
.modal {
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

/* ── Botões de ação flutuantes ── */
.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  right: var(--space-md);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #8a6520);
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 20px rgba(201,168,76,0.4);
  transition: all var(--transition);
  z-index: 90;
}
.fab:hover { transform: scale(1.08); box-shadow: var(--shadow-gold); }
.fab:active { transform: scale(0.95); }

/* ── Indicador de Power Score com gradiente ── */
.power-score-gradient {
  background: linear-gradient(135deg, var(--gold-bright), var(--life-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Responsividade extra para telas muito pequenas ── */
@media (max-width: 360px) {
  .primary-attrs { grid-template-columns: 1fr 1fr; }
  .class-grid    { grid-template-columns: 1fr; }
  .bottom-nav .nav-item span { display: none; }
  .bottom-nav .nav-item { min-width: 40px; }
}

/* ── Print (exportar ficha) ── */
@media print {
  .bottom-nav, .app-header, .sheet-header,
  .btn, .modal-backdrop { display: none !important; }
  body { background: white; color: black; }
  .page { padding: 0; }
  .attr-card { border: 1px solid #ccc; }
}
