/* ==========================================================================
   🔥 OS HERÓIS DE AETHEL'GARD — ESTILOS & DESIGN CARTOGRÁFICO
   ========================================================================== */

:root {
  --bg-dark: #0c120f;
  --bg-panel: rgba(18, 28, 23, 0.94);
  --bg-card: rgba(24, 38, 31, 0.96);
  --border-gold: #ffcd50;
  --border-dim: #3a5243;
  --text-ink: #f5eedc;
  --text-dim: #a4b8ab;
  --gold: #ffcd50;
  --gold-glow: rgba(255, 205, 80, 0.35);
  --fire-orange: #ff8c28;
  --fire-red: #e63946;
  --nature-green: #bede78;
  --hp-green: #2ec4b6;

  /* Parchment Palette */
  --parchment-bg: #e6d3a3;
  --parchment-dark: #c4ad7c;
  --parchment-border: #704e2e;
  --parchment-ink: #2b1e16;
  --parchment-banner: #8b2616;

  --rarity-common: #809671;
  --rarity-rare: #3a86ff;
  --rarity-epic: #9d4edd;
  --rarity-legendary: #ffb703;

  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 20px rgba(255, 140, 40, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  font-family: 'Outfit', sans-serif;
  color: var(--text-ink);
}

h1, h2, h3, h4, .font-fantasy {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.5px;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#game-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #050807;
  cursor: crosshair;
}

/* ==========================================================================
   HUD & TOP BAR
   ========================================================================== */

#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10;
}

#hud.hidden {
  display: none;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 24px;
  background: linear-gradient(180deg, rgba(8, 12, 10, 0.92) 0%, rgba(8, 12, 10, 0.4) 75%, transparent 100%);
  pointer-events: auto;
}

.biome-info {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-left: 4px solid var(--nature-green);
  border-radius: 8px;
  padding: 8px 16px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}

.biome-icon {
  font-size: 28px;
}

.biome-info h2 {
  font-size: 16px;
  color: var(--text-ink);
  margin-bottom: 4px;
}

.progress-bar-container {
  position: relative;
  height: 16px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xp-container {
  width: 180px;
}

.progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.xp-bar {
  background: linear-gradient(90deg, #7209b7, #b5179e);
}

.bar-text {
  position: relative;
  font-size: 10px;
  font-weight: 700;
  text-shadow: 0 1px 2px #000;
  z-index: 2;
}

/* Boss Health Bar */
.boss-hud {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  background: var(--bg-panel);
  border: 2px solid var(--fire-orange);
  border-radius: 10px;
  padding: 8px 16px;
  box-shadow: 0 0 30px rgba(255, 60, 0, 0.4);
  backdrop-filter: blur(10px);
  text-align: center;
}

.boss-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.boss-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--fire-orange);
}

.boss-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
}

.boss-bar-container {
  height: 20px;
}

.boss-hp-bar {
  background: linear-gradient(90deg, #b7094c, #ff1654);
}

.top-right-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gold-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  color: var(--gold);
  font-size: 15px;
  box-shadow: var(--shadow-lg);
}

.gold-coin {
  font-size: 18px;
}

.online-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00f5d4;
  box-shadow: 0 0 8px #00f5d4;
}

.online-badge.solo .status-dot {
  background: var(--nature-green);
  box-shadow: 0 0 8px var(--nature-green);
}

.icon-btn {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  color: var(--text-ink);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  border-color: var(--border-gold);
  transform: scale(1.05);
}

/* ==========================================================================
   PARTY PANEL & MINIMAP
   ========================================================================== */

.party-panel {
  position: absolute;
  top: 90px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}

.hero-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 8px 12px;
  width: 220px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}

.hero-card.active-leader {
  border-color: var(--border-gold);
  box-shadow: 0 0 15px rgba(255, 205, 80, 0.25);
}

.hero-avatar {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-info-box {
  flex: 1;
}

.hero-name-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hp-container {
  width: 100%;
  height: 12px;
}

.hp-bar {
  background: linear-gradient(90deg, #06d6a0, #2ec4b6);
}

.minimap-wrapper {
  position: absolute;
  top: 90px;
  right: 24px;
  background: var(--bg-panel);
  border: 2px solid var(--border-dim);
  border-radius: 10px;
  padding: 4px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

#minimap-canvas {
  border-radius: 6px;
  display: block;
  background: #060a08;
}

.minimap-coords {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  padding-top: 4px;
}

.interaction-prompt {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(18, 28, 23, 0.95);
  border: 2px solid var(--gold);
  border-radius: 30px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 0 25px rgba(255, 205, 80, 0.5);
  pointer-events: auto;
}

.key-badge {
  background: var(--gold);
  color: #000;
  font-weight: 900;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 6px;
}

.combat-notice {
  position: absolute;
  bottom: 95px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 18, 15, 0.88);
  border: 1px solid var(--border-dim);
  border-radius: 20px;
  padding: 6px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-ink);
  pointer-events: auto;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}

/* ==========================================================================
   HOTBAR & RODAPÉ
   ========================================================================== */

.bottom-bar {
  display: flex;
  justify-content: center;
  padding-bottom: 16px;
  pointer-events: auto;
}

.hotbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.hotbar-slot {
  position: relative;
  width: 52px;
  height: 52px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--border-dim);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
}

.hotbar-slot:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.slot-key {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 10px;
  font-weight: 900;
  color: var(--gold);
}

.slot-icon {
  font-size: 24px;
}

.cooldown-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: rgba(0, 0, 0, 0.75);
}

.hotbar-divider {
  width: 1px;
  height: 38px;
  background: var(--border-dim);
  margin: 0 6px;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text-ink);
  cursor: pointer;
  transition: all 0.2s;
  min-width: 72px;
}

.nav-btn:hover {
  background: rgba(255, 205, 80, 0.1);
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.nav-icon {
  font-size: 20px;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
}

.chat-box {
  position: absolute;
  bottom: 85px;
  left: 24px;
  width: 320px;
  background: rgba(12, 18, 15, 0.85);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.chat-messages {
  height: 110px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.chat-msg.system {
  color: var(--nature-green);
  font-style: italic;
}

.chat-msg.player {
  color: var(--text-ink);
}

.chat-form input {
  width: 100%;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-top: 1px solid var(--border-dim);
  color: var(--text-ink);
  font-size: 12px;
  outline: none;
}

/* ==========================================================================
   MODAIS: SELEÇÃO DE HERÓIS EM PERGAMINHO (IGUAL À IMAGEM 1)
   ========================================================================== */

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.modal-overlay.hidden {
  display: none;
}

/* Container de Pergaminho Antigo */
.parchment-modal {
  background: #e7d5a5 url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
  border: 12px solid #5a3d24;
  border-image: linear-gradient(135deg, #7a5533, #3f2714, #7a5533) 12;
  border-radius: 12px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), inset 0 0 40px rgba(90, 60, 30, 0.4);
  color: var(--parchment-ink);
  max-width: 96vw;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 20px;
}

.hero-select-modal {
  width: 1380px;
}

.parchment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #8c6a46;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.dragon-emblem {
  font-size: 38px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.header-titles {
  text-align: center;
}

.header-titles h1 {
  font-size: 26px;
  color: #3b2010;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

.header-titles h2 {
  font-size: 15px;
  color: #6e4828;
  font-weight: 700;
  letter-spacing: 1px;
}

.heroes-scroll-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  overflow-y: auto;
  padding: 6px 2px;
}

/* Cartas de Heróis (Exatas como Imagem 1) */
.hero-parchment-card {
  background: #f7ebd0;
  border: 3px solid #8c6641;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  cursor: pointer;
}

.hero-parchment-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(112, 78, 46, 0.6);
  border-color: #d4a373;
}

.hero-card-header {
  background: #deb887;
  border-bottom: 2px solid #8c6641;
  padding: 8px 6px;
  text-align: center;
}

.hero-card-header h3 {
  font-size: 14px;
  color: #3b2010;
  font-weight: 900;
}

.hero-card-header h4 {
  font-size: 11px;
  color: #5c3317;
  font-weight: 700;
}

.hero-art-frame {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #000;
}

.hero-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.hero-parchment-card:hover .hero-art-img {
  transform: scale(1.08);
}

.hero-class-tag {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 18, 10, 0.88);
  color: #ffcd50;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #ffcd50;
  white-space: nowrap;
}

.hero-lore-box {
  padding: 10px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #2b1e16;
  flex: 1;
  background: #f7ebd0;
  border-bottom: 1px solid #d4b895;
}

.hero-lore-box p {
  text-align: justify;
}

.hero-region-tag {
  font-size: 10px;
  font-weight: 800;
  color: #5c3317;
  padding: 6px 8px;
  text-align: center;
  background: #e8d1a7;
  border-bottom: 1px solid #8c6641;
}

.btn-parchment {
  background: linear-gradient(180deg, #deb887 0%, #c49a6c 100%);
  border: none;
  color: #2b1e16;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 12px;
  padding: 10px 6px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.btn-parchment:hover {
  background: linear-gradient(180deg, #ffcd50 0%, #e69500 100%);
  color: #000;
}

.btn-parchment.primary {
  background: linear-gradient(180deg, #52b788 0%, #2d6a4f 100%);
  color: #fff;
}

.btn-parchment.primary:hover {
  background: linear-gradient(180deg, #74c69d 0%, #40916c 100%);
}

.parchment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  border-top: 2px solid #8c6a46;
  padding-top: 10px;
}

.footer-hint {
  font-size: 12px;
  font-weight: 700;
  color: #5c3317;
}

/* ==========================================================================
   MODAL: MAPA GIGANTE DE AETHELGARD (IGUAL À IMAGEM 2)
   ========================================================================== */

.map-parchment-modal {
  width: 1320px;
}

.interactive-map-wrapper {
  position: relative;
  width: 100%;
  height: 640px;
  border: 4px solid #704e2e;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
  background: #3a2617;
}

.world-map-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Cartões das 5 Regiões no Mapa Gigante */
.map-region-card {
  position: absolute;
  background: rgba(18, 28, 23, 0.92);
  border: 2px solid var(--border-gold);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
  color: var(--text-ink);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 250px;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.4s;
}

.map-region-card.top-left {
  top: 8%;
  left: 6%;
  border-color: #4cc9f0;
}

.map-region-card.bottom-left {
  bottom: 12%;
  left: 5%;
  border-color: #52b788;
}

.map-region-card.center {
  top: 20%;
  left: 45%;
  border-color: #ffcd50;
}

.map-region-card.top-right {
  top: 28%;
  right: 6%;
  border-color: #ff6b35;
}

.map-region-card.bottom-center {
  bottom: 8%;
  left: 52%;
  border-color: #bede78;
}

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

.region-crest {
  font-size: 22px;
}

.region-header strong {
  font-size: 11px;
  color: var(--gold);
  display: block;
}

.region-header p {
  font-size: 10px;
  color: var(--text-dim);
}

.region-label-banner {
  background: rgba(0, 0, 0, 0.5);
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-fast-travel {
  background: linear-gradient(135deg, #ffcd50, #ff8c28);
  border: none;
  border-radius: 4px;
  color: #2b1700;
  font-weight: 900;
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  margin-top: 4px;
  transition: transform 0.15s;
}

.btn-fast-travel:hover {
  transform: scale(1.04);
}

/* Pino "Você está aqui" */
.you-are-here-pin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.pin-box {
  background: #e71d36;
  border: 2px solid #fff;
  border-radius: 6px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 15px #e71d36;
}

.pin-label {
  font-size: 10px;
  font-weight: 900;
  color: #fff;
}

.pin-hero-icon {
  font-size: 14px;
}

.map-legend-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  font-size: 12px;
  color: #3b2010;
  font-weight: 600;
}

/* ==========================================================================
   OUTROS MODAIS (MOCHILA, STATUS, LOJA)
   ========================================================================== */

.modal-card {
  background: var(--bg-card);
  border: 2px solid var(--border-dim);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  color: var(--text-ink);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
}

.menu-card {
  width: 480px;
  text-align: center;
  border-color: var(--border-gold);
}

.flame-logo h1 {
  font-size: 24px;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 140, 40, 0.7);
  margin-bottom: 4px;
}

.flame-logo .subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.device-save-badge {
  background: rgba(46, 196, 182, 0.15);
  border: 1px solid var(--hp-green);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--nature-green);
  margin-bottom: 20px;
  font-weight: 600;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.2s;
}

.btn-large {
  padding: 14px 20px;
  font-size: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, #2ec4b6, #06d6a0);
  color: #05241f;
}

.btn-gold {
  background: linear-gradient(135deg, #ffcd50, #ff8c28);
  color: #2b1700;
}

.btn-blue {
  background: linear-gradient(135deg, #4cc9f0, #4361ee);
  color: #fff;
}

.btn-dark {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-dim);
  color: var(--text-ink);
}

.version-tag {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 20px;
}

.bag-card, .stats-card, .shop-card, .coop-card, .save-card {
  width: 780px;
}

.hero-tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 8px;
}

.hero-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 8px 14px;
  color: var(--text-ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.hero-tab-btn.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

.bag-content-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}

.equipment-panel, .inventory-grid-panel {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 16px;
}

.hero-preview-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.hero-avatar-large {
  font-size: 36px;
  width: 54px;
  height: 54px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.equipment-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.equip-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 8px 10px;
}

.slot-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  width: 60px;
}

.slot-item-view {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.slot-item-view.empty {
  color: var(--text-dim);
  font-style: italic;
  font-weight: 400;
}

.rarity-0 { border-left: 4px solid var(--rarity-common); color: #d8f3dc; }
.rarity-1 { border-left: 4px solid var(--rarity-rare); color: #90e0ef; }
.rarity-2 { border-left: 4px solid var(--rarity-epic); color: #e0aaff; }
.rarity-3 { border-left: 4px solid var(--rarity-legendary); color: #ffd166; }

.inventory-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 12px;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.bag-item-slot {
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
  text-align: center;
  transition: all 0.2s;
}

.bag-item-slot:hover {
  border-color: var(--border-gold);
  transform: scale(1.06);
}

.bag-item-icon {
  font-size: 22px;
}

.bag-item-name {
  font-size: 9px;
  font-weight: 700;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.sub-tab-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-tab {
  flex: 1;
  padding: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  color: var(--text-ink);
  font-weight: 700;
  cursor: pointer;
}

.btn-tab.active {
  background: rgba(255, 205, 80, 0.15);
  border-color: var(--border-gold);
  color: var(--gold);
}

.points-available-banner {
  background: rgba(255, 205, 80, 0.1);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.points-badge {
  background: var(--gold);
  color: #000;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 14px;
}

.attributes-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 10px 14px;
}

.stat-info strong {
  font-size: 14px;
  color: var(--gold);
  display: block;
}

.stat-info small {
  font-size: 11px;
  color: var(--text-dim);
}

.stat-val {
  font-size: 18px;
  font-weight: 900;
  margin: 0 16px;
}

.btn-plus {
  background: var(--nature-green);
  color: #062b14;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

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

.skill-tree-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.skill-tree-card.unlocked {
  border-color: var(--border-gold);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.skill-icon-large {
  font-size: 28px;
}

.skill-level-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}

.shop-grid, .coop-grid, .save-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.shop-section, .coop-box, .save-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 16px;
}

.upgrade-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}

.death-card {
  width: 440px;
  text-align: center;
  border-color: var(--fire-red);
}

.death-title {
  color: var(--fire-red);
  font-size: 24px;
  margin-bottom: 12px;
}

.death-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Campaign journal keeps quests and forging in one readable working surface. */
.campaign-panel { padding: 22px; color: #eee8d9; background: #18201d; font: 16px/1.5 Outfit, sans-serif; max-height: 72vh; overflow: auto; text-align: left; }
.campaign-columns { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; }
.campaign-panel h2 { color: #dbc393; font-size: 21px; margin: 18px 0 12px; }
.campaign-panel h3 { font-size: 18px; margin: 0 0 8px; }
.campaign-panel p { margin: 8px 0 14px; }
.campaign-quest { border-bottom: 1px solid #475046; padding: 16px 0; }
.campaign-quest button { display: block; margin-top: 12px; }
.campaign-panel button:disabled { opacity: .5; cursor: default; }
.campaign-reward,.campaign-summary { color: #dcc189; }
.campaign-panel progress { width: 75%; accent-color: #97b389; }
.quest-tracker { position: absolute; bottom: 155px; left: 20px; max-width: 310px; padding: 12px 16px; color: #efe8d6; background: rgba(15,24,21,.9); border-left: 3px solid #d2b477; font-size: 14px; pointer-events: none; }
@media(max-width:700px){.campaign-columns{grid-template-columns:1fr}.campaign-panel{padding:14px}.quest-tracker{bottom:140px;left:8px;max-width:230px;font-size:13px}}
