/* ==========================================================================
   🏰 WEBMUD RPG - ESTILO PERGAMINHO MEDIEVAL HIGH-PREMIUM
   Accessibility Support: aria-label, label, placeholder elements styling.
   ========================================================================== */

/* VARIÁVEIS DO SISTEMA DE DESIGN (HARMONIOSO E TEMÁTICO) */
:root {
  --font-title: 'Cinzel Decorative', 'Metamorphous', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Cores Temáticas */
  --parchment: hsl(38, 48%, 86%);
  --parchment-dark: hsl(38, 28%, 76%);
  --parchment-light: hsl(38, 60%, 94%);
  
  --wood-dark: hsl(20, 39%, 15%);
  --wood-medium: hsl(22, 35%, 23%);
  --wood-light: hsl(24, 30%, 32%);
  
  --gold: hsl(45, 90%, 48%);
  --gold-glow: hsl(45, 100%, 70%);
  --bronze: hsl(35, 45%, 35%);
  --iron: hsl(210, 8%, 18%);
  --iron-light: hsl(210, 6%, 28%);

  /* Cores de Combate & Status */
  --health-red: hsl(354, 70%, 45%);
  --health-glow: hsl(354, 85%, 60%);
  --energy-blue: hsl(207, 75%, 48%);
  --energy-glow: hsl(207, 90%, 65%);
  --xp-emerald: hsl(150, 60%, 45%);
  --xp-emerald-glow: hsl(150, 80%, 65%);
  
  --shadow: rgba(0, 0, 0, 0.4);
}

/* RESET E CONFIGURAÇÕES GERAIS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  background-color: var(--shadow-black, #0e0d0c);
  background-image: radial-gradient(circle, rgba(30, 20, 10, 0.6) 0%, #000 100%);
  font-family: var(--font-body);
  color: #3a2a1a;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  padding: 10px;
  /* Ocultar barra de rolagem mantendo a rolagem ativa */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE e Edge */
}
body::-webkit-scrollbar {
  display: none; /* Chrome, Safari e Opera */
}

/* CONTÊINER PRINCIPAL DO JOGO */
.game-wrapper {
  background: var(--wood-dark);
  border: 8px double var(--bronze);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), inset 0 0 50px rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

/* PAINEL DE CABEÇALHO DO JOGADOR */
.player-header {
  background: linear-gradient(135deg, var(--iron) 0%, var(--wood-dark) 100%);
  border: 3px solid var(--bronze);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 8px var(--shadow);
}

.player-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-icon {
  font-size: 1.8rem;
  background: var(--wood-medium);
  border: 2px solid var(--gold);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px var(--gold-glow);
}

.player-meta h2 {
  font-family: var(--font-title);
  color: var(--gold);
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.player-meta span {
  font-size: 0.75rem;
  color: #ccc;
  font-weight: 600;
}

.player-currency {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.currency-item {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.9);
}

.currency-item strong {
  color: var(--gold);
  font-size: 0.95rem;
}

/* 1. TOPO: MOLDURA E TELA DO MAPA (PIXEL ART FRAME) */
.screen-frame {
  background: var(--wood-medium);
  border: 6px solid var(--wood-light);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.6), inset 0 0 20px #000;
  position: relative;
}

.screen-border {
  border: 3px solid var(--bronze);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.game-screen {
  height: 380px;
  background-size: cover;
  background-position: center;
  position: relative;
  transition: background-image 0.5s ease-in-out;
}

.game-screen.character-view {
  height: 380px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-color: #070504; /* Dark rústico background matching the pixel art style */
}

.game-screen.combat-view {
  height: 380px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  background-color: hsl(20, 35%, 10%); /* Warm dark theme background for monster portraits */
}

.screen-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  padding: 14px 12px;
  text-align: center;
}

#game-view-title {
  font-family: var(--font-title);
  color: var(--gold);
  font-size: 1.25rem;
  letter-spacing: 1px;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 1), 0 0 10px var(--gold-glow);
}

/* 2. CENTRO: PAINEL DE PERGAMINHO */
.parchment-panel {
  background-color: var(--parchment);
  background-image: radial-gradient(var(--parchment-light) 30%, var(--parchment-dark) 100%);
  border: 4px solid var(--bronze);
  border-radius: 8px;
  box-shadow: inset 0 0 40px rgba(78, 55, 30, 0.6), 0 6px 12px var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* BARRAS DE STATUS PROGRESSIVAS */
.status-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-bar-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#monster-hp-value,
#hp-value,
#energy-value,
#xp-value {
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 8px;
}


.bar-outline {
  height: 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7), 0 1px 1px rgba(255,255,255,0.1);
  padding: 2px;
  overflow: hidden;
  border: 1px solid var(--bronze);
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s cubic-bezier(0.1, 0.8, 0.3, 1);
  position: relative;
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.4);
}

/* Preenchimentos específicos */
.red-fill {
  background: linear-gradient(to right, var(--health-red) 0%, var(--health-glow) 100%);
  box-shadow: 0 0 6px var(--health-glow);
}
.blue-fill {
  background: linear-gradient(to right, var(--energy-blue) 0%, var(--energy-glow) 100%);
  box-shadow: 0 0 6px var(--energy-glow);
}
.emerald-fill {
  background: linear-gradient(to right, var(--xp-emerald) 0%, var(--xp-emerald-glow) 100%);
  box-shadow: 0 0 6px var(--xp-emerald-glow);
}

/* DESCRIÇÃO E HISTÓRICO DO MAPA */
.description-section {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #38281a;
  border-bottom: 2px dashed rgba(78, 55, 30, 0.3);
  padding-bottom: 12px;
  font-weight: 600;
  text-align: center;
}

.description-section p {
  white-space: pre-line;
}

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

.map-stat-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(0,0,0,0.06);
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 3px solid var(--bronze);
}

/* PAINEL DE LOGS DE COMBATE / AÇÕES (RPG TEXTO CLÁSSICO) */
.log-panel {
  background: var(--iron);
  border: 3px solid var(--bronze);
  border-radius: 6px;
  box-shadow: inset 0 3px 10px rgba(0,0,0,0.8);
  padding: 8px;
  display: flex;
  flex-direction: column;
}

.log-header {
  font-family: var(--font-title);
  color: var(--gold);
  font-size: 0.75rem;
  border-bottom: 1px solid var(--bronze);
  padding-bottom: 4px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.log-content {
  height: 110px;
  overflow-y: auto;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #eee;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

/* Barra de Rolagem Clássica */
.log-content::-webkit-scrollbar {
  width: 6px;
}
.log-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}
.log-content::-webkit-scrollbar-thumb {
  background: var(--bronze);
  border-radius: 3px;
}

.log-entry {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding-bottom: 4px;
  white-space: pre-line;
}

.system-log { color: #aaa; }
.action-log { color: #fff; }
.win-log { color: #5cb85c; font-weight: bold; }
.fail-log { color: #d9534f; font-weight: bold; }

/* 3. BASE: GRADE DE BOTÕES DINÂMICOS (MATRIZ 2 COLUNAS) */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ESTILO PREMIUM DOS BOTÕES TIPO COURO E BRONZE */
.btn-action {
  background: linear-gradient(to bottom, var(--wood-light) 0%, var(--wood-medium) 100%);
  border: 2px solid var(--bronze);
  box-shadow: 0 4px 6px rgba(0,0,0,0.5), inset 0 1px 3px rgba(255,255,255,0.2);
  border-radius: 6px;
  color: #ffd8a8;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 12px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  text-shadow: 0 2px 2px #000;
}

.btn-action::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 80%);
  opacity: 0;
  transition: opacity 0.2s;
}

/* Efeito de Hover */
.btn-action:hover {
  border-color: var(--gold);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.6), 0 0 6px var(--gold-glow);
}

.btn-action:hover::before {
  opacity: 1;
}

/* Efeito de Clique Realista */
.btn-action:active {
  transform: translateY(2px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

/* Botões especiais desabilitados */
.btn-action:disabled {
  background: var(--iron);
  border-color: var(--iron-light);
  color: #777;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  text-shadow: none;
}
.btn-action:disabled::before {
  display: none;
}

/* ==========================================================================
   🏰 PORTAL DE BOAS-VINDAS E CARDS DE PERSONAGENS (DIAGRAMA PREMIUM AMPLO)
   ========================================================================== */

.welcome-portal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 860px;
  background: var(--wood-dark);
  border: 8px double var(--bronze);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), inset 0 0 50px rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  overflow: hidden;
  margin: 10px auto;
}

/* Castle Header */
.castle-header {
  height: 380px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0e0d0c;
  position: relative;
  display: flex;
  align-items: flex-end;
  border-bottom: 5px solid var(--bronze);
}

.castle-overlay {
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 20px;
  text-align: center;
}

.castle-overlay h1, .castle-overlay h2 {
  font-family: var(--font-title);
  color: var(--gold);
  font-size: 2rem;
  letter-spacing: 2px;
  text-shadow: 0 4px 8px #000, 0 0 15px var(--gold-glow);
  margin-bottom: 6px;
}

.castle-overlay p {
  color: #ddd;
  font-size: 0.9rem;
  font-weight: 600;
  text-shadow: 0 2px 4px #000;
}

/* Corpo do Portal */
.portal-body {
  padding: 24px;
  background-color: var(--wood-dark);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Seleção de Servidores */
.server-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  justify-content: center;
  width: 100%;
  margin-top: 15px;
}

.server-card {
  background-color: var(--parchment-light);
  background-image: linear-gradient(135deg, var(--parchment-light) 0%, var(--parchment) 100%);
  border: 3px solid var(--bronze);
  border-bottom: 7px solid var(--bronze);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), inset 0 0 20px rgba(180, 130, 60, 0.1);
  position: relative;
  overflow: hidden;
}

.server-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  border-bottom: 9px solid var(--gold);
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.25), inset 0 0 25px rgba(212, 175, 55, 0.15);
}

.server-card-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: var(--wood-dark);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.server-card-status {
  padding: 5px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  display: inline-block;
}

.server-card-status.online {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  color: #ffffff;
  border: 1.5px solid #81c784;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.server-card-status.offline {
  background: linear-gradient(135deg, #c62828, #b71c1c);
  color: #ffffff;
  border: 1.5px solid #e57373;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.server-card-rates {
  font-size: 0.88rem;
  font-weight: 600;
  color: #4e3621;
  background: rgba(180, 130, 60, 0.08);
  border: 1px dashed rgba(180, 130, 60, 0.4);
  border-radius: 6px;
  padding: 10px 14px;
  width: 100%;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.server-card-btn {
  background: linear-gradient(135deg, var(--wood-medium), var(--wood-dark));
  color: var(--parchment-light);
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 10px 20px;
  font-family: var(--font-title);
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s ease;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.server-card:hover .server-card-btn {
  background: linear-gradient(135deg, var(--gold), hsl(45, 100%, 35%));
  color: #ffffff;
  border-color: var(--gold-glow);
  box-shadow: 0 0 12px var(--gold-glow);
}

/* Grid de Cards */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  justify-content: center;
  width: 100%;
}

/* Card Estilo RPG Tridimensional */
.hero-card {
  background-color: var(--parchment);
  background-image: radial-gradient(var(--parchment-light) 30%, var(--parchment-dark) 100%);
  border: 3px solid var(--bronze);
  border-bottom: 7px solid var(--bronze);
  border-radius: 10px;
  box-shadow: inset 0 0 30px rgba(78, 55, 30, 0.5), 0 8px 16px rgba(0,0,0,0.6);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: inset 0 0 30px rgba(78, 55, 30, 0.4), 0 14px 28px rgba(0,0,0,0.7), 0 0 12px var(--gold-glow);
}

/* Header do Card */
.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px dashed rgba(78, 55, 30, 0.3);
  padding-bottom: 10px;
}

.hero-card-name {
  font-family: var(--font-title);
  color: var(--wood-dark);
  font-size: 1.25rem;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}

.hero-card-badge {
  background: var(--iron);
  border: 2px solid var(--bronze);
  border-radius: 4px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Corpo do Card */
.hero-card-body {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #38281a;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-card-stats-row {
  display: flex;
  justify-content: space-between;
  background: rgba(0,0,0,0.06);
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 3px solid var(--bronze);
}

.hero-card-stats-row span:last-child {
  font-weight: 700;
  color: #000;
}

/* Ações do Card */
.hero-card-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.hero-card-btn {
  padding: 10px 4px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.btn-unstuck-card {
  background: linear-gradient(to bottom, #4a69bd, #1e3799) !important;
  border-color: #0c2461 !important;
  color: #fff !important;
}

.btn-unstuck-card:hover {
  background: linear-gradient(to bottom, #54a0ff, #2e86de) !important;
}

.hero-card-content {
  display: flex;
  gap: 16px;
  flex-flow: row nowrap;
  align-items: center;
}

.hero-card-preview-frame {
  width: 100px;
  height: 110px;
  border: 3.5px double var(--bronze);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.hero-card-preview-image {
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  transition: transform 0.22s ease-in-out;
}

.hero-card:hover .hero-card-preview-image {
  transform: scale(1.08) translateY(-2px);
}

.hero-card-info-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
  width: calc(100% - 116px);
}

@media (max-width: 480px) {
  .hero-card-content {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  .hero-card-info-side {
    width: 100%;
  }
}

.btn-delete-card {
  background: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
  border-color: #ac2925;
  color: #fff;
}

.btn-delete-card:hover {
  border-color: #c9302c;
  box-shadow: 0 0 10px rgba(217, 83, 79, 0.8);
  color: #fff;
}

/* Botão CTA Massivo */
.btn-create-portal-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

.btn-create-portal {
  background: linear-gradient(to bottom, var(--gold) 0%, var(--bronze) 100%);
  border: 3px solid var(--gold-glow);
  border-bottom: 6px solid var(--bronze);
  color: #fff;
  font-family: var(--font-title);
  font-size: 1.15rem;
  padding: 14px 28px;
  width: auto;
  min-width: 280px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5), 0 0 10px rgba(255, 215, 0, 0.2);
  transition: all 0.15s ease-in-out;
  text-shadow: 0 2px 2px #000;
  animation: pulseScale 2s infinite ease-in-out;
}

.btn-create-portal:hover {
  transform: translateY(-2px);
  border-color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.6), 0 0 18px var(--gold-glow);
}

.btn-create-portal:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

@keyframes pulseScale {
  0% { transform: scale(1); box-shadow: 0 5px 15px rgba(0,0,0,0.5), 0 0 10px rgba(255, 215, 0, 0.2); }
  50% { transform: scale(1.03); box-shadow: 0 8px 20px rgba(0,0,0,0.6), 0 0 20px var(--gold-glow); }
  100% { transform: scale(1); box-shadow: 0 5px 15px rgba(0,0,0,0.5), 0 0 10px rgba(255, 215, 0, 0.2); }
}

/* Caixa de Criação do Wizard */
.creation-box {
  background-color: var(--parchment);
  background-image: radial-gradient(var(--parchment-light) 30%, var(--parchment-dark) 100%);
  border: 4px solid var(--bronze);
  border-bottom: 8px solid var(--bronze);
  border-radius: 10px;
  box-shadow: inset 0 0 40px rgba(78, 55, 30, 0.6), 0 8px 16px rgba(0,0,0,0.5);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.creation-header-box {
  background: var(--iron);
  border: 3px solid var(--bronze);
  border-radius: 6px;
  padding: 12px;
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.8);
}

.creation-header-box h2 {
  font-family: var(--font-title);
  color: var(--gold);
  font-size: 1.3rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px #000;
}

.creation-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #38281a;
  font-weight: 600;
  border-bottom: 2px dashed rgba(78, 55, 30, 0.3);
  padding-bottom: 16px;
  margin-bottom: 6px;
}

.creation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ==========================================================================
   🖼️ TELA ESPECIAL DE ESCOLHA DE RAÇA - DESIGN HIGH-PREMIUM E MINIATURAS
   ========================================================================== */

.race-selection-box {
  max-width: 820px !important;
}

.race-selection-subtitle {
  font-size: 0.95rem;
  color: #5a4531;
  font-weight: 700;
  margin-top: -8px;
  margin-bottom: 8px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.races-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 12px;
  width: 100%;
}

@media (max-width: 768px) {
  .races-container {
    grid-template-columns: 1fr;
  }
}

.race-card {
  background: rgba(0, 0, 0, 0.03);
  border: 2px solid var(--bronze);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease-in-out;
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.race-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15), inset 0 0 15px rgba(212, 175, 55, 0.1);
  background-color: rgba(255, 255, 255, 0.25);
}

.race-card-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  background-size: cover;
  background-position: center;
  border: 3px solid var(--bronze);
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}

.race-card:hover .race-card-image {
  transform: scale(1.02);
  border-color: var(--gold);
}

.race-card-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  flex-grow: 1;
}

.race-card-info h3 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  color: var(--wood-dark);
}

.race-badge {
  background: var(--iron);
  color: var(--gold);
  border: 1.5px solid var(--bronze);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  text-transform: uppercase;
}

.race-card-info p {
  font-size: 0.8rem;
  color: #4a3828;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 6px;
}

.btn-select-race {
  width: 100% !important;
  font-size: 0.8rem !important;
  padding: 8px 12px !important;
}

.creation-footer {
  width: 100%;
  border-top: 2px dashed rgba(78, 55, 30, 0.3);
  padding-top: 14px;
  display: flex;
  justify-content: center;
}

.btn-cancel-creation {
  background: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%) !important;
  border-color: #ac2925 !important;
  color: #fff !important;
  max-width: 200px;
}

.btn-cancel-creation:hover {
  border-color: #c9302c !important;
  box-shadow: 0 0 10px rgba(217, 83, 79, 0.8) !important;
}

/* ==========================================================================
   🖼️ TELA ESPECIAL DE ESCOLHA DE CLASSE - DESIGN HIGH-PREMIUM
   ========================================================================== */

.class-selection-box {
  max-width: 920px !important; /* Acomoda 3 colunas de classes perfeitamente */
}

.class-selection-subtitle {
  font-size: 0.95rem;
  color: #5a4531;
  font-weight: 700;
  margin-top: -8px;
  margin-bottom: 8px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.classes-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 por linha em telas normais */
  gap: 16px;
  margin-bottom: 12px;
  width: 100%;
}

@media (max-width: 768px) {
  .classes-container {
    grid-template-columns: repeat(2, 1fr); /* 2 por linha em tablets */
  }
}

@media (max-width: 480px) {
  .classes-container {
    grid-template-columns: 1fr; /* 1 por linha em celulares */
  }
}

.class-card {
  background: rgba(0, 0, 0, 0.03);
  border: 2px solid var(--bronze);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease-in-out;
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.class-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15), inset 0 0 15px rgba(212, 175, 55, 0.1);
  background-color: rgba(255, 255, 255, 0.25);
}

.class-card-image {
  width: 100%;
  aspect-ratio: 1 / 1; /* Quadrado perfeito para dar espaço e alinhamento magníficos */
  background-size: cover;
  background-position: center top; /* Evidencia o topo detalhado dos cajados sem cortar as gemas */
  border: 3px solid var(--bronze);
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}

.class-card:hover .class-card-image {
  transform: scale(1.02);
  border-color: var(--gold);
}

.class-card-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  flex-grow: 1;
}

.class-card-info h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--wood-dark);
}

.class-badge {
  background: var(--iron);
  color: var(--gold);
  border: 1.5px solid var(--bronze);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  text-transform: uppercase;
}

.class-card-info p {
  font-size: 0.78rem;
  color: #4a3828;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 4px;
}

.btn-select-class {
  width: 100% !important;
  font-size: 0.8rem !important;
  padding: 8px 10px !important;
}

/* ==========================================================================
   🖼️ TELA ESPECIAL DE ESCOLHA DE GÊNERO - DESIGN HIGH-PREMIUM
   ========================================================================== */

.gender-selection-box {
  max-width: 580px !important;
}

.gender-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.race-preview-large-frame {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  border: 4px solid var(--bronze);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), inset 0 0 25px rgba(0,0,0,0.5);
  position: relative;
  transition: all 0.25s ease;
  background-color: rgba(0,0,0,0.15);
}

.race-preview-large-frame:hover {
  border-color: var(--gold);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5), 0 0 15px var(--gold-glow);
}

.race-preview-large-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
}

.race-preview-large-frame:hover .race-preview-large-image {
  transform: scale(1.03);
}

.race-preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  padding: 12px;
  text-align: center;
}

.preview-badge {
  background: var(--wood-dark);
  color: var(--gold);
  border: 2px solid var(--bronze);
  border-radius: 4px;
  font-family: var(--font-title);
  font-size: 0.85rem;
  padding: 4px 10px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.gender-selection-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.gender-subtitle {
  font-size: 0.92rem;
  color: #4a3828;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.gender-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 400px;
}

.btn-gender {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  padding: 12px 16px !important;
}

/* ==========================================================================
   🔑 TELA DE AUTENTICAÇÃO (LOGIN / CADASTRO) - DESIGN HIGH-PREMIUM
   ========================================================================== */

.auth-box {
  max-width: 480px !important;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--iron);
  border: 2px solid var(--bronze);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
  margin-bottom: 8px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: #8a7a6a;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.tab-btn:hover {
  color: #ffd8a8;
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  background: linear-gradient(to bottom, var(--wood-light) 0%, var(--wood-medium) 100%);
  color: var(--gold);
  border-bottom: 3px solid var(--gold);
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.1);
  text-shadow: 0 2px 2px #000, 0 0 5px var(--gold-glow);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  margin-top: 8px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #38281a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-group input {
  background: var(--iron);
  border: 2px solid var(--bronze);
  border-radius: 6px;
  color: #fff;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.5);
  transition: all 0.2s ease-in-out;
}

.input-group input::placeholder {
  color: #555;
  font-style: italic;
}

.input-group input:focus {
  border-color: var(--gold);
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.5), 0 0 8px rgba(255, 215, 0, 0.4);
}

.btn-auth-submit {
  width: 100% !important;
  font-family: var(--font-title);
  font-size: 1.05rem !important;
  padding: 14px 18px !important;
  margin-top: 8px;
}

.auth-message {
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 4px;
  min-height: 20px;
  line-height: 1.4;
  text-align: center;
}

.auth-message.success {
  color: #27ae60;
}

.auth-message.error {
  color: #c0392b;
}

/* Adicionando link / botão de logout na interface */
.logout-btn-container {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 4px;
  margin-top: -8px;
  margin-bottom: 8px;
}

.btn-utility-portal {
  background: var(--iron);
  border: 1.5px solid var(--bronze);
  color: #999;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-utility-portal:hover {
  color: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 6px var(--gold-glow);
}

.wiki-link-container a:hover {
  color: var(--gold) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

/* Garantir renderização nítida sem borrão para pixel art medieval */
#game-view-image,
.race-card-image,
.class-card-image,
.hero-preview-image,
.race-preview-large-image,
.game-screen {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}

/* ==========================================================================
   👑 ESTILO PREMIUM DOS BADGES VIP E COMPARTILHAMENTO DE CONTAS
   ========================================================================== */

.vip-badge-card {
  position: absolute;
  top: -12px;
  right: 15px;
  background: linear-gradient(to bottom, #d4af37 0%, #aa7c11 100%);
  border: 2px solid #ffd700;
  border-radius: 20px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 0 8px rgba(255, 215, 0, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.5px;
  z-index: 10;
  animation: shine-vip 2.5s infinite alternate ease-in-out;
}

.vip-badge-card.inactive {
  background: linear-gradient(to bottom, #777 0%, #444 100%);
  border-color: #999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: none;
}

.hero-card-stats-row.vip-active-row {
  border-left-color: #ffd700;
  background: rgba(255, 215, 0, 0.08);
}

.hero-card-stats-row.vip-active-row span:last-child {
  color: #aa7c11;
  font-weight: 800;
  text-shadow: 0 0 1px rgba(255, 215, 0, 0.2);
}

.hero-card-stats-row.vip-inactive-row {
  border-left-color: #999;
  background: rgba(0, 0, 0, 0.03);
}

.hero-card-stats-row.vip-inactive-row span:last-child {
  color: #666;
}

@keyframes shine-vip {
  0% {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 0 4px rgba(255, 215, 0, 0.4);
    filter: brightness(1);
  }
  100% {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 14px rgba(255, 215, 0, 0.8);
    filter: brightness(1.15);
  }
}

/* ==========================================================================
   🖼️ TELA ESPECIAL DE CONFIRMAÇÃO DE HERÓI - DESIGN HIGH-PREMIUM
   ========================================================================== */

.confirm-character-box {
  max-width: 640px !important;
}

.confirm-character-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

@media (min-width: 500px) {
  .confirm-character-content {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }
}

.hero-confirm-preview-frame {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 4 / 5;
  border: 4px solid var(--bronze);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), inset 0 0 25px rgba(0,0,0,0.5);
  position: relative;
  transition: all 0.25s ease;
  background-color: rgba(0,0,0,0.15);
  flex-shrink: 0;
  margin: 0 auto;
}

.hero-confirm-preview-frame:hover {
  border-color: var(--gold);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5), 0 0 15px var(--gold-glow);
}

.hero-confirm-preview-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
}

.hero-confirm-preview-frame:hover .hero-confirm-preview-image {
  transform: scale(1.03);
}

.confirm-character-details {
  flex-grow: 1;
  width: 100%;
}

.confirm-character-details .creation-description {
  text-align: left !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* ============================================================
   🏆 RANKING PANEL - Premium Medieval Leaderboard
   ============================================================ */

.ranking-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  animation: fadeSlideIn 0.35s ease;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Sub-tab navigation */
.ranking-tabs {
  display: flex;
  gap: 6px;
  background: rgba(0,0,0,0.18);
  border-radius: 8px;
  padding: 4px;
}

.ranking-tab-btn {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--bronze);
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.ranking-tab-btn:hover {
  background: rgba(180, 130, 60, 0.15);
  color: var(--gold);
}

.ranking-tab-btn.active {
  background: linear-gradient(135deg, var(--wood-medium), var(--wood-light));
  color: var(--gold);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,220,100,0.15);
  border: 1px solid rgba(180,130,60,0.4);
}

/* Section container */
.ranking-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Your-position chip */
.rank-your-position {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(180,130,60,0.18), rgba(180,130,60,0.06));
  border: 1px solid rgba(180,130,60,0.35);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--bronze);
}

.rank-your-position strong {
  color: var(--gold);
  font-size: 0.95rem;
}

/* Table wrapper with scroll */
.rank-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(180,130,60,0.25);
  background: rgba(0,0,0,0.12);
}

/* Ranking table */
.rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.rank-table thead tr {
  background: linear-gradient(135deg, var(--wood-medium), var(--wood-dark));
  color: var(--gold);
}

.rank-table th {
  padding: 7px 10px;
  text-align: left;
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(180,130,60,0.3);
}

.rank-table td {
  padding: 6px 10px;
  color: #4a3828;
  border-bottom: 1px solid rgba(180,130,60,0.1);
  transition: background 0.15s;
}

.rank-table tbody tr:hover td {
  background: rgba(180,130,60,0.08);
}

/* Top 3 rows get a golden tint */
.rank-table tr.rank-top td {
  background: linear-gradient(to right, rgba(255,210,60,0.08), transparent);
  font-weight: 600;
}

.rank-table tr.rank-top:first-child td {
  background: linear-gradient(to right, rgba(255,210,60,0.18), transparent);
}

/* Position column */
.rank-table .rank-pos {
  font-size: 1rem;
  text-align: center;
  width: 36px;
}

/* Reward button */
.btn-rank-rewards {
  background: linear-gradient(135deg, hsl(38,65%,30%), hsl(38,50%,22%)) !important;
  border: 2px solid hsl(45,70%,45%) !important;
  color: hsl(45,90%,70%) !important;
  font-size: 0.82rem !important;
  padding: 9px 16px !important;
  transition: all 0.2s ease !important;
  letter-spacing: 0.3px;
  align-self: flex-end;
}

.btn-rank-rewards:hover {
  background: linear-gradient(135deg, hsl(38,70%,36%), hsl(38,55%,28%)) !important;
  box-shadow: 0 0 10px rgba(218,165,32,0.4) !important;
  transform: translateY(-1px) !important;
}

/* Back button */
.btn-rank-back {
  background: linear-gradient(135deg, var(--wood-medium), var(--wood-dark)) !important;
  border: 2px solid var(--bronze) !important;
  color: var(--parchment) !important;
  font-size: 0.8rem !important;
  padding: 8px 14px !important;
  margin-top: 4px;
  opacity: 0.85;
}

.btn-rank-back:hover {
  opacity: 1 !important;
  transform: translateY(-1px) !important;
}

/* Sub-headers for Daily / Weekly sessions */
.rank-sub-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: -2px;
}

.rank-sub-badge {
  font-family: var(--font-title);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 4px;
  border: 1px solid rgba(180, 130, 60, 0.4);
  letter-spacing: 0.8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.daily-badge {
  background: linear-gradient(135deg, rgba(230, 190, 110, 0.95), rgba(180, 130, 60, 0.95));
  color: #fff;
  border-color: rgba(180, 130, 60, 0.6);
}

.weekly-badge {
  background: linear-gradient(135deg, rgba(160, 100, 40, 0.95), rgba(110, 60, 20, 0.95));
  color: #ffe8d0;
  border-color: rgba(110, 60, 20, 0.6);
}

/* Mailbox Interactive Elements */
.unread-letter-row td {
  font-weight: bold;
  background-color: rgba(180, 130, 60, 0.05);
}

.btn-claim-mail {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: bold;
  padding: 4px 8px;
  background: linear-gradient(135deg, #27ae60, #1e8449);
  border: 1px solid #145a32;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: all 0.15s ease;
}

.btn-claim-mail:hover {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  box-shadow: 0 2px 6px rgba(46,204,113,0.3);
  transform: translateY(-1px);
}

.btn-delete-mail {
  font-size: 0.8rem;
  padding: 4px 6px;
  background: linear-gradient(135deg, #c0392b, #962d22);
  border: 1px solid #78241c;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: all 0.15s ease;
}

.btn-delete-mail:hover {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  box-shadow: 0 2px 6px rgba(231,76,60,0.3);
  transform: translateY(-1px);
}

/* ==========================================================================
   📜 PARCHMENT SCROLL OVERLAY MODAL (PROMPT & ALERT SYSTEM)
   ========================================================================== */
.scroll-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: fadeInModal 0.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.parchment-scroll-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 440px;
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.6));
  animation: slideDownModal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

/* Wood Roll Endings */
.scroll-wood {
  width: 96%;
  height: 24px;
  background: linear-gradient(to right, #2c1a0e, #5c3e21 15%, #3d2511 50%, #5c3e21 85%, #2c1a0e);
  border: 2px solid #1a0f08;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.4);
}
.scroll-top {
  margin-bottom: -6px;
  z-index: 2;
}
.scroll-bottom {
  margin-top: -6px;
  z-index: 2;
}

/* Parchment body */
.scroll-body-parchment {
  width: 90%;
  background-color: var(--parchment);
  background-image: radial-gradient(circle, var(--parchment-light) 0%, var(--parchment) 100%);
  border-left: 5px solid #8c6e52;
  border-right: 5px solid #8c6e52;
  box-shadow: inset 0 0 30px rgba(100, 70, 40, 0.35);
  padding: 24px 30px;
  text-align: center;
  color: #3d2511;
  font-family: var(--font-body);
}

.scroll-body-parchment h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  color: #5c2c0e;
  border-bottom: 2px dashed rgba(100, 70, 40, 0.3);
  padding-bottom: 8px;
  margin-bottom: 16px;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.6);
}

.scroll-body-parchment p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 18px;
  font-weight: 500;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.4);
}

.scroll-input-group {
  margin-bottom: 20px;
  width: 100%;
}

.scroll-input-group input {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--parchment-light);
  border: 2px solid #8c6e52;
  border-radius: 4px;
  color: #3d2511;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  outline: none;
  transition: all 0.2s ease;
}

.scroll-input-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5), inset 0 1px 3px rgba(0,0,0,0.1);
}

.scroll-actions-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  width: 100%;
}

.btn-scroll-confirm {
  background: linear-gradient(180deg, #8c6e52 0%, #5c3e21 100%);
  border: 2px solid #3d2511;
  color: #fff;
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: bold;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: all 0.15s ease;
}

.btn-scroll-confirm:hover {
  background: linear-gradient(180deg, #a48263 0%, #6e4c2c 100%);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}

.btn-scroll-cancel {
  background: linear-gradient(180deg, #d9534f 0%, #a93c38 100%);
  border: 2px solid #5c1b19;
  color: #fff;
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: bold;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: all 0.15s ease;
}

.btn-scroll-cancel:hover {
  background: linear-gradient(180deg, #e4605c 0%, #b84440 100%);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDownModal {
  from { transform: translateY(-40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   ✉️ SISTEMA DE CARTAS DO REINO (MAIL SYSTEM)
   ========================================================================== */
.player-level-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.player-mail-btn {
  font-size: 1rem;
  background: none;
  border: none;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  padding: 2px;
  transition: all 0.2s ease-in-out;
  line-height: 1;
  box-shadow: none;
}

.player-mail-btn:hover {
  transform: scale(1.2);
  text-shadow: 0 0 6px var(--gold-glow);
  box-shadow: none;
}

.player-mail-btn:active {
  transform: scale(1);
}

/* Badge de Notificação Vermelho/Dourado Pequeno */
.mail-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--health-red);
  color: #fff;
  border: 1px solid var(--gold);
  border-radius: 50%;
  min-width: 14px;
  height: 14px;
  font-size: 0.55rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Animação de Pulsar quando houver correspondência não lida */
.pulsing-mail {
  animation: pulse-mail 1.5s infinite ease-in-out;
  border-color: transparent !important;
}

@keyframes pulse-mail {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 2px var(--gold-glow));
  }
  50% {
    transform: scale(1.25);
    filter: drop-shadow(0 0 6px var(--gold-glow)) brightness(1.3);
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 2px var(--gold-glow));
  }
}

/* ==========================================================================
   🎮 INVENTÁRIO VISUAL CLÁSSICO ESTILO TIBIA (EQUIPMENT LAYOUT)
   ========================================================================== */

.tibia-inventory-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 10px 0;
  font-family: var(--font-body);
  position: relative;
}

/* Container central de pedra cinza clássico */
.tibia-stone-panel {
  background: linear-gradient(135deg, #3a3a3a 0%, #242424 100%);
  border: 4px ridge #555555;
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7), inset 0 0 12px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 320px;
  width: 100%;
}

.tibia-panel-header {
  font-family: var(--font-title);
  color: #dfc888;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.8);
  border-bottom: 2px solid #555;
  width: 100%;
  text-align: center;
  padding-bottom: 6px;
  font-weight: 800;
}

/* Grid clássico 3 colunas x 4 linhas */
.tibia-grid {
  display: grid;
  grid-template-columns: repeat(3, 62px);
  grid-template-rows: repeat(4, 62px);
  gap: 8px;
  background: #151515;
  padding: 10px;
  border: 3px inset #3a3a3a;
  border-radius: 4px;
  box-shadow: inset 0 0 10px #000;
}

/* Slots individuais */
.tibia-slot {
  width: 62px;
  height: 62px;
  background-color: #2e2e2e;
  border: 2px outset #5a5a5a;
  border-radius: 3px;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

/* Slot Equipado */
.tibia-slot.equipped {
  border: 2px solid #dfc888;
  background: linear-gradient(135deg, #443c2c 0%, #2e281e 100%);
  box-shadow: 0 0 6px rgba(223, 200, 136, 0.4), inset 0 0 8px rgba(0,0,0,0.5);
}

.tibia-slot.equipped:hover {
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  transform: translateY(-2px);
}

/* Slot Vazio / Silhueta */
.tibia-slot-silhouette {
  font-size: 1.8rem;
  opacity: 0.18;
  filter: grayscale(1) brightness(0.6);
  pointer-events: none;
  user-select: none;
}

/* Ícone do Item Equipado */
.tibia-slot-icon {
  font-size: 2rem;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.6));
  animation: item-bounce 2s infinite ease-in-out alternate;
}

/* Slots Trancados / Estéticos */
.tibia-slot.locked {
  background-color: #1a1a1a;
  opacity: 0.35;
  border-color: #333;
  cursor: not-allowed;
}

/* Título de info inferior do item selecionado */
.tibia-info-panel {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #444;
  border-radius: 4px;
  padding: 8px 10px;
  width: 100%;
  min-height: 48px;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #c5b395;
}

/* Grade da Mochila Visual (Estilo Tibia Slots) */
.tibia-backpack-box {
  background: rgba(180, 130, 60, 0.04);
  border: 2px solid rgba(180, 130, 60, 0.25);
  border-radius: 8px;
  padding: 14px;
  width: 100%;
  text-align: left;
}

.tibia-backpack-header {
  font-family: var(--font-title);
  color: #5c2c0e;
  font-size: 1rem;
  border-bottom: 2px dashed rgba(100,70,40,0.2);
  padding-bottom: 6px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tibia-backpack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 10px;
}

/* Slot de Item na Mochila */
.tibia-bp-item-slot {
  aspect-ratio: 1;
  background-color: rgba(220, 200, 170, 0.2);
  border: 2px outset rgba(100, 70, 40, 0.4);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  padding: 4px;
  transition: all 0.15s ease-in-out;
}

.tibia-bp-item-slot:hover {
  background-color: rgba(220, 200, 170, 0.4);
  border-color: #b4823c;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tibia-bp-item-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25));
}

.tibia-bp-item-name {
  font-size: 0.6rem;
  text-align: center;
  font-weight: 800;
  color: #3d2511;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Tooltip customizada flutuante */
.tibia-tooltip-content {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #fff;
  text-align: left;
}

.tibia-tooltip-title {
  font-family: var(--font-title);
  color: #dfc888;
  font-weight: bold;
  border-bottom: 1px dashed rgba(255,255,255,0.2);
  padding-bottom: 3px;
  margin-bottom: 4px;
}

@keyframes item-bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

/* ==========================================================================
   🎒 MEDIEVAL 10x5 GRID INVENTORY & FLOATING BALLOON SYSTEM
   ========================================================================== */

.medieval-inventory-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 10px 0;
  animation: fadeSlideIn 0.35s ease;
}

/* 10x5 stone cell layout */
.inventory-grid-card {
  background: linear-gradient(135deg, #2e2e2e 0%, #151515 100%);
  border: 4px ridge #8c6e52;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.85), inset 0 0 20px #000;
  position: relative;
  max-width: 440px;
  width: 100%;
  user-select: none;
}

.inventory-grid-header {
  font-family: var(--font-title);
  color: #dfc888;
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
  border-bottom: 2px dashed rgba(140, 110, 82, 0.4);
  padding-bottom: 8px;
  margin-bottom: 12px;
  letter-spacing: 0.8px;
}

/* 10x5 CSS Grid with exact pixel-art style */
.inventory-10x5-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 3px;
  aspect-ratio: 2 / 1;
  background: #111;
  border: 3px inset #5c3e21;
  border-radius: 6px;
  padding: 4px;
  position: relative;
}

.inventory-10x8-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 3px;
  aspect-ratio: 10 / 8;
  background: #111;
  border: 3px inset #5c3e21;
  border-radius: 6px;
  padding: 4px;
  position: relative;
}

/* Individual empty cells in the background */
.grid-bg-cell {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(140, 110, 82, 0.12);
  border-radius: 2px;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.8);
}

/* Absolute positioned item blocks */
.grid-item-block {
  position: absolute;
  border: 2px outset #8c6e52;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(140, 110, 82, 0.15) 0%, rgba(78, 62, 46, 0.35) 100%);
  box-shadow: 0 4px 8px rgba(0,0,0,0.6), inset 0 0 8px rgba(255,255,255,0.05);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease-in-out;
  padding: 2px;
  overflow: hidden;
  box-sizing: border-box;
}

.grid-item-block:hover {
  border-color: #dfc888;
  background: linear-gradient(135deg, rgba(223, 200, 136, 0.18) 0%, rgba(140, 110, 82, 0.3) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.8), 0 0 8px rgba(223, 200, 136, 0.35);
  z-index: 5;
}

.grid-item-block.selected {
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.22) 0%, rgba(180, 130, 60, 0.35) 100%);
  box-shadow: 0 0 12px var(--gold-glow), inset 0 0 10px rgba(255, 215, 0, 0.2);
  z-index: 6;
}

/* Item assets scaling */
.grid-item-image {
  max-width: 90%;
  max-height: 90%;
  image-rendering: pixelated;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.grid-item-block:hover .grid-item-image {
  animation: item-bounce 1s infinite alternate ease-in-out;
}

/* Floating Context Balloon/Menu */
.runic-context-balloon {
  position: absolute;
  z-index: 1000;
  width: 200px;
  background: linear-gradient(135deg, #2a1f15 0%, #17110c 100%);
  border: 3px ridge #dfc888;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.9), 0 0 10px rgba(0,0,0,0.8);
  font-family: var(--font-body);
  color: var(--parchment-light);
  display: none;
  animation: scaleUpBalloon 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleUpBalloon {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.balloon-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}
.balloon-arrow-top {
  top: -10px;
  left: 20px;
  border-width: 0 10px 10px 10px;
  border-color: transparent transparent #dfc888 transparent;
}
.balloon-arrow-bottom {
  bottom: -10px;
  left: 20px;
  border-width: 10px 10px 0 10px;
  border-color: #dfc888 transparent transparent transparent;
}

.balloon-title {
  font-family: var(--font-title);
  color: #dfc888;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 4px;
  border-bottom: 1px dashed rgba(223, 200, 136, 0.3);
  padding-bottom: 4px;
  text-shadow: 0 1px 2px #000;
}

.balloon-stats {
  font-size: 0.68rem;
  color: #a4b39c;
  margin-bottom: 8px;
  line-height: 1.3;
}

.balloon-desc {
  font-size: 0.65rem;
  color: #cbb393;
  margin-bottom: 10px;
  font-style: italic;
  line-height: 1.3;
}

.balloon-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-balloon-action {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: bold;
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid #3a2512;
  cursor: pointer;
  text-align: center;
  transition: all 0.1s ease;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-balloon-action.use {
  background: linear-gradient(to bottom, #27ae60 0%, #1e8449 100%);
  border-color: #196f3d;
}
.btn-balloon-action.use:hover {
  background: linear-gradient(to bottom, #2ecc71 0%, #27ae60 100%);
}

.btn-balloon-action.equip {
  background: linear-gradient(to bottom, #2980b9 0%, #21618c 100%);
  border-color: #1b4f72;
}
.btn-balloon-action.equip:hover {
  background: linear-gradient(to bottom, #3498db 0%, #2980b9 100%);
}

.btn-balloon-action.discard {
  background: linear-gradient(to bottom, #c0392b 0%, #962d22 100%);
  border-color: #78241c;
}
.btn-balloon-action.discard:hover {
  background: linear-gradient(to bottom, #e74c3c 0%, #c0392b 100%);
}

.btn-balloon-action.cancel {
  background: linear-gradient(to bottom, #7f8c8d 0%, #616a6b 100%);
  border-color: #4b5151;
}
.btn-balloon-action.cancel:hover {
  background: linear-gradient(to bottom, #95a5a6 0%, #7f8c8d 100%);
}

/* Ação de Transferência Rúnica do Balão */
.btn-balloon-action.transfer {
  font-weight: bold;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: all 0.15s ease-in-out;
}
.btn-balloon-action.transfer:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

/* Mochilas de Viagem Visuais Ativas */
.backpack-3x3-grid {
  grid-template-columns: repeat(3, 50px) !important;
  grid-template-rows: repeat(3, 50px) !important;
  width: 178px !important;
  height: 178px !important;
}

.backpack-4x4-grid {
  grid-template-columns: repeat(4, 50px) !important;
  grid-template-rows: repeat(4, 50px) !important;
  width: 234px !important;
  height: 234px !important;
}

.backpack-5x5-grid {
  grid-template-columns: repeat(5, 50px) !important;
  grid-template-rows: repeat(5, 50px) !important;
  width: 290px !important;
  height: 290px !important;
}

.active-bp-item {
  box-shadow: 0 4px 8px rgba(0,0,0,0.4), inset 0 0 5px rgba(255,255,255,0.05) !important;
}

.active-bp-item img {
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.6));
}

.travel-backpack-card {
  flex: 0 0 auto;
  align-self: flex-start;
}

/* Character Clean Attributes & Tooltips */
.stat-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(100, 70, 40, 0.05);
  border: 1px solid rgba(180, 130, 60, 0.15);
  border-radius: 4px;
  margin-bottom: 8px;
  font-family: var(--font-body);
  position: relative;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.15);
}

.stat-item-label {
  font-weight: bold;
  color: #3d2511;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-item-value-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-item-value {
  font-weight: 800;
  color: #5c2c0e;
  font-size: 0.95rem;
}

.info-icon {
  color: #8c6e52;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(180, 130, 60, 0.08);
  border: 1.5px solid rgba(180, 130, 60, 0.25);
  transition: all 0.15s ease-in-out;
  position: relative;
  user-select: none;
  outline: none;
}

.info-icon:hover, .info-icon:focus {
  background: #b4823c;
  color: #fff;
  border-color: #dfc888;
  box-shadow: 0 0 5px rgba(223, 200, 136, 0.5);
}

.info-tooltip {
  visibility: hidden;
  opacity: 0;
  width: 270px;
  background: linear-gradient(135deg, #2a1f15 0%, #17110c 100%);
  color: #fcecd2;
  text-align: left;
  border: 2px solid #dfc888;
  border-radius: 6px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1000;
  bottom: 125%; /* Position above the icon */
  right: -10px; /* Offset slightly to the right */
  box-shadow: 0 6px 16px rgba(0,0,0,0.8);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  transform: translateY(5px);
  pointer-events: none;
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: normal;
  text-shadow: 0 1px 2px #000;
}

.info-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 14px;
  border-width: 6px;
  border-style: solid;
  border-color: #dfc888 transparent transparent transparent;
}

.info-icon:hover .info-tooltip,
.info-icon:focus .info-tooltip,
.info-icon.active .info-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* =====================================
   ⚒️ ESTILOS IMPERIAIS DO FERREIRO
   ===================================== */
.blacksmith-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 720px;
  border-bottom: 2px solid #8e6f43;
  margin-bottom: 2px;
  user-select: none;
}

.blacksmith-tab-btn {
  background: rgba(42, 31, 21, 0.8);
  border: 2px solid #8e6f43;
  border-bottom: none;
  color: #dfc888;
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  outline: none;
}

.blacksmith-tab-btn:hover {
  background: #3d2d1f;
  color: #fff;
  transform: translateY(-1px);
}

.blacksmith-tab-btn.active {
  background: #8e6f43;
  color: #fff;
  border-color: #8e6f43;
  box-shadow: 0 -2px 5px rgba(223, 200, 136, 0.2);
}

.forge-progress-container {
  width: 100%;
  max-width: 320px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.forge-progress-bar {
  width: 100%;
  height: 16px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #8e6f43;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 5px #000;
}

.forge-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #d35400, #ff5722, #ffeb3b);
  box-shadow: 0 0 8px #ff5722;
  transition: width 0.05s linear;
}

.forge-progress-text {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: bold;
  color: #dfc888;
  text-shadow: 0 1px 3px #000;
  letter-spacing: 0.5px;
}

.materials-summary-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 720px;
  margin: 0 auto 10px auto;
  background: rgba(100, 70, 40, 0.06);
  border: 2px dashed rgba(142, 111, 67, 0.4);
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.1);
}

.material-tag {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: bold;
  color: #3d2511;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(252, 236, 210, 0.65);
  border: 1.5px solid #8e6f43;
  border-radius: 4px;
  padding: 4px 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.blacksmith-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 720px;
  margin: 12px auto 0 auto;
}

.forge-anvil-area {
  width: 100%;
  background: rgba(42, 31, 21, 0.65);
  border: 3px double #dfc888;
  border-radius: 8px;
  padding: 16px;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.8), 0 4px 8px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.forge-anvil-area::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle, rgba(139, 0, 0, 0.15) 0%, transparent 80%);
  pointer-events: none;
}

.anvil-visual {
  width: 90px;
  height: 90px;
  background: url('/images/anvil.png') no-repeat center;
  background-size: contain;
  filter: drop-shadow(0 4px 8px #000);
  margin: 10px 0;
  transition: transform 0.1s ease;
  position: relative;
}

/* Fallback bigorna rústica caso falte imagem */
.anvil-visual.fallback {
  background: none;
  font-size: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.anvil-shake {
  animation: anvil-hit-shake 0.4s ease-in-out;
}

@keyframes anvil-hit-shake {
  0% { transform: scale(1) translateY(0); }
  10% { transform: scale(0.9) translateY(4px); }
  25% { transform: scale(1.05) translateY(-6px) rotate(-2deg); }
  45% { transform: scale(0.98) translateY(2px) rotate(2deg); }
  65% { transform: scale(1.02) translateY(-2px) rotate(-1deg); }
  85% { transform: scale(0.99) translateY(1px); }
  100% { transform: scale(1) translateY(0); }
}

/* Faíscas Rúnicas */
.spark-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ff5722;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 6px #ffeb3b, 0 0 12px #ff5722;
  animation: fly-spark-animation 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  z-index: 10;
}

@keyframes fly-spark-animation {
  0% {
    transform: translate(0, 0) scale(1.5);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0.1);
    opacity: 0;
  }
}

.forge-item-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(223, 200, 136, 0.4);
  border-radius: 6px;
  padding: 12px;
  width: 100%;
  max-width: 320px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.6);
}

.forge-cost-box {
  font-family: var(--font-title);
  color: #dfc888;
  font-size: 0.9rem;
  background: rgba(92, 44, 14, 0.2);
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px dashed rgba(223, 200, 136, 0.3);
  margin-top: 4px;
}

.upgradable-list-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgradable-list-header {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 800;
  color: #5c2c0e;
  border-bottom: 2px solid #8e6f43;
  padding-bottom: 4px;
  text-align: left;
}

.upgradable-cards-grid {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(180, 130, 60, 0.04);
  border: 2px solid #8e6f43;
  border-radius: 6px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

.upgradable-item-card {
  flex: 0 1 200px;
  background: rgba(252, 236, 210, 0.5);
  border: 2px solid #8e6f43;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  user-select: none;
}

.upgradable-item-card:hover {
  background: rgba(252, 236, 210, 0.85);
  border-color: #5c2c0e;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

.upgradable-item-card.selected {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(223, 200, 136, 0.35) 100%);
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4), inset 0 0 8px rgba(255, 215, 0, 0.1);
  transform: translateY(-1px);
}

.upgradable-item-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  flex-grow: 1;
}

.upgradable-item-name {
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: bold;
  color: #3d2511;
  line-height: 1.2;
}

.upgradable-item-loc {
  font-size: 0.65rem;
  font-weight: bold;
  color: #8c6e52;
  text-transform: uppercase;
}

.forge-btn-hammer {
  background: linear-gradient(to bottom, #d35400 0%, #a04000 100%) !important;
  border-color: #872e00 !important;
  color: #fff !important;
  font-size: 0.95rem !important;
  padding: 10px 24px !important;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2) !important;
  transition: all 0.1s ease !important;
}

.forge-btn-hammer:hover:not(:disabled) {
  background: linear-gradient(to bottom, #e67e22 0%, #d35400 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(211, 84, 0, 0.3), 0 4px 6px rgba(0,0,0,0.3) !important;
}

.forge-btn-hammer:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}

.forge-btn-hammer:disabled {
  background: rgba(0,0,0,0.2) !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: #888 !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

/* Blacksmith Mobile Layout Adjustments */
@media (max-width: 480px) {
  .materials-summary-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 6px 10px !important;
  }
  
  .material-tag {
    font-size: 0.72rem !important;
    padding: 4px 6px !important;
    justify-content: center;
  }

  .blacksmith-tabs {
    gap: 4px !important;
  }

  .blacksmith-tab-btn {
    font-size: 0.76rem !important;
    padding: 8px 6px !important;
    flex: 1;
    text-align: center;
    white-space: nowrap;
  }
}/* Stack Badge for Consumables in Grids */
.item-stack-badge {
  position: absolute;
  bottom: 2px;
  right: 4px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #dfc888;
  font-size: 0.72rem;
  font-weight: bold;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid rgba(223, 200, 136, 0.35);
  pointer-events: none;
  font-family: var(--font-body);
  text-shadow: 1px 1px 0px #000;
  z-index: 10;
}

/* ==========================================================================
   📱 OTIMIZAÇÕES MOBILE E ACESSIBILIDADE DE TOQUE (UI/UX)
   ========================================================================== */

/* Suporte a rolagem com momentum suave no Safari (iOS) */
.log-content,
.upgradable-cards-grid,
.characters-grid,
.rank-table-wrapper,
.portal-body,
.scroll-body-parchment {
  -webkit-overflow-scrolling: touch;
}

/* active states para feedback de toque instantâneo e tátil no mobile */
.btn-action:active,
.btn-utility-portal:active,
.tibia-slot.equipped:active,
.tibia-bp-item-slot:active,
.grid-item-block:active,
.upgradable-item-card:active,
.hero-card:active,
.tab-btn:active,
.blacksmith-tab-btn:active {
  transform: scale(0.96) !important;
  transition: transform 0.08s ease-out !important;
}

/* DESATIVAÇÃO DE HOVER PERSISTENTE (STICKY HOVER) EM DISPOSITIVOS TOUCH */
@media (hover: none) {
  .btn-action:hover,
  .btn-utility-portal:hover,
  .hero-card:hover,
  .btn-delete-card:hover,
  .btn-create-portal:hover,
  .race-card:hover,
  .class-card:hover,
  .btn-cancel-creation:hover,
  .race-preview-large-frame:hover,
  .tab-btn:hover,
  .btn-claim-mail:hover,
  .btn-delete-mail:hover,
  .btn-scroll-confirm:hover,
  .btn-scroll-cancel:hover,
  .player-mail-btn:hover,
  .tibia-slot.equipped:hover,
  .tibia-bp-item-slot:hover,
  .grid-item-block:hover,
  .btn-balloon-action:hover,
  .info-icon:hover,
  .blacksmith-tab-btn:hover,
  .upgradable-item-card:hover,
  .forge-btn-hammer:hover {
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
  }
  
  /* Restaura sombras e bordas originais */
  .btn-action:hover {
    border-color: var(--bronze) !important;
    color: #ffd8a8 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5), inset 0 1px 3px rgba(255,255,255,0.2) !important;
  }
  
  .btn-action:hover::before {
    opacity: 0 !important;
  }

  .grid-item-block:hover {
    border-color: #8c6e52 !important;
    background: linear-gradient(135deg, rgba(140, 110, 82, 0.15) 0%, rgba(78, 62, 46, 0.35) 100%) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.6), inset 0 0 8px rgba(255,255,255,0.05) !important;
  }

  .grid-item-block:hover .grid-item-image {
    animation: none !important;
  }

  .tibia-slot.equipped:hover {
    border-color: #dfc888 !important;
    box-shadow: 0 0 6px rgba(223, 200, 136, 0.4), inset 0 0 8px rgba(0,0,0,0.5) !important;
  }

  .tibia-bp-item-slot:hover {
    background-color: rgba(220, 200, 170, 0.2) !important;
    border-color: rgba(100, 70, 40, 0.4) !important;
    box-shadow: none !important;
  }

  .upgradable-item-card:hover {
    background: rgba(252, 236, 210, 0.5) !important;
    border-color: #8e6f43 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
  }

  .hero-card:hover {
    border-color: var(--bronze) !important;
    border-bottom-width: 7px !important;
    box-shadow: inset 0 0 30px rgba(78, 55, 30, 0.5), 0 8px 16px rgba(0,0,0,0.6) !important;
  }
  
  .hero-card:hover .hero-card-preview-image {
    transform: none !important;
  }

  .race-card:hover {
    border-color: var(--bronze) !important;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05) !important;
    background-color: rgba(0, 0, 0, 0.03) !important;
  }
  
  .race-card:hover .race-card-image {
    transform: none !important;
    border-color: var(--bronze) !important;
  }

  .class-card:hover {
    border-color: var(--bronze) !important;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05) !important;
    background-color: rgba(0, 0, 0, 0.03) !important;
  }
  
  .class-card:hover .class-card-image {
    transform: none !important;
    border-color: var(--bronze) !important;
  }

  .race-preview-large-frame:hover {
    border-color: var(--bronze) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), inset 0 0 25px rgba(0,0,0,0.5) !important;
  }
  
  .race-preview-large-frame:hover .race-preview-large-image {
    transform: none !important;
  }

  .tab-btn:hover {
    color: #8a7a6a !important;
    background: transparent !important;
  }

  .btn-utility-portal:hover {
    color: #999 !important;
    border-color: var(--bronze) !important;
    box-shadow: none !important;
  }
}

/* REGRAS INTERMEDIÁRIAS PARA DISPOSITIVOS MÓVEIS (TELA < 600PX) */
@media (max-width: 600px) {
  body {
    padding: 6px !important;
  }
  .game-wrapper {
    border: 4px double var(--bronze) !important;
    padding: 10px !important;
    gap: 12px !important;
  }
}

/* REGRAS EXCLUSIVAS PARA DISPOSITIVOS MÓVEIS (TELA < 480PX) */
@media (max-width: 480px) {
  
  /* Reset Geral de Margens e Padding do Body */
  body {
    padding: 0 !important;
    align-items: flex-start !important;
    min-height: 100dvh !important;
  }

  /* Interface de Jogo Full-Bleed (Tela Cheia) */
  .game-wrapper,
  .welcome-portal {
    border: none !important;
    border-radius: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    box-shadow: none !important;
    padding: 10px !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  /* Evita zoom automático no Safari do iOS */
  .input-group input {
    font-size: 16px !important;
  }

  /* Ampliação da área de toque de botões e abas (Fitts' Law) */
  .btn-action,
  .tab-btn,
  .blacksmith-tab-btn,
  .btn-utility-portal {
    min-height: 48px !important;
    padding: 12px 10px !important;
  }

  .hero-card-actions {
    gap: 8px !important;
  }

  .hero-card-btn {
    min-height: 44px !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Ajuste no Grid de Personagens */
  .characters-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 12px !important;
    padding: 2px !important;
  }

  /* Ajuste no Modal de Pergaminho para telas pequenas */
  .parchment-scroll-container {
    max-width: 96% !important;
  }
  
  .scroll-body-parchment {
    width: 98% !important;
    padding: 16px 20px !important;
  }
  
  .scroll-wood {
    width: 100% !important;
  }

  /* Conversão do Balão de Contexto Rúnico em Gaveta Inferior (Bottom Sheet) */
  .runic-context-balloon {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    border: none !important;
    border-top: 4px ridge #dfc888 !important;
    transform: translateY(0) !important;
    animation: slideUpBottomsheet 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.9) !important;
    padding: 18px 24px max(24px, calc(10px + env(safe-area-inset-bottom))) 24px !important;
    background: linear-gradient(135deg, #2a1f15 0%, #17110c 100%) !important;
    box-sizing: border-box !important;
  }

  /* Esconde seta direcional do balão no mobile */
  .balloon-arrow {
    display: none !important;
  }
  
  /* Layout do texto dentro do Bottom Sheet */
  .balloon-title {
    font-size: 1.05rem !important;
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
  }
  .balloon-stats {
    font-size: 0.82rem !important;
    margin-bottom: 8px !important;
  }
  .balloon-desc {
    font-size: 0.76rem !important;
    margin-bottom: 14px !important;
  }
  .balloon-actions {
    gap: 8px !important;
    display: grid !important;
    grid-template-columns: 1fr !important; /* Coluna única para facilitar cliques */
  }
  
  .btn-balloon-action {
    min-height: 46px !important;
    font-size: 0.88rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Ajustes no Ferreiro Mobile */
  .blacksmith-tab-btn {
    font-size: 0.72rem !important;
    padding: 8px 4px !important;
  }

  /* Ajuste no layout das mochilas de viagem no Dual Grid e Equipamentos */
  .medieval-inventory-container > div,
  .tibia-inventory-wrapper > div {
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
  }
}

@keyframes slideUpBottomsheet {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ============================================================
   🏟️ ARENA SYSTEM STYLES - Premium JRPG Medieval Scroll
   ============================================================ */

.arena-lobby-wrapper,
.arena-rankings-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  animation: fadeSlideIn 0.35s ease;
}

/* Player Gladiator card */
.arena-player-card {
  display: flex;
  background: rgba(100, 70, 40, 0.08);
  border: 2px dashed rgba(180, 130, 60, 0.35);
  border-radius: 4px;
  padding: 16px;
  align-items: center;
  gap: 16px;
}

.arena-player-badge-frame {
  width: 72px;
  height: 72px;
  background: radial-gradient(circle, #fcf8ee 0%, #e8dcb9 100%);
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 6px rgba(100,70,40,0.3), 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.arena-player-badge-img {
  width: 60px;
  height: 60px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  object-fit: contain;
}

.arena-player-status-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.arena-status-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--wood-dark);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.arena-status-desc {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #4a3828;
}

/* Styled labels/tags for the Gladiator card */
.arena-status-welcome {
  font-size: 0.82rem;
  color: #554433;
  margin-bottom: 8px;
  line-height: 1.35;
}

.arena-status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.arena-tag {
  display: flex;
  flex-direction: column;
  background: rgba(100, 70, 40, 0.08);
  border: 1px solid rgba(100, 70, 40, 0.25);
  border-radius: 2px;
  padding: 4px 10px;
  min-width: 90px;
  text-align: center;
}

.arena-tag .tag-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #776655;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.arena-tag .tag-value {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--wood-dark);
  margin-top: 1px;
}

/* Specific colors for tags */
.arena-tag.rank-tag {
  background: rgba(180, 130, 60, 0.1);
  border-color: rgba(180, 130, 60, 0.35);
}
.arena-tag.rank-tag .tag-value {
  color: #8c5e26;
}

.arena-tag.points-tag {
  background: rgba(46, 125, 50, 0.08);
  border-color: rgba(46, 125, 50, 0.25);
}
.arena-tag.points-tag .tag-value {
  color: #2e7d32;
}

.arena-status-notice {
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 2px;
  border-left: 3px solid;
  width: 100%;
}

.arena-status-notice.notice-success {
  background: #f1f9ec;
  border-color: #4caf50;
  color: #2e7d32;
}

.arena-status-notice.notice-warning {
  background: #fdf5e6;
  border-color: #ff9800;
  color: #a05a00;
}

/* Opponents Section */
.arena-opponents-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.arena-section-header {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
  color: #5c2c0e;
  border-bottom: 2px solid var(--wood-medium);
  padding-bottom: 6px;
  letter-spacing: 1px;
}

.arena-opponents-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Opponent Card */
.arena-opp-card {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.55);
  border: 2px solid rgba(100, 70, 40, 0.2);
  border-radius: 4px;
  padding: 12px 14px;
  gap: 14px;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.arena-opp-card:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.arena-opp-avatar-container {
  width: 54px;
  height: 54px;
  background: radial-gradient(circle, #fcf8ee 0%, #e8dcb9 100%);
  border: 2px solid var(--wood-light);
  border-radius: 2px;
  box-shadow: inset 0 0 6px rgba(100,70,40,0.3), 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.arena-opp-avatar-img {
  width: 46px;
  height: 46px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  object-fit: contain;
}

.arena-opp-info-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.arena-opp-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.arena-opp-name {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--wood-dark);
}

.arena-opp-lvl {
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(180, 130, 60, 0.15);
  color: #5c2c0e;
  padding: 1px 6px;
  border-radius: 2px;
}

.arena-opp-sub {
  font-size: 0.78rem;
  color: #555;
}

.arena-opp-rank {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.arena-opp-badge-mini {
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
  object-fit: contain;
}

.arena-opp-points-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #8c5e26;
}

.arena-opp-action-container {
  flex-shrink: 0;
}

.btn-arena-challenge {
  padding: 8px 16px !important;
  font-size: 0.82rem !important;
  background: linear-gradient(135deg, #b13c2e, #7a1d13) !important;
  border-color: #591008 !important;
  color: #fff !important;
}

.btn-arena-challenge:hover {
  background: linear-gradient(135deg, #cc4e3f, #94291d) !important;
  transform: scale(1.03);
}

.arena-cost-text {
  font-size: 0.7rem;
  opacity: 0.9;
  display: block;
  font-weight: normal;
  margin-top: 1px;
}

.arena-cost-text.cost-free {
  color: #d4ffb8;
}

.arena-cost-text.cost-energy {
  color: #ffcccc;
}

.arena-bottom-buttons {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* Tiers Rankings Area */
.arena-tiers-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.arena-tier-card {
  display: flex;
  border: 2px solid rgba(100, 70, 40, 0.25);
  background: rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  overflow: hidden;
}

.arena-tier-badge-container {
  width: 100px;
  background: radial-gradient(circle, #fcf8ee 0%, #e4d8b0 100%);
  border-right: 2px solid rgba(100, 70, 40, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  gap: 8px;
  text-align: center;
  flex-shrink: 0;
}

.arena-tier-badge-img {
  width: 50px;
  height: 50px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  object-fit: contain;
}

.arena-tier-name {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 800;
  color: #5c2c0e;
  line-height: 1.2;
}

.arena-tier-players-list {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.2);
}

.arena-rank-row {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  border-bottom: 1px dashed rgba(100, 70, 40, 0.12);
  padding-bottom: 4px;
  gap: 8px;
}

.arena-rank-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.arena-rank-num {
  font-weight: 800;
  color: #b4823c;
  width: 26px;
  flex-shrink: 0;
}

.arena-rank-name {
  flex: 1;
  color: var(--wood-dark);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arena-rank-points {
  font-weight: 800;
  color: #8c5e26;
  flex-shrink: 0;
}

.arena-rank-empty {
  font-size: 0.75rem;
  color: #777;
  font-style: italic;
  text-align: center;
}

/* Responsive fixes for mobile */
@media (max-width: 480px) {
  .arena-player-card {
    flex-direction: column;
    text-align: center;
    padding: 12px;
  }
  
  .arena-tier-card {
    flex-direction: column;
  }
  
  .arena-tier-badge-container {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    border-right: none;
    border-bottom: 2px solid rgba(100, 70, 40, 0.2);
    padding: 8px 12px;
  }
  
  .arena-tier-badge-img {
    width: 32px;
    height: 32px;
  }
  
  .arena-tier-name {
    font-size: 0.85rem;
  }
  
  .arena-opp-card {
    flex-direction: column;
    text-align: center;
  }
  
  .arena-opp-action-container {
    width: 100%;
  }
  
  .btn-arena-challenge {
    width: 100%;
  }
}

/* ==========================================================================
   💥 COMBAT STATUS EFFECTS & CARD-GAME STYLE AESTHETICS
   ========================================================================== */

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(0px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(2px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(2px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake-impact {
  animation: shake 0.35s ease-in-out !important;
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.7);
  }
  15% {
    opacity: 1;
    transform: translateY(-25px) scale(1.1);
  }
  80% {
    opacity: 1;
    transform: translateY(-60px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-85px) scale(0.9);
  }
}

.float-number {
  position: absolute;
  left: 50%;
  top: 40%;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.8rem;
  text-shadow: 2px 2px 0px #000, -2px -2px 0px #000, 2px -2px 0px #000, -2px 2px 0px #000, 0px 4px 8px rgba(0,0,0,0.8);
  pointer-events: none;
  animation: floatUp 1.3s forwards ease-out;
  z-index: 999;
}

.float-number.dmg-physical { color: #f1c40f; }
.float-number.dmg-magic { color: #9b59b6; }
.float-number.dmg-burn { color: #e74c3c; }
.float-number.dmg-poison { color: #2ecc71; }
.float-number.dmg-bleed { color: #c0392b; }
.float-number.dmg-heal { color: #2ecc71; }
.float-number.dmg-stun { color: #3498db; }

/* Status Badges Overlay */
.combat-status-container {
  position: absolute;
  top: 12px;
  display: flex;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
}

.combat-status-container.monster-status {
  left: 12px;
}

.combat-status-container.player-status {
  right: 12px;
}

.status-badge {
  background: rgba(15, 10, 5, 0.85);
  border: 2px solid var(--gold);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
  animation: pulseBadge 1.5s infinite alternate ease-in-out;
}

.status-badge .badge-turns {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--gold);
  color: #000;
  border: 1px solid #000;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  font-size: 0.65rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes pulseBadge {
  0% { transform: scale(1); box-shadow: 0 0 6px rgba(212, 175, 55, 0.2); }
  100% { transform: scale(1.08); box-shadow: 0 0 12px rgba(212, 175, 55, 0.7); }
}

/* ==========================================================================
   🎮 HUD DE BATALHA JRPG CLASSICO (OPÇÃO 3)
   ========================================================================== */

/* Remove headers e margens extras para caber na tela do celular sem rolagem */
.game-wrapper.combat-active-layout {
  min-height: 840px; /* Garante a altura mínima do X7 Pro para não espremer os elementos */
  padding: 10px;
  gap: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Esconder o player header em combate para salvar muito espaço vertical */
.combat-active-layout .player-header {
  display: none;
}

/* Reduzir o tamanho da imagem do monstro (Moldura) */
.combat-active-layout .screen-frame {
  flex: 0 0 auto;
  margin: 0;
  border-width: 4px;
}
.combat-active-layout .game-screen.combat-view {
  height: auto;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center center;
}

/* Ajustar a vida do inimigo para ficar grudada no monstro */
.combat-active-layout #monster-hp-container {
  margin: 0;
  padding: 4px 0 !important;
  border: none !important;
  order: 2; /* Fica abaixo do monstro */
}

/* Pergaminho de status e ações */
.combat-active-layout .parchment-panel {
  flex: 1 0 auto; /* Permite crescer mas impede o encolhimento */
  padding: 10px;
  gap: 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background-image: radial-gradient(var(--parchment-light) 60%, var(--parchment-dark) 100%);
  border-width: 3px;
}

/* Ajustar descrição/status do inimigo */
.combat-active-layout .description-section {
  display: none; /* Esconde a descrição de texto longa do monstro, focando nas barras! */
}

/* Forçar a ordem de exibição JRPG: Inimigo HP -> Log do Combate -> Status do Player */
.combat-active-layout #monster-hp-container {
  order: 1;
}
.combat-active-layout .log-panel {
  order: 2;
}
.combat-active-layout .status-section {
  order: 3;
}

/* Barras de Status do Jogador: colocar HP e Energia LADO A LADO */
.combat-active-layout .status-section {
  display: flex;
  flex-direction: row;
  gap: 10px;
  width: 100%;
}
.combat-active-layout .status-section .status-bar-container {
  flex: 1;
}
/* Ocultar barra de Energia do jogador durante o combate */
.combat-active-layout .status-section .status-bar-container:nth-child(2) {
  display: none;
}
/* Ocultar barra de XP do jogador durante o combate */
.combat-active-layout .status-section .status-bar-container:nth-child(3) {
  display: none;
}

/* Deixar o log de combate expandir para ocupar o pergaminho */
.combat-active-layout .log-panel {
  flex: 1;
  min-height: 90px;
  margin: 0;
}
.combat-active-layout .log-content {
  height: 120px;
  overflow-y: auto !important;
  font-size: 0.75rem;
}

/* Botões de Ação na base */
.combat-active-layout .action-grid {
  gap: 4px;
  flex: 0 0 auto; /* Impede o encolhimento dos botões de ação */
}
.combat-active-layout .btn-action {
  padding: 6px 4px;
  font-size: 0.78rem;
}

/* Ajuste responsivo exclusivo para telas de Desktop */
@media (min-width: 601px) {
  .game-wrapper.combat-active-layout {
    min-height: 840px;
    height: auto;
  }

  .combat-active-layout .screen-frame {
    max-width: 340px;
    margin: 0 auto;
    width: 100%;
  }
}

/* ==========================================================================
   🤖 AUTO PLAY FLOATING BUTTON & SETTINGS MODAL STYLING
   ========================================================================== */

.btn-autoplay-float {
  position: absolute;
  top: 96px;
  right: 24px;
  z-index: 99;
  background: linear-gradient(135deg, var(--parchment-light) 0%, var(--parchment) 100%);
  border: 2px solid var(--bronze);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 0 5px rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  color: var(--wood-dark);
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  outline: none;
}

.btn-autoplay-float:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5), 0 0 8px var(--gold-glow);
  border-color: var(--gold);
}

.btn-autoplay-float:active {
  transform: scale(0.95);
}

.autoplay-settings-row {
  margin: 14px 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.autoplay-switch-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--wood-dark);
  cursor: pointer;
  font-weight: 600;
}

.autoplay-switch-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--gold);
}

.autoplay-settings-row.slider-row {
  background: rgba(180, 130, 60, 0.08);
  border: 1px solid rgba(180, 130, 60, 0.25);
  border-radius: 6px;
  padding: 10px;
  margin-top: 14px;
}

.autoplay-settings-row.slider-row label {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--wood-dark);
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.autoplay-settings-row.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
  height: 6px;
  border-radius: 3px;
  background: var(--parchment-dark);
  outline: none;
}

/* ESTILOS ADICIONAIS PARA O MODAL "MINHA CONTA" */
.account-sec {
  padding: 10px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  border: 1px dashed rgba(78, 55, 30, 0.25);
  font-size: 0.9rem;
  color: #3a2a1a;
  font-weight: 600;
  text-align: left;
}

.account-sec p {
  line-height: 1.5;
}

#sel-account-player:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 6px var(--gold-glow);
}

/* Garante que o modal de Confirmação/Alerta fique sempre no topo de outros overlays */
.scroll-modal-overlay {
  z-index: 10000;
}
#parchment-modal-overlay {
  z-index: 10010 !important;
}

/* ==========================================================================
   🗺️ REDESIGNED MAPS GRID & CARDS (TEMPLO DOS MAPAS)
   ========================================================================== */
.maps-grid-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.maps-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px dashed rgba(78, 55, 30, 0.3);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.maps-header-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  color: #5c2c0e;
  font-weight: 800;
}

.btn-maps-back {
  background: linear-gradient(to bottom, #8a5a36, #5c3b21);
  border: 2px solid #3d2511;
  color: #fdf6e2;
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-maps-back:hover {
  background: linear-gradient(to bottom, #a06b43, #734c2c);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.maps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 12px;
  width: 100%;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}

/* Scrollbar rústica */
.maps-grid::-webkit-scrollbar {
  width: 6px;
}
.maps-grid::-webkit-scrollbar-track {
  background: rgba(78, 55, 30, 0.1);
  border-radius: 3px;
}
.maps-grid::-webkit-scrollbar-thumb {
  background: #5c3b21;
  border-radius: 3px;
}

.map-card {
  position: relative;
  height: 110px;
  border: 2px solid #5c3b21;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.4);
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Overlay escuro para legibilidade do texto */
.map-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.2) 100%);
  z-index: 1;
  transition: all 0.2s ease;
}

.map-card-info {
  position: relative;
  z-index: 2;
  padding: 8px 10px;
  color: #fdf6e2;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
}

.map-card-name {
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-card-level {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
}

/* Indicadores de status do card */
.map-card-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  background: rgba(0,0,0,0.6);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fdf6e2;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  gap: 3px;
}

.map-card-badge.badge-current {
  background: #27ae60;
  border-color: #2ecc71;
  color: #fff;
}

.map-card-badge.badge-locked {
  background: #c0392b;
  border-color: #e74c3c;
  color: #fff;
}

/* Estado bloqueado: preto e branco (grayscale) */
.map-card.locked {
  filter: grayscale(1) contrast(0.85);
  opacity: 0.65;
  cursor: not-allowed;
  border-color: #7f8c8d;
}

.map-card.locked::before {
  background: rgba(0, 0, 0, 0.6);
}

.map-card.locked:hover {
  transform: none;
  box-shadow: 0 4px 6px rgba(0,0,0,0.4);
}

/* Hovers e interações nos cards ativos */
.map-card:not(.locked):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(212, 175, 55, 0.4);
  border-color: var(--gold);
}

.map-card:not(.locked):hover::before {
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 100%);
}

.map-card:not(.locked):active {
  transform: translateY(0);
}

/* Sub-abas de Forja */
.blacksmith-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 8px;
  width: 100%;
}
.blacksmith-subtab-btn {
  background: rgba(42, 31, 21, 0.6);
  border: 1.5px solid #8e6f43;
  color: #dfc888;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-family: var(--font-title);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.05), 0 1px 3px rgba(0,0,0,0.3);
}
.blacksmith-subtab-btn:hover {
  background: #3d2d1f;
  color: #fff;
  border-color: #dfc888;
}
.blacksmith-subtab-btn.active {
  background: #8e6f43;
  color: #fff;
  border-color: #dfc888;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

/* ==========================================================================
   🎭 PREMIUM NPC DIALOGUE LAYOUT & STYLES (RPG DIALOGUE SYSTEM)
   ========================================================================== */
.parchment-scroll-container.npc-active {
  max-width: 680px;
  width: 95%;
  transition: max-width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.parchment-modal-layout-flex {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  width: 100%;
}

.parchment-portrait-wrap {
  width: 130px;
  height: 130px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 4px solid #c5a059;
  background: radial-gradient(circle, #5c3b21 0%, #2c1a0e 100%);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: npcPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.parchment-npc-image {
  width: 90%;
  height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
  transform-origin: bottom center;
  animation: npcIdle 4s ease-in-out infinite;
}

.parchment-text-wrap {
  flex-grow: 1;
  width: 100%;
}

/* Desktop/Tablet side-by-side mode */
@media (min-width: 600px) {
  .parchment-scroll-container.npc-active .parchment-modal-layout-flex {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .parchment-scroll-container.npc-active .parchment-text-wrap {
    text-align: left;
  }

  .parchment-scroll-container.npc-active #parchment-modal-title {
    text-align: left;
  }
}

/* Micro-animations for the NPC conversing */
@keyframes npcPopIn {
  0% {
    transform: scale(0.6) rotate(-8deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes npcIdle {
  0%, 100% {
    transform: translateY(0) scaleY(1);
  }
  50% {
    transform: translateY(-3px) scaleY(1.02);
  }
}

/* ==========================================================================
   🏰 SEÇÃO DE MASMORRAS (DUNGEON AREA PREMIUM CSS)
   ========================================================================== */
.dungeon-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding: 8px 4px;
}

.dungeon-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #5c2c0e;
  padding-bottom: 8px;
  gap: 12px;
  flex-wrap: wrap;
}

.dungeon-tabs {
  display: flex;
  gap: 6px;
}

.dungeon-tab-btn {
  background: #3d2d1f;
  color: #dfc888;
  border: 1px solid #5c2c0e;
  padding: 8px 16px;
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dungeon-tab-btn:hover {
  background: #5c2c0e;
  color: #fff;
  border-color: #dfc888;
}

.dungeon-tab-btn.active {
  background: #8e6f43;
  color: #fff;
  border-color: #dfc888;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.btn-dungeon-back {
  background: #3d2d1f;
  color: #dfc888;
  border: 1px solid #5c2c0e;
  padding: 6px 12px;
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.btn-dungeon-back:hover {
  background: #5c2c0e;
  color: #fff;
  border-color: #dfc888;
}

.dungeon-content-area {
  width: 100%;
}

/* --- ABA DE CRIAÇÃO --- */
.dungeon-keys-bar {
  background: #fdf6e2;
  border: 1px solid #dfc888;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.88rem;
  color: #5c2c0e;
}

.dungeon-keys-bar strong {
  font-size: 1rem;
}

.dungeon-keys-bar small {
  color: #7b593f;
  font-size: 0.76rem;
}

.dungeon-creation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .dungeon-creation-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.dungeon-create-card {
  position: relative;
  background-size: cover;
  background-position: center;
  border: 2px solid #5c2c0e;
  padding: 20px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dungeon-create-card:not(.locked):hover {
  transform: translateY(-2px);
  border-color: #dfc888;
  box-shadow: 0 6px 14px rgba(223, 200, 136, 0.2), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.dungeon-create-info {
  z-index: 2;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
}

.dungeon-create-info h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  margin-bottom: 4px;
  color: #dfc888;
}

.dungeon-lvl-req {
  display: inline-block;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #dfc888;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 2px;
  margin-bottom: 10px;
  color: #dfc888;
}

.dungeon-create-info p {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #e0d0c0;
}

.dungeon-create-actions {
  z-index: 2;
  display: flex;
  gap: 6px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.btn-create-sub {
  flex: 1;
  min-width: 75px;
  padding: 8px 4px;
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
  border: 1px solid #5c2c0e;
  transition: all 0.2s ease;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

.btn-create-sub.solo {
  background: #3d2d1f;
  color: #dfc888;
}

.btn-create-sub.solo:hover {
  background: #dfc888;
  color: #3d2d1f;
  border-color: #fff;
  text-shadow: none;
}

.btn-create-sub.duo {
  background: linear-gradient(180deg, #d35400 0%, #a04000 100%);
  color: #fff;
  border-color: #783000;
}

.btn-create-sub.duo:hover {
  background: linear-gradient(180deg, #e67e22 0%, #d35400 100%);
  border-color: #fff;
  box-shadow: 0 0 8px rgba(211, 84, 0, 0.5);
}

.btn-create-sub.group {
  background: #8e6f43;
  color: #fff;
  border-color: #dfc888;
}

.btn-create-sub.group:hover {
  background: #c5a059;
  border-color: #fff;
  box-shadow: 0 0 8px rgba(223, 200, 136, 0.5);
}

/* Card bloqueado */
.dungeon-create-card.locked {
  border-color: rgba(78, 55, 30, 0.4);
  box-shadow: none;
}

.locked-badge {
  background: #c9302c !important;
  color: #fff !important;
  border-color: #ac2925 !important;
}

/* --- ABA PROCURAR GRUPO --- */
.open-lobbies-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .open-lobbies-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.open-lobby-card {
  position: relative;
  background-size: cover;
  background-position: center;
  border: 2px solid #5c2c0e;
  padding: 18px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
}

.open-lobby-card:hover {
  transform: translateY(-2px);
  border-color: #dfc888;
  box-shadow: 0 6px 14px rgba(223, 200, 136, 0.25), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.lobby-card-top {
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lobby-card-map {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: #dfc888;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
}

.lobby-card-slots {
  background: rgba(0,0,0,0.75);
  border: 1px solid #dfc888;
  color: #dfc888;
  font-size: 0.78rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 2px;
}

.lobby-card-middle {
  z-index: 2;
  margin: 14px 0;
}

.leader-badge {
  background: rgba(0,0,0,0.65);
  border-left: 3px solid #dfc888;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.leader-label {
  font-size: 0.62rem;
  color: #c5a059;
  letter-spacing: 1px;
  font-weight: 800;
}

.leader-name {
  font-size: 0.95rem;
  color: #fff;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.leader-level {
  font-size: 0.76rem;
  color: #bbb;
}

.lobby-card-bottom {
  z-index: 2;
}

.btn-join-lobby {
  width: 100%;
  padding: 10px;
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: bold;
  background: #8e6f43;
  color: #fff;
  border: 1px solid #dfc888;
  cursor: pointer;
  border-radius: 2px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  transition: all 0.15s ease;
}

.btn-join-lobby:hover {
  background: #c5a059;
  border-color: #fff;
  box-shadow: 0 0 8px rgba(223, 200, 136, 0.6);
}

/* Estado de grupo vazio */
.empty-lobbies-card {
  background: #fdf6e2;
  border: 2px dashed #8e6f43;
  padding: 30px 20px;
  text-align: center;
  color: #5c2c0e;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.empty-icon {
  font-size: 3rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.empty-lobbies-card h4 {
  font-family: var(--font-title);
  font-size: 1.15rem;
}

.empty-lobbies-card p {
  font-size: 0.85rem;
  max-width: 400px;
  line-height: 1.4;
  color: #7b593f;
}

.btn-empty-create {
  margin-top: 10px;
  background: #8e6f43;
  color: #fff;
  border: 1px solid #dfc888;
  padding: 8px 18px;
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.btn-empty-create:hover {
  background: #c5a059;
  border-color: #fff;
}

/* --- GRUPO ATIVO / MINHA EXPEDIÇÃO --- */
.active-lobby-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lobby-banner {
  background-size: cover;
  background-position: center;
  border: 2px solid #5c2c0e;
  padding: 20px;
  border-radius: 2px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.lobby-banner-info {
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
}

.lobby-banner-info h2 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: #dfc888;
  margin-bottom: 6px;
}

.lobby-badge {
  display: inline-block;
  background: rgba(142, 111, 67, 0.85);
  border: 1px solid #dfc888;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 2px;
  margin-right: 6px;
  margin-bottom: 8px;
}

.lobby-badge.status-lobby {
  background: rgba(92, 44, 14, 0.85);
  border-color: #dfc888;
}

.lobby-badge.status-exploring {
  background: rgba(39, 174, 96, 0.85);
  border-color: #2ecc71;
}

.lobby-room-info {
  font-size: 0.88rem;
  color: #e0d0c0;
}

.lobby-room-info span {
  color: #dfc888;
  font-weight: bold;
}

.lobby-members-section {
  background: #fdf6e2;
  border: 1px solid #dfc888;
  padding: 15px;
  border-radius: 2px;
}

.lobby-members-section h3 {
  font-family: var(--font-title);
  font-size: 1rem;
  color: #5c2c0e;
  border-bottom: 1px dashed rgba(92, 44, 14, 0.2);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.lobby-members-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 550px) {
  .lobby-members-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.member-card {
  background: #fff;
  border: 1px solid rgba(142, 111, 67, 0.3);
  padding: 10px 12px;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-card.self {
  border-color: #dfc888;
  background: #fffefb;
  box-shadow: 0 0 6px rgba(223, 200, 136, 0.2);
}

.member-info {
  display: flex;
  flex-direction: column;
}

.member-name {
  font-family: var(--font-title);
  font-size: 0.92rem;
  color: #5c2c0e;
  font-weight: bold;
}

.self-tag {
  font-size: 0.75rem;
  color: #8e6f43;
  font-style: italic;
}

.member-details {
  font-size: 0.78rem;
  color: #7b593f;
}

.member-hp-bar {
  position: relative;
  height: 18px;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 2px;
  overflow: hidden;
}

.member-hp-bar .hp-fill {
  height: 100%;
  background: var(--health-red, #d9534f);
  transition: width 0.3s ease;
}

.member-hp-bar .hp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  color: #fff;
  font-weight: bold;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
  white-space: nowrap;
}

.lobby-actions-section {
  display: flex;
  gap: 12px;
}

.btn-dungeon-action {
  flex: 1;
  padding: 12px;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.btn-dungeon-action.start {
  background: #8e6f43;
  color: #fff;
  border: 1px solid #dfc888;
}

.btn-dungeon-action.start:hover {
  background: #c5a059;
  border-color: #fff;
  box-shadow: 0 0 10px rgba(223, 200, 136, 0.5);
}

.btn-dungeon-action.leave {
  background: #c9302c;
  color: #fff;
  border: 1px solid #ac2925;
}

.btn-dungeon-action.leave:hover {
  background: #d9534f;
  border-color: #fff;
  box-shadow: 0 0 8px rgba(217, 83, 79, 0.4);
}

/* Painel de Buffs Ativos no Combate (Estilo Rústico) */
.active-buffs-panel {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  padding: 6px;
  background: rgba(180, 130, 60, 0.08);
  border: 1.5px solid rgba(180, 130, 60, 0.25);
  border-radius: 4px;
}

.active-buff-item {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #3a2211, #1d0f06);
  border: 1.5px solid #dfc888;
  border-radius: 3px;
  padding: 3px 6px;
  font-family: var(--font-title);
  font-size: 0.78rem;
  color: #dfc888;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.active-buff-item .buff-icon {
  font-size: 0.85rem;
}

.active-buff-item .buff-info {
  font-weight: bold;
}

/* Pix code container */
.pix-code-container {
  background: rgba(0,0,0,0.2);
  padding: 10px;
  border: 1px dashed var(--bronze);
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.72rem;
  word-break: break-all;
  user-select: all;
  margin: 10px 0;
  color: #d4c39e;
}

/* ==========================================
   💬 SISTEMA DE CHAT FLUTUANTE DE AETERNUM
   ========================================== */

.floating-chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  padding: 10px 18px;
  background: linear-gradient(to bottom, #8c5e26, #5c3c14);
  border: 2px solid #dfc888;
  border-radius: 20px;
  color: #fff;
  font-family: var(--font-title);
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  transition: all 0.2s ease-in-out;
}

.floating-chat-toggle:hover {
  transform: scale(1.05);
  background: linear-gradient(to bottom, #a06e30, #6d471a);
}

.floating-chat-box {
  position: fixed;
  bottom: 75px;
  right: 20px;
  width: 340px;
  height: 480px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  background-color: #ebdcb9;
  background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 0);
  background-size: 8px 8px;
  border: 4px double #5c3c14;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  font-family: var(--font-text);
  overflow: hidden;
}

.chat-header {
  background: #3d2511;
  border-bottom: 2px solid #5c3c14;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #dfc888;
  font-family: var(--font-title);
  font-weight: bold;
}

.chat-title {
  font-size: 0.85rem;
}

.btn-close-chat {
  background: none;
  border: none;
  color: #dfc888;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.btn-close-chat:hover {
  color: #ff4d4d;
}

.chat-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: calc(100% - 37px);
}

.chat-terms-content {
  padding: 14px;
  overflow-y: auto;
  font-size: 0.8rem;
  color: #3d2511;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chat-terms-content h4 {
  font-family: var(--font-title);
  color: #5c3c14;
  margin-bottom: 8px;
}

.chat-tabs {
  display: flex;
  background: #dbcaa3;
  border-bottom: 1.5px solid #5c3c14;
}

.chat-tab {
  flex: 1;
  padding: 8px 4px;
  background: none;
  border: none;
  border-right: 1px solid rgba(92, 60, 20, 0.2);
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: bold;
  cursor: pointer;
  color: #4a3828;
  transition: all 0.15s;
}

.chat-tab:last-child {
  border-right: none;
}

.chat-tab.active {
  background: #ebdcb9;
  color: #5c3c14;
  border-bottom: 2px solid #ebdcb9;
  margin-bottom: -1px;
}

.chat-private-indicator {
  background: #d6c39a;
  border-bottom: 1px solid rgba(92, 60, 20, 0.25);
  padding: 4px 10px;
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages-area {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-msg-row {
  font-size: 0.78rem;
  line-height: 1.35;
  word-break: break-word;
}

.chat-msg-time {
  opacity: 0.65;
  font-size: 0.68rem;
  margin-right: 4px;
}

.chat-msg-sender {
  font-weight: bold;
  color: #5c3c14;
  cursor: pointer;
  text-decoration: underline;
  margin-right: 4px;
}

.chat-msg-sender:hover {
  color: #a06e30;
}

.chat-msg-text {
  color: #1e1105;
}

/* Estilização por Canal */
.chat-msg-row.channel-guild .chat-msg-sender {
  color: #1b5e20;
}
.chat-msg-row.channel-guild {
  background: rgba(27, 94, 32, 0.05);
  border-left: 2px solid #1b5e20;
  padding-left: 4px;
}

.chat-msg-row.channel-private .chat-msg-sender {
  color: #0d47a1;
}
.chat-msg-row.channel-private {
  background: rgba(13, 71, 161, 0.05);
  border-left: 2px solid #0d47a1;
  padding-left: 4px;
}

.chat-input-form {
  display: flex;
  border-top: 1.5px solid #5c3c14;
  background: #dbcaa3;
}

#chat-message-input {
  flex: 1;
  padding: 8px 10px;
  border: none;
  background: none;
  font-size: 0.8rem;
  outline: none;
  font-family: var(--font-text);
  color: #3d2511;
}

#chat-message-input::placeholder {
  color: rgba(61, 37, 17, 0.6);
}

.btn-chat-send {
  padding: 8px 14px;
  background: #5c3c14;
  border: none;
  color: #dfc888;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-chat-send:hover {
  background: #3d2511;
  color: #fff;
}

/* Menu de Contexto */
.chat-context-menu {
  position: fixed;
  z-index: 10005;
  width: 180px;
  background: #ebdcb9;
  border: 2px solid #5c3c14;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.context-menu-item {
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.78rem;
  font-weight: bold;
  cursor: pointer;
  color: #3d2511;
  font-family: var(--font-title);
  transition: background 0.15s;
}

.context-menu-item:hover {
  background: #dbcaa3;
}

/* ==========================================================================
   👑 SISTEMA VIP PREMIUM CARD LAYOUT
   ========================================================================== */
.vip-shop-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 10px 5px;
  font-family: var(--font-body);
}

.vip-status-banner {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: 10px;
  background: rgba(40, 25, 15, 0.4);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
}

.vip-status-banner.active {
  border: 2px solid hsl(120, 50%, 40%);
  background: linear-gradient(135deg, rgba(20, 45, 20, 0.4), rgba(40, 25, 15, 0.4));
}

.vip-status-banner.inactive {
  border: 2px solid var(--bronze);
  background: linear-gradient(135deg, rgba(45, 25, 20, 0.4), rgba(40, 25, 15, 0.4));
}

.vip-status-banner .crown-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 8px var(--gold));
  animation: floatVipCrown 3s ease-in-out infinite;
}

.vip-status-banner .crown-icon.gray {
  filter: grayscale(1) opacity(0.5);
  animation: none;
}

.vip-status-banner .banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.vip-status-banner .banner-text strong {
  font-family: var(--font-title);
  color: #3d2511;
  font-size: 1.15rem;
}

.vip-status-banner .banner-text span {
  font-size: 0.85rem;
  color: #666;
}

.vip-status-banner.active .banner-text strong {
  color: hsl(120, 50%, 25%);
}

.vip-section-title {
  font-family: var(--font-title);
  color: #3d2511;
  font-size: 1.1rem;
  margin: 15px 0 5px 0;
  border-bottom: 2px dashed rgba(100, 70, 40, 0.2);
  padding-bottom: 6px;
  text-align: left;
}

.vip-benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .vip-benefits-grid {
    grid-template-columns: 1fr;
  }
}

.vip-benefit-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(139, 94, 60, 0.15);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.vip-benefit-card .benefit-icon {
  font-size: 1.5rem;
  padding-top: 2px;
}

.vip-benefit-card .benefit-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.vip-benefit-card .benefit-info strong {
  font-size: 0.88rem;
  color: #3d2511;
  font-weight: 700;
}

.vip-benefit-card .benefit-info span {
  font-size: 0.76rem;
  color: #666;
  line-height: 1.3;
}

.vip-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .vip-plans-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.vip-plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(139, 94, 60, 0.25);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
}

.vip-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.vip-plan-card.popular {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(255, 240, 210, 0.4), rgba(255, 255, 255, 0.5));
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.vip-plan-card .plan-badge {
  position: absolute;
  top: -10px;
  background: var(--gold);
  color: #3d2511;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid #3d2511;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.vip-plan-card.popular .plan-badge {
  background: var(--gold);
  color: #3d2511;
  box-shadow: 0 0 8px var(--gold);
}

.vip-plan-card .plan-name {
  margin: 8px 0 4px 0;
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: #3d2511;
}

.vip-plan-card .plan-duration {
  font-size: 0.8rem;
  color: #777;
  font-weight: 800;
  margin-bottom: 12px;
}

.vip-plan-card .plan-price-box {
  margin: 5px 0 15px 0;
  background: rgba(139, 94, 60, 0.08);
  border-radius: 6px;
  padding: 8px 15px;
  border: 1px solid rgba(139, 94, 60, 0.12);
  width: 100%;
  box-sizing: border-box;
}

.vip-plan-card .plan-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: hsl(120, 50%, 25%);
  font-family: monospace;
}

.btn-buy-vip-card {
  width: 100%;
  padding: 10px 5px;
  background: linear-gradient(180deg, var(--gold), var(--bronze));
  color: #fff;
  border: 1px solid #3d2511;
  border-radius: 6px;
  font-family: var(--font-title);
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.15s ease-in-out;
}

.btn-buy-vip-card:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
  box-shadow: 0 3px 6px rgba(0,0,0,0.25);
}

.btn-buy-vip-card:active {
  transform: scale(0.98);
}

.vip-footer-note {
  font-size: 0.8rem;
  color: #777;
  font-style: italic;
  margin-top: 15px;
}

@keyframes floatVipCrown {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

.clan-item-tooltip-trigger {
  position: relative;
}
.clan-item-tooltip-trigger:hover .info-tooltip,
.clan-item-tooltip-trigger:focus .info-tooltip,
.clan-item-tooltip-trigger.active .info-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* Styling de Abas de Páginas do Baú do Castelo - Medieval JRPG Premium */
.chest-page-tabs {
  display: flex;
  gap: 6px;
  margin: 10px 0 14px 0;
  justify-content: center;
  flex-wrap: wrap;
}

.chest-page-tabs button.chest-page-tab {
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(180deg, #2b221a 0%, #18120d 100%) !important;
  border: 1.5px solid #8c6d3f !important;
  color: #dfc888 !important;
  padding: 6px 14px !important;
  border-radius: 5px !important;
  font-family: var(--font-title), 'Cinzel', serif !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  outline: none !important;
  letter-spacing: 0.3px !important;
}

.chest-page-tabs button.chest-page-tab:hover {
  background: linear-gradient(180deg, #3d3126 0%, #241b14 100%) !important;
  border-color: #ffd700 !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 215, 0, 0.3) !important;
}

.chest-page-tabs button.chest-page-tab.active {
  background: linear-gradient(180deg, #c59b27 0%, #785a0c 100%) !important;
  color: #ffffff !important;
  font-weight: bold !important;
  border-color: #ffe893 !important;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

.chest-page-tabs button.chest-page-tab.locked {
  background: linear-gradient(180deg, #3a1c1c 0%, #200d0d 100%) !important;
  border: 1.5px solid #a33b3b !important;
  color: #ffb3b3 !important;
}

.chest-page-tabs button.chest-page-tab.locked:hover {
  background: linear-gradient(180deg, #4d2424 0%, #2b1212 100%) !important;
  border-color: #ff5555 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(220, 53, 69, 0.5) !important;
  transform: translateY(-2px) !important;
}

/* =====================================
   🏆 TEMPLO DAS CONQUISTAS - TABS DESIGN
   ===================================== */
.achievements-tab-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
  width: 100%;
  background: rgba(44, 26, 14, 0.4);
  padding: 5px;
  border-radius: 8px;
  border: 1px solid rgba(180, 130, 60, 0.3);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.ach-tab-btn {
  background: rgba(30, 18, 10, 0.6);
  border: 1.5px solid rgba(142, 111, 67, 0.4);
  border-radius: 6px;
  color: #a89482;
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.ach-tab-btn:hover {
  background: rgba(142, 111, 67, 0.25);
  border-color: #ffd700;
  color: #fff;
  transform: translateY(-1px);
}

.ach-tab-btn.active {
  background: linear-gradient(135deg, #7a461e, #3d220f) !important;
  border: 1.5px solid #ffd700 !important;
  color: #ffd700 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 0 8px rgba(255, 215, 0, 0.2);
  text-shadow: 0 1px 3px #000;
}

@media (max-width: 580px) {
  .achievements-tab-nav {
    grid-template-columns: repeat(2, 1fr);
  }
}



