/* Rakion Elite - v479 web */
:root {
  --bg: #07090d;
  --bg-soft: #111821;
  --card: rgba(18, 24, 32, 0.88);
  --card-edge: rgba(128, 160, 184, 0.18);
  --text: #f3eee4;
  --muted: #aeb7c1;
  --accent: #f4a033;
  --accent-dark: #c55d1c;
  --steel: #72c7ff;
  --steel-dark: #1a5a78;
  --danger: #e05252;
  --ok: #58c470;
}

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

body {
  background: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(7, 9, 13, 0.22), #07090d 520px),
    radial-gradient(ellipse 70% 40% at 82% 5%, rgba(35, 118, 158, 0.26), transparent 62%),
    radial-gradient(ellipse 60% 35% at 16% 18%, rgba(201, 83, 28, 0.18), transparent 58%),
    url("img/rakion-elite-hero.png");
  background-size: auto, auto, auto, min(1800px, 145vw) auto;
  background-position: center top, center top, center top, center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { width: min(1060px, 100% - 32px); margin: 0 auto; }

/* ---- barra superior ---- */
.topbar {
  background: rgba(7, 9, 13, 0.78);
  border-bottom: 1px solid var(--card-edge);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner { display: flex; align-items: center; gap: 18px; min-height: 66px; padding: 6px 0; }
.brand {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-weight: 800; font-size: 1.15rem; letter-spacing: 0;
  min-width: 0;
}
.brand-logo {
  width: clamp(108px, 14vw, 142px);
  height: 54px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 12px rgba(244, 160, 51, 0.24));
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 7px;
  background: linear-gradient(145deg, var(--steel), var(--accent) 55%, var(--accent-dark));
  color: #080a0e; font-weight: 900; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 24px rgba(244, 160, 51, 0.28);
}
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}
.nav a {
  color: var(--muted); text-decoration: none; font-size: 0.95rem;
  padding: 7px 10px; border-radius: 7px;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--bg-soft); }
.nav a.active { color: var(--accent); font-weight: 600; }
.nav-account { color: var(--accent); font-weight: 600; padding: 0 6px 0 14px; font-size: 0.95rem; }
.nav-logout { border: 1px solid var(--card-edge); }

main { flex: 1; padding: 26px 0 48px; }

.hero {
  min-height: clamp(330px, 46vw, 500px);
  display: flex;
  align-items: end;
  margin: -26px calc(50% - 50vw) 26px;
  padding: clamp(82px, 12vw, 120px) max(16px, calc((100vw - 1060px) / 2)) 34px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.92), rgba(7, 9, 13, 0.45) 48%, rgba(7, 9, 13, 0.78)),
    linear-gradient(180deg, rgba(7, 9, 13, 0.06), #07090d 92%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  width: min(760px, 100%);
}
.hero-logo {
  width: min(360px, 84vw);
  height: auto;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.5));
}
.eyebrow {
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

/* ---- tipografia / bloques ---- */
h1 { font-size: clamp(2.7rem, 7vw, 5.4rem); line-height: 0.94; margin-bottom: 12px; }
h2 { font-size: 1.15rem; margin: 28px 0 12px; color: var(--accent); }
.subtitle { color: #d7dee5; margin-bottom: 24px; max-width: 680px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.section-block { margin-top: 34px; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.section-head h2 { margin: 0 0 4px; }

.card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.grid { display: grid; gap: 16px; }
.grid-hero { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); align-items: start; }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.grid-chars { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }

/* ---- ranking visual ---- */
.ranking-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
}
.rank-card {
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(244, 160, 51, 0.18), rgba(18, 24, 32, 0.78) 44%),
    rgba(18, 24, 32, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}
.rank-1 { border-color: rgba(244, 160, 51, 0.58); }
.rank-medal {
  color: var(--accent);
  font-weight: 900;
  font-size: 1.5rem;
}
.rank-main { display: flex; flex-direction: column; gap: 8px; }
.rank-main strong { font-size: 1.08rem; }
.rank-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

/* ---- clases ---- */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.class-card {
  min-height: 526px;
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(18, 24, 32, 0.92);
  position: relative;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}
.class-card img {
  width: 100%;
  height: 330px;
  min-height: 0;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 180ms ease;
}
.class-card:hover img { transform: scale(1.035); }
.class-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(7, 9, 13, 0.9));
}
.class-card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 16px;
  min-height: 190px;
}
.class-card-body span {
  color: var(--steel);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}
.class-card-body h3 {
  font-size: 1.25rem;
  margin: 4px 0 6px;
}
.class-card-body p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

/* ---- galeria ---- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.media-card {
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  background: rgba(18, 24, 32, 0.9);
  overflow: hidden;
}
.media-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.media-card div {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.media-card span { color: var(--muted); font-size: 0.86rem; }

/* ---- panel ---- */
.panel-hero {
  min-height: 220px;
  margin: -26px 0 24px;
  padding: 34px;
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  background:
    linear-gradient(95deg, rgba(7, 9, 13, 0.96), rgba(7, 9, 13, 0.62)),
    url("img/media/elite-classes.jpg") center / cover no-repeat;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.28);
}
.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
}
.wallet-card {
  position: relative;
  overflow: hidden;
}
.wallet-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: rgba(244, 160, 51, 0.14);
  color: var(--accent);
  font-weight: 900;
}
.wallet-icon-img {
  background: rgba(7, 9, 13, 0.34);
}
.wallet-icon-img img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.char-card-elite { padding: 0; overflow: hidden; }
.char-art {
  position: relative;
  height: 230px;
  overflow: hidden;
}
.char-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.char-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(18, 24, 32, 0.98));
}
.char-art .char-level {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  background: rgba(7, 9, 13, 0.78);
  border: 1px solid var(--card-edge);
  border-radius: 999px;
  padding: 5px 10px;
}
.char-card-elite .char-head,
.char-card-elite .progress,
.char-card-elite .progress-label,
.char-card-elite .char-rows {
  margin-left: 18px;
  margin-right: 18px;
}
.char-card-elite .char-head { margin-top: 16px; }
.char-card-elite .char-rows { margin-bottom: 18px; }
.account-card { max-width: 760px; }

/* ---- stats ---- */
.stat { text-align: center; padding: 16px 10px; }
.stat .stat-value { font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.stat .stat-label { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; }
.status-online  { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.status-offline { background: var(--danger); }

/* ---- formularios ---- */
.form-row { margin-bottom: 15px; }
.form-row label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.9rem; }
.form-row input {
  width: 100%; padding: 10px 12px;
  background: rgba(7, 9, 13, 0.55); color: var(--text);
  border: 1px solid var(--card-edge); border-radius: 8px;
  font-size: 1rem;
}
.form-row input:focus { outline: none; border-color: var(--accent); }
.form-hint { color: var(--muted); font-size: 0.8rem; margin-top: 5px; }

.btn {
  display: inline-block; border: none; cursor: pointer;
  background: linear-gradient(150deg, var(--accent), var(--accent-dark));
  color: #17130a; font-weight: 700; font-size: 1rem;
  padding: 11px 22px; border-radius: 8px; text-decoration: none;
}
.btn:hover { filter: brightness(1.1); }
.btn-block { width: 100%; }
.btn-ghost {
  background: rgba(7, 9, 13, 0.28); border: 1px solid var(--card-edge); color: var(--text);
  font-weight: 600;
}
.guide-card ol { padding-left: 20px; line-height: 2; }
.guide-card a,
.form-hint a { color: var(--accent); }

/* ---- alerts ---- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 0.95rem; }
.alert-error   { background: rgba(224, 82, 82, 0.12); border: 1px solid rgba(224, 82, 82, 0.5); color: #f2a1a1; }
.alert-success { background: rgba(88, 196, 112, 0.12); border: 1px solid rgba(88, 196, 112, 0.5); color: #9fdfae; }
.alert-info    { background: rgba(108, 148, 240, 0.10); border: 1px solid rgba(108, 148, 240, 0.4); color: #b9c8f5; }
.item-cell { display: flex; align-items: center; gap: 11px; }
.item-icon { width: 40px; height: 40px; object-fit: contain; border-radius: 7px;
             background: var(--bg-soft); border: 1px solid var(--card-edge); flex-shrink: 0; }
.sell-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sell-form select, .sell-form input { padding: 8px 10px; background: var(--bg-soft); color: var(--text); border: 1px solid var(--card-edge); border-radius: 7px; }

/* ============ Skin RAKION (box + inventario): negro + oro ============ */
.box-wrap, .inv-screen {
  --rk-gold: #c7a24e; --rk-gdim: #6f5a2c; --rk-line: #4a3a1c;
  --rk-p1: #0b0906; --rk-p2: #1a140a; --rk-txt: #e8dcc0; --rk-mut: #9a8a63;
}
/* --- grilla de box --- */
.box-wrap { max-width: 470px; }
.box-tabs { display: flex; gap: 3px; margin-bottom: 8px; flex-wrap: wrap; }
.box-tab { padding: 6px 14px; border: 1px solid var(--rk-line); color: #b39a63; cursor: pointer;
           background: linear-gradient(180deg, #241b0e, #100c07); border-radius: 3px; font-size: 0.82rem; letter-spacing: 0.3px; }
.box-tab:hover { color: #e6cf8f; }
.box-tab.active { color: #17110a; background: linear-gradient(180deg, var(--rk-gold), #9a7a34); border-color: var(--rk-gold); font-weight: 700; }
.box-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 12px;
            background: linear-gradient(160deg, var(--rk-p2), var(--rk-p1)); border: 1px solid var(--rk-line);
            border-radius: 5px; box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.65); }
/* los slots del box LLENAN el panel (cuadrados) para que no sobre espacio a la derecha */
.box-grid .box-slot { width: 100%; height: auto; aspect-ratio: 1 / 1; }
.box-grid.hidden { display: none; }
.box-slot { position: relative; width: 54px; height: 54px; border: 1px solid #2c2413; border-radius: 3px;
            background: linear-gradient(180deg, #14100a, #0a0705); display: flex; align-items: center;
            justify-content: center; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.05); }
.box-slot.empty { opacity: 0.9; }
.box-slot.has-item, .box-slot.rented { cursor: pointer; border-color: var(--rk-gdim); }
.box-slot.has-item:hover { border-color: var(--rk-gold); box-shadow: 0 0 0 1px var(--rk-gold), 0 0 10px rgba(199, 162, 78, 0.45); }
.box-slot.rented { opacity: 0.65; }
.box-slot .item-icon { width: 100%; height: 100%; border: 0; background: transparent; border-radius: 2px; }
.box-slot .box-lvl { position: absolute; bottom: 0; right: 2px; font-size: 0.66rem; font-weight: 700; color: #ffe9b0; text-shadow: 0 1px 2px #000; }
.box-slot .box-lock { position: absolute; top: 1px; left: 2px; font-size: 0.7rem; }
.box-slot[draggable="true"] { cursor: grab; }
.box-slot.dragging { opacity: 0.35; }
.box-slot.drop-hover { border-color: var(--rk-gold); box-shadow: 0 0 0 2px var(--rk-gold), 0 0 12px rgba(199, 162, 78, 0.5); }

/* --- modal publicar --- */
#pubOverlay { position: fixed; inset: 0; z-index: 50; background: rgba(4, 3, 1, 0.82); display: flex; align-items: center; justify-content: center; }
.pub-panel { width: 380px; max-width: 92%; background: linear-gradient(160deg, #1a140a, #0c0a06);
             border: 1px solid #4a3a1c; border-radius: 8px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7); }
.pub-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #4a3a1c; }
.pub-head h2 { font-size: 1rem; margin: 0; color: #c7a24e; }
.pub-head button { width: 30px; height: 26px; border: 0; background: #211a0e; color: #b39a63; border-radius: 5px; cursor: pointer; }
.pub-head button:hover { background: var(--danger); color: #fff; }
.pub-body { padding: 16px; }
.pub-item { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pub-item .item-icon { width: 48px; height: 48px; }
.pub-name { font-weight: 700; font-size: 1.05rem; color: #e8dcc0; }

/* --- pantalla de inventario (character.php) --- */
.inv-screen { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
@media (max-width: 820px) { .inv-screen { grid-template-columns: 1fr; align-items: start; } }
.inv-panel { background: linear-gradient(160deg, var(--rk-p2), var(--rk-p1)); border: 1px solid var(--rk-line);
             border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 44px rgba(0, 0, 0, 0.5); }
.inv-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 15px;
            background: linear-gradient(180deg, #2a2010, #160f07); border-bottom: 1px solid var(--rk-gdim);
            font-weight: 700; color: var(--rk-gold); letter-spacing: 1px; text-transform: uppercase; font-size: 0.9rem; }
.inv-head .arrange { font-size: 0.7rem; color: #8a744a; border: 1px solid #3a2f18; padding: 3px 11px;
            border-radius: 3px; background: #160f07; text-transform: none; letter-spacing: 0; }
.inv-body { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.equip-top { display: flex; gap: 5px; justify-content: center; }
.equip-mid { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; }
.equip-col { display: flex; flex-direction: column; gap: 5px; }
.equip-top .box-slot, .equip-col .box-slot { width: 54px; height: 54px; flex: none; }

/* clase utilitaria que faltaba (la usan varios paneles) */
.hidden { display: none !important; }

/* tooltip de item (nombre + stats al pasar el mouse) */
.item-tip { position: fixed; z-index: 90; pointer-events: none; min-width: 150px; max-width: 240px;
            background: linear-gradient(160deg, #1a140a, #0b0906); border: 1px solid var(--rk-gold, #c7a24e);
            border-radius: 6px; padding: 9px 11px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7); }
.item-tip .tip-name { color: #ffe9b0; font-weight: 700; font-size: 0.92rem; margin-bottom: 2px; }
.item-tip .tip-req  { color: #9a8a63; font-size: 0.78rem; margin-bottom: 6px; }
.item-tip .tip-stats { display: flex; flex-direction: column; gap: 3px; border-top: 1px solid #3a2f18; padding-top: 6px; }
.item-tip .tip-stat { display: flex; justify-content: space-between; font-size: 0.8rem; color: #cbbf9e; }
.item-tip .tip-stat span:last-child { color: #7ed494; font-weight: 600; }
.points-banner { margin: 0 15px 12px; padding: 8px 12px; border-radius: 5px; background: rgba(199, 162, 78, 0.12);
                 border: 1px solid var(--rk-gdim); color: #e6cf8f; font-size: 0.85rem; }
.points-banner strong { color: var(--rk-gold); }
.stat-right { display: flex; align-items: center; gap: 8px; }
.stat-plus { display: inline; margin: 0; }
.stat-plus button { width: 20px; height: 20px; border: 0; border-radius: 4px; cursor: pointer; line-height: 1;
                    font-weight: 900; color: #17110a; background: linear-gradient(180deg, var(--rk-gold), #9a7a34); }
.stat-plus button:hover { filter: brightness(1.12); }
.char-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 280px;
                background: radial-gradient(circle at 50% 42%, rgba(90, 68, 28, 0.28), transparent 68%); border-radius: 6px; }
.char-silhouette { font-size: 100px; line-height: 1; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.7)); }
.char-portrait { width: 128px; height: 128px; object-fit: cover; border-radius: 10px;
                 border: 2px solid var(--rk-gdim, #6f5a2c); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6); }
.model3d { width: 230px; height: 300px; cursor: grab; touch-action: none; }
.model3d:active { cursor: grabbing; }
.model3d canvas { display: block; }
.char-class { font-weight: 700; color: var(--rk-gold); font-size: 1.1rem; margin-top: 4px; }
.char-level { color: #b39a63; font-size: 0.9rem; }
.char-3dnote { font-size: 0.74rem; margin-top: 12px; color: #6f5a2c; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 22px; padding: 0 15px 12px; }
.stat-col { display: flex; flex-direction: column; gap: 5px; }
.stat-row { display: flex; justify-content: space-between; font-size: 0.86rem; color: #cbbf9e; }
.stat-row span:first-child { color: var(--rk-mut); }
.stat-alloc { color: var(--rk-gold); font-weight: 600; }
.stat-note { padding: 0 15px 14px; font-size: 0.78rem; color: #6f5a2c; }

/* --- wallet estilo Rakion (iconos + valores) --- */
.wallet-bar { display: flex; align-items: center; margin-top: 14px; flex-wrap: wrap; border-radius: 6px;
              background: linear-gradient(160deg, #1a140a, #0b0906); border: 1px solid var(--rk-line); }
.wallet-bar .wal { display: flex; align-items: center; gap: 8px; padding: 9px 15px; border-right: 1px solid #2c2413; font-size: 0.9rem; }
.wallet-bar .wal .ico { width: 15px; height: 15px; border-radius: 3px; box-shadow: 0 0 4px rgba(0, 0, 0, 0.5); }
.wallet-bar .wal .wal-ico { width: 22px; height: 22px; object-fit: contain; display: block; }
.wallet-bar .wal .lbl { color: #9a8a63; }
.wallet-bar .wal strong { color: #f0e2bd; }
.ico-gold { background: linear-gradient(180deg, #ffd558, #c98a1c); }
.ico-cash { background: linear-gradient(180deg, #5aa0f0, #2b62b8); }
.ico-ep   { background: linear-gradient(180deg, #6fe08c, #2f9a4a); }

/* moneda estilo Rakion original: recuadro apilado abajo-derecha (Event Points / Cash / Gold) */
.wallet-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 14px; }
.wallet-box { display: flex; flex-direction: column; gap: 5px; padding: 10px 14px; min-width: 230px;
              background: linear-gradient(160deg, #1a140a, #0b0906); border: 1px solid var(--rk-line); border-radius: 6px; }
.wal-line { display: flex; align-items: center; gap: 9px; font-size: 0.86rem; }
.wal-line .lbl { color: #9a8a63; }
.wal-line strong { margin-left: auto; color: #f0e2bd; font-variant-numeric: tabular-nums; }
.wal-line .wal-ico { width: 18px; height: 18px; object-fit: contain; }
.wal-line .ico { width: 16px; height: 16px; border-radius: 3px; }
.wal-line.wl-gold strong { color: #ffd35a; }   /* oro dorado */
.wal-line.wl-cash strong { color: #67c0ff; }   /* cash celeste */
.wal-line.wl-ep   strong { color: #7ee08c; }   /* event points verde */

/* ---- badges de clase ---- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.3px;
}
.badge-sword  { background: rgba(224, 82, 82, 0.18);  color: #f08c8c; }
.badge-archer { background: rgba(88, 196, 112, 0.18); color: #7ed494; }
.badge-smith  { background: rgba(240, 161, 58, 0.18); color: #f0b96a; }
.badge-mage   { background: rgba(108, 148, 240, 0.18); color: #93b1f5; }
.badge-ninja  { background: rgba(176, 108, 240, 0.18); color: #c397f0; }
.badge-gm     { background: rgba(88, 196, 112, 0.25);  color: #8ce6a3; }
.badge-obs    { background: rgba(154, 160, 173, 0.2);  color: #b8bec9; }

/* ---- tarjeta de personaje ---- */
.char-card { display: flex; flex-direction: column; gap: 12px; }
.char-head { display: flex; align-items: center; gap: 10px; }
.char-name { font-size: 1.15rem; font-weight: 700; }
.char-level { margin-left: auto; color: var(--accent); font-weight: 700; white-space: nowrap; }
.char-rows { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.char-row { display: flex; justify-content: space-between; }
.char-row span:first-child { color: var(--muted); }

.progress { background: var(--bg-soft); border-radius: 20px; height: 9px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-dark), var(--accent)); border-radius: 20px; }
.progress-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.78rem; margin-top: 4px; }

/* ---- tablas ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 10px 12px; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--card-edge); }
tbody tr { border-bottom: 1px solid rgba(46, 51, 64, 0.5); }
tbody tr:hover { background: rgba(240, 161, 58, 0.04); }
td.rank-pos { font-weight: 700; color: var(--muted); }
tr.rank-top td.rank-pos { color: var(--accent); }

/* ---- tabs de ranking ---- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a {
  padding: 7px 14px; border-radius: 20px; text-decoration: none;
  color: var(--muted); background: var(--bg-soft); border: 1px solid var(--card-edge);
  font-size: 0.88rem;
}
.tabs a.active { color: #17130a; background: var(--accent); border-color: var(--accent); font-weight: 700; }

/* ---- descargas ---- */
.grid-dl { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.dl-card { display: flex; flex-direction: column; gap: 14px; }
.dl-primary { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(240, 161, 58, 0.25); }
.dl-head { display: flex; align-items: center; gap: 14px; }
.dl-icon {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px;
  background: var(--bg-soft); border: 1px solid var(--card-edge);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--accent);
}
.dl-title { font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dl-size { font-size: 0.82rem; margin-top: 2px; }
.dl-desc { font-size: 0.9rem; margin: -2px 0 0; }
.dl-card .btn { margin-top: auto; }
.dl-soon { opacity: 0.5; cursor: default; text-align: center; }

/* ---- varios ---- */
.footer {
  border-top: 1px solid var(--card-edge);
  padding: 18px 0; color: var(--muted); font-size: 0.85rem;
  background: rgba(7, 9, 13, 0.7);
}
.muted { color: var(--muted); }
.mt { margin-top: 18px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }

@media (max-width: 900px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .nav {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
  .grid-hero { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 22px, 1060px); }
  body {
    background-attachment: scroll;
    background-size: auto, auto, auto, 1200px auto;
  }
  main { padding-bottom: 34px; }
  .topbar { position: static; }
  .topbar-inner { min-height: 0; padding: 9px 0; }
  .brand { width: 100%; justify-content: center; }
  .brand-logo { width: min(170px, 76vw); height: 58px; }
  .nav {
    justify-content: center;
    gap: 6px;
  }
  .nav a {
    flex: 1 1 calc(50% - 6px);
    text-align: center;
    padding: 9px 8px;
    background: rgba(17, 24, 33, 0.68);
    border: 1px solid rgba(128, 160, 184, 0.12);
  }
  .nav-account {
    width: 100%;
    text-align: center;
    padding: 4px 0 0;
  }
  .hero {
    min-height: 520px;
    align-items: end;
    padding-top: 44px;
    padding-bottom: 28px;
  }
  .hero-logo { width: min(320px, 88vw); }
  h1 { font-size: clamp(2.4rem, 15vw, 4rem); }
  .subtitle { font-size: 0.98rem; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .section-head,
  .panel-hero { align-items: stretch; flex-direction: column; }
  .section-head .btn { width: 100%; text-align: center; }
  .grid-stats,
  .wallet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .class-card,
  .class-card img { height: 360px; }
  .card { padding: 18px; }
  .char-row {
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
  }
  .progress-label {
    flex-direction: column;
    gap: 3px;
  }
  th, td { padding: 9px 10px; }
}

@media (max-width: 430px) {
  .container { width: min(100% - 16px, 1060px); }
  .nav a { flex-basis: 100%; }
  .grid-stats,
  .wallet-grid,
  .ranking-strip,
  .class-grid,
  .media-grid { grid-template-columns: 1fr; }
  .hero {
    min-height: 560px;
    margin-bottom: 18px;
  }
  .hero-logo { width: min(280px, 92vw); }
  .class-card,
  .class-card img { height: 390px; }
  .char-art { height: 260px; }
  .panel-hero { padding: 22px; }
}
