/* ==========================================================================
   Mulala Online Official Portal (/home/) — Dark Medieval Fantasy Stylesheet
   Weathered obsidian stone, forged iron, burnished royal gold, torch-fire glow.
   Mobile-first responsive design (360px phone -> 1360px+ widescreen desktop).
   ========================================================================== */

:root {
  --bg-abyss: #090706;
  --bg-obsidian: #110e0b;
  --bg-stone: #17130f;
  --bg-panel: #1e1914;
  --bg-card: #251f19;
  --bg-card-hover: #2f271f;
  --bg-elevated: #322a22;

  --iron-dark: #2a221b;
  --iron-border: #3f3429;
  --iron-light: #5c4d3c;

  --gold-deep: #6e531f;
  --gold-dim: #967534;
  --gold: #cfa64b;
  --gold-bright: #efd07b;
  --gold-pale: #fff2c6;
  --gold-glow: rgba(207, 166, 75, 0.25);

  --torch: #e07b24;
  --torch-bright: #f7a428;
  --crimson: #b83227;
  --crimson-dark: #6e1912;
  --crimson-glow: rgba(184, 50, 39, 0.35);

  --emerald: #34d399;
  --emerald-bg: rgba(16, 185, 129, 0.16);
  --amber: #fbbf24;
  --amber-bg: rgba(245, 158, 11, 0.16);
  --danger: #f87171;
  --danger-bg: rgba(239, 68, 68, 0.16);

  --cls-knight: #f87171;
  --cls-mage: #c084fc;
  --cls-archer: #4ade80;

  --text-main: #f4ece0;
  --text-body: #d8ccb8;
  --text-muted: #9e907a;
  --text-dim: #6e6352;

  --font-serif: 'Cinzel', Georgia, serif;
  --font-thai: 'Noto Sans Thai', 'Sarabun', system-ui, -apple-system, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-deep: 0 12px 32px rgba(0, 0, 0, 0.72);
  --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 0 24px rgba(207, 166, 75, 0.24);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-abyss);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-thai);
  font-size: 0.96875rem;
  line-height: 1.65;
  color: var(--text-body);
  background:
    radial-gradient(ellipse 90% 45% at 50% 0%, rgba(224, 123, 36, 0.12) 0%, transparent 65%),
    radial-gradient(circle at 85% 25%, rgba(184, 50, 39, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #120e0b 0%, #090706 100%);
  overflow-x: hidden;
}

a {
  color: var(--gold-bright);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

a:hover {
  color: var(--gold-pale);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select {
  font-family: var(--font-thai);
}

.gold-text {
  color: var(--gold-bright);
}

/* ==========================================================================
   1. Top Live Telemetry Ticker
   ========================================================================== */
.top-ticker {
  background: linear-gradient(90deg, #0b0907 0%, #17120d 50%, #0b0907 100%);
  border-bottom: 1px solid var(--iron-dark);
  font-size: 0.82rem;
  color: var(--text-muted);
  position: relative;
  z-index: 102;
}

.ticker-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 6px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ticker-left,
.ticker-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
  font-weight: 600;
  font-size: 0.78rem;
}

.status-badge.warn {
  background: var(--amber-bg);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulseDot 2s infinite ease-in-out;
}

.status-dot.warn {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

.ticker-divider {
  color: var(--iron-light);
}

.ticker-event-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(207, 166, 75, 0.12);
  border: 1px solid rgba(207, 166, 75, 0.38);
  color: var(--gold-bright);
  font-weight: 600;
  font-size: 0.79rem;
}

.ticker-event-pill.live-now {
  background: linear-gradient(90deg, rgba(184, 50, 39, 0.35), rgba(224, 123, 36, 0.35));
  border-color: var(--torch-bright);
  color: #fff5d6;
  box-shadow: 0 0 12px rgba(247, 164, 40, 0.35);
}

.ticker-clock {
  font-variant-numeric: tabular-nums;
  color: var(--text-body);
  font-weight: 600;
  padding-left: 4px;
}

/* ==========================================================================
   2. Sticky Site Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 14, 11, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--iron-border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.78);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text-main);
  flex-shrink: 0;
}

.brand-crest {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: radial-gradient(circle at 30% 25%, #4a371c 0%, #1c140b 100%);
  border: 1.5px solid var(--gold);
  box-shadow: inset 0 0 10px rgba(207, 166, 75, 0.4), 0 2px 10px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--gold-bright);
  flex-shrink: 0;
}

.brand-crest.sm {
  width: 36px;
  height: 36px;
  font-size: 1.15rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.14rem;
  letter-spacing: 0.07em;
  background: linear-gradient(180deg, #fff5d1 0%, #e5be64 60%, #b88728 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
}

.brand-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  border: 1px solid transparent;
}

.nav-item:hover {
  color: var(--gold-pale);
  background: rgba(207, 166, 75, 0.08);
  border-color: rgba(207, 166, 75, 0.22);
}

.nav-item.active {
  color: var(--gold-pale);
  background: linear-gradient(180deg, rgba(207, 166, 75, 0.22) 0%, rgba(150, 117, 52, 0.14) 100%);
  border-color: var(--gold);
  box-shadow: inset 0 0 10px rgba(207, 166, 75, 0.18);
}

.nav-item.nav-ext {
  color: var(--gold);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-play-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #e58a2e 0%, #b54818 55%, #87270d 100%);
  border: 1px solid #f7c26b;
  color: #fff9eb;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 18px rgba(229, 138, 46, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-play-header:hover {
  color: #ffffff;
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 22px rgba(247, 164, 40, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* ==========================================================================
   3. Main Layout & Hero Showcase Banner
   ========================================================================== */
.portal-main {
  flex: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 16px 64px;
}

.portal-loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.portal-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border: 3px solid var(--iron-border);
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hero Banner */
.hero-fortress {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1.5px solid var(--gold-dim);
  box-shadow: var(--shadow-deep), 0 0 36px rgba(207, 166, 75, 0.15);
  margin-bottom: 24px;
  background: #100c09;
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  background-image: url('../assets/bg-charsel.jpg');
  background-size: cover;
  background-position: center 40%;
  filter: brightness(0.42) contrast(1.12) saturate(1.1);
  transform: scale(1.02);
  pointer-events: none;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 45%, rgba(224, 123, 36, 0.18) 0%, transparent 55%),
    linear-gradient(90deg, rgba(10, 8, 6, 0.95) 0%, rgba(12, 9, 7, 0.82) 52%, rgba(12, 9, 7, 0.58) 100%),
    linear-gradient(180deg, rgba(9, 7, 6, 0.35) 0%, transparent 35%, rgba(9, 7, 6, 0.96) 100%);
  pointer-events: none;
}

.hero-embers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 20px;
  padding: 36px 34px 26px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: 100%;
}

.hero-kicker {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(207, 166, 75, 0.15);
  border: 1px solid rgba(239, 208, 123, 0.45);
  color: var(--gold-bright);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
  max-width: 100%;
}

.hero-headline {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.08;
  background: linear-gradient(180deg, #ffffff 0%, #ffe8a3 48%, #cfa64b 88%, #8f6820 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.9));
}

.hero-thai-sub {
  margin: 0 0 12px;
  font-size: clamp(1.12rem, 2.1vw, 1.42rem);
  font-weight: 800;
  color: var(--gold-pale);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.hero-lead {
  margin: 0 0 20px;
  font-size: 0.98rem;
  color: #e4d8c5;
  max-width: 600px;
  line-height: 1.65;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.hero-cta-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  width: 100%;
}

.btn-hero-play {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 32px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f59e0b 0%, #d95b16 50%, #992409 100%);
  border: 2px solid #fde08d;
  color: #fffdf7;
  font-size: 1.24rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  box-shadow:
    0 0 0 3px rgba(64, 24, 7, 0.85),
    0 8px 28px rgba(224, 123, 36, 0.65),
    inset 0 1px 1px rgba(255, 255, 255, 0.5);
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.btn-hero-play:hover {
  color: #ffffff;
  filter: brightness(1.1);
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    0 0 0 3px rgba(92, 36, 10, 0.9),
    0 12px 36px rgba(247, 164, 40, 0.85),
    inset 0 1px 2px rgba(255, 255, 255, 0.65);
}

.btn-hero-play .play-sword {
  font-size: 1.55rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.btn-hero-play .play-label-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.btn-hero-play .play-main-txt {
  font-size: 1.22rem;
  font-weight: 900;
}

.btn-hero-play .play-sub-txt {
  font-size: 0.74rem;
  font-weight: 600;
  color: #fff3d6;
  opacity: 0.92;
}

.btn-hero-sec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  background: rgba(28, 22, 17, 0.88);
  border: 1.5px solid var(--gold-dim);
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 0.94rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.btn-hero-sec:hover {
  background: rgba(46, 37, 28, 0.95);
  border-color: var(--gold-bright);
  color: var(--gold-pale);
  transform: translateY(-1px);
}

.hero-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.perk-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(17, 14, 11, 0.82);
  border: 1px solid var(--iron-border);
  color: var(--text-body);
  font-size: 0.8rem;
}

/* Hero Right: 3 Champions Art Composition */
.hero-champions {
  position: relative;
  height: 330px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  user-select: none;
}

.hero-glow-ring {
  position: absolute;
  width: 290px;
  height: 290px;
  bottom: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 123, 36, 0.28) 0%, rgba(207, 166, 75, 0.08) 55%, transparent 72%);
  border: 1px solid rgba(207, 166, 75, 0.22);
  pointer-events: none;
}

.champ-fig {
  position: absolute;
  bottom: 0;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.92));
}

.champ-fig img {
  width: auto;
  object-fit: contain;
}

.champ-fig.knight {
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
}

.champ-fig.knight img {
  height: 315px;
}

.champ-fig.mage {
  z-index: 2;
  left: 4%;
  bottom: 6px;
}

.champ-fig.mage img {
  height: 265px;
}

.champ-fig.archer {
  z-index: 2;
  right: 4%;
  bottom: 6px;
}

.champ-fig.archer img {
  height: 265px;
}

.hero-champions:hover .champ-fig.knight {
  transform: translateX(-50%) scale(1.03);
}

/* Hero Bottom Telemetry Bar */
.hero-telemetry {
  position: relative;
  z-index: 3;
  background: rgba(14, 11, 8, 0.92);
  border-top: 1px solid rgba(207, 166, 75, 0.3);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.tele-cell {
  padding: 13px 18px;
  border-right: 1px solid var(--iron-dark);
  display: flex;
  align-items: center;
  gap: 12px;
}

.tele-cell:last-child {
  border-right: none;
}

.tele-ico {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2b2219 0%, #17120d 100%);
  border: 1px solid var(--iron-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.tele-info {
  min-width: 0;
  flex: 1;
}

.tele-label {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tele-val {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tele-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   4. Portal Two-Column Bento Grid & Ornate Panels
   ========================================================================== */
.portal-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 22px;
  align-items: start;
}

.portal-col {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.ornate-panel {
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-stone) 100%);
  border: 1px solid var(--iron-border);
  border-top: 2px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 13px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--iron-border);
}

.panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-glyph {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(207, 166, 75, 0.14);
  border: 1px solid var(--gold-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--gold-bright);
  flex-shrink: 0;
}

.panel-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

.panel-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.panel-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  background: rgba(207, 166, 75, 0.1);
  border: 1px solid rgba(207, 166, 75, 0.3);
}

.panel-link:hover {
  background: rgba(207, 166, 75, 0.2);
  border-color: var(--gold-bright);
}

/* ==========================================================================
   5. Top 3 Hall of Fame Podium & Leaderboard
   ========================================================================== */
.rank-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-obsidian);
  border: 1px solid var(--iron-border);
  color: var(--text-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  border-color: var(--gold-dim);
  color: var(--gold-pale);
  background: var(--bg-card);
}

.pill-btn.active {
  background: linear-gradient(180deg, #b88728 0%, #7c5614 100%);
  border-color: var(--gold-bright);
  color: #fff9e6;
  box-shadow: 0 2px 10px rgba(207, 166, 75, 0.3);
}

.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  align-items: stretch;
}

.podium-grid.podium-count-1 {
  grid-template-columns: minmax(0, 340px);
  justify-content: center;
}

.podium-grid.podium-count-2 {
  grid-template-columns: repeat(2, minmax(0, 300px));
  justify-content: center;
}

.podium-card {
  position: relative;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #272019 0%, #16120e 100%);
  border: 1px solid var(--iron-light);
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.podium-card:hover {
  transform: translateY(-2px);
}

.podium-card.rank-1 {
  border: 1.5px solid var(--gold-bright);
  background:
    radial-gradient(circle at 50% 0%, rgba(239, 208, 123, 0.22) 0%, transparent 65%),
    linear-gradient(180deg, #2f2518 0%, #17120c 100%);
  box-shadow: 0 0 22px rgba(207, 166, 75, 0.22);
}

.podium-card.rank-2 {
  border-color: #94a3b8;
  background:
    radial-gradient(circle at 50% 0%, rgba(148, 163, 184, 0.16) 0%, transparent 65%),
    linear-gradient(180deg, #25221e 0%, #15120e 100%);
}

.podium-card.rank-3 {
  border-color: #d97742;
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 119, 66, 0.16) 0%, transparent 65%),
    linear-gradient(180deg, #261f1a 0%, #15120e 100%);
}

.podium-medal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.rank-1 .podium-medal {
  background: rgba(207, 166, 75, 0.25);
  border-color: var(--gold-bright);
  color: var(--gold-pale);
}

.rank-2 .podium-medal {
  color: #e2e8f0;
  border-color: #94a3b8;
}

.rank-3 .podium-medal {
  color: #fed7aa;
  border-color: #d97742;
}

.podium-avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle, #3a2d1e 0%, #120e0a 100%);
  border: 2px solid var(--gold-dim);
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

.rank-1 .podium-avatar {
  width: 90px;
  height: 90px;
  border-color: var(--gold-bright);
  box-shadow: 0 0 16px rgba(239, 208, 123, 0.35);
}

.podium-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.podium-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-1 .podium-name {
  color: var(--gold-pale);
  font-size: 1.06rem;
}

.podium-cls {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.podium-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}

.lv-pill {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(207, 166, 75, 0.16);
  border: 1px solid rgba(207, 166, 75, 0.38);
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 700;
}

.ml-pill {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(192, 132, 252, 0.16);
  border: 1px solid rgba(192, 132, 252, 0.38);
  color: #e9d5ff;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Ranking Table */
.rank-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--iron-border);
  background: var(--bg-obsidian);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.rank-table th {
  background: #19140f;
  color: var(--gold);
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--iron-border);
  white-space: nowrap;
}

.rank-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(63, 52, 41, 0.55);
  color: var(--text-body);
  vertical-align: middle;
}

.rank-table tbody tr:hover {
  background: rgba(207, 166, 75, 0.06);
}

.rank-table tbody tr:last-child td {
  border-bottom: none;
}

.rank-num {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  width: 48px;
}

.rank-char-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mini-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #231c15;
  border: 1px solid var(--iron-light);
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
}

.cls-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.cls-tag.knight {
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.cls-tag.mage {
  background: rgba(192, 132, 252, 0.14);
  border: 1px solid rgba(192, 132, 252, 0.35);
  color: #d8b4fe;
}

.cls-tag.archer {
  background: rgba(74, 222, 128, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #86efac;
}

.guild-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(207, 166, 75, 0.12);
  border: 1px solid rgba(207, 166, 75, 0.3);
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 600;
}

/* ==========================================================================
   6. Live Event Schedule & Countdown Cards
   ========================================================================== */
.event-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-row-card {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--iron-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.event-row-card:hover {
  border-color: var(--gold-dim);
  background: var(--bg-card-hover);
}

.event-row-card.is-next {
  border-color: var(--gold);
  background: linear-gradient(90deg, rgba(207, 166, 75, 0.14) 0%, var(--bg-card) 100%);
  box-shadow: inset 3px 0 0 var(--gold-bright);
}

.event-row-card.is-live {
  border-color: var(--torch-bright);
  background: linear-gradient(90deg, rgba(224, 123, 36, 0.22) 0%, rgba(184, 50, 39, 0.14) 100%);
  box-shadow: 0 0 16px rgba(224, 123, 36, 0.25), inset 3px 0 0 var(--torch-bright);
}

.ev-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ev-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ev-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.ev-name {
  font-weight: 800;
  color: var(--text-main);
  font-size: 0.95rem;
}

.ev-timer-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: var(--bg-obsidian);
  border: 1px solid var(--iron-light);
  color: var(--gold-bright);
  white-space: nowrap;
}

.event-row-card.is-live .ev-timer-badge {
  background: var(--crimson);
  border-color: #fca5a5;
  color: #ffffff;
}

.ev-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.79rem;
  color: var(--text-muted);
}

.ev-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.slot-time {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.73rem;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--iron-dark);
  color: var(--text-muted);
}

.slot-time.upcoming {
  border-color: var(--gold);
  color: var(--gold-pale);
  background: rgba(207, 166, 75, 0.18);
  font-weight: 700;
}

/* ==========================================================================
   7. Server Status & Channels Monitor
   ========================================================================== */
.server-summary-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.srv-metric-box {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-obsidian);
  border: 1px solid var(--iron-border);
  display: flex;
  flex-direction: column;
}

.srv-metric-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.srv-metric-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-bright);
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.channel-grid:last-child {
  margin-bottom: 0;
}

.rank-open-callout {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, rgba(207, 166, 75, 0.12) 0%, rgba(25, 20, 15, 0.9) 100%);
  border: 1px dashed rgba(207, 166, 75, 0.35);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-body);
}

.empty-guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 14px 0;
  text-align: left;
}

.ch-card {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--iron-border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

.ch-name {
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ch-state {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--emerald);
}

.ch-state.busy {
  color: var(--amber);
}

.ch-state.full,
.ch-state.down {
  color: var(--danger);
}

.ch-bar {
  height: 6px;
  border-radius: 999px;
  background: #0e0b08;
  overflow: hidden;
  border: 1px solid var(--iron-dark);
}

.ch-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.3s ease;
}

.ch-bar-fill.busy {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.ch-bar-fill.full {
  background: linear-gradient(90deg, #b91c1c, #f87171);
}

.castle-banner {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(207, 166, 75, 0.16) 0%, rgba(30, 25, 20, 0.95) 100%);
  border: 1px solid var(--gold-dim);
  display: flex;
  align-items: center;
  gap: 12px;
}

.castle-banner img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ==========================================================================
   8. News & Changelog Timeline
   ========================================================================== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.news-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--iron-border);
  border-left: 3px solid var(--gold);
}

.news-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.news-title {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 800;
  color: var(--gold-pale);
}

.news-date {
  padding: 2px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-obsidian);
  border: 1px solid var(--iron-light);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
}

.news-items {
  margin: 0;
  padding-left: 18px;
  color: var(--text-body);
  font-size: 0.92rem;
}

.news-items li {
  margin-bottom: 5px;
}

.news-items li:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   9. Interactive 3-Class & Evolution Showcase
   ========================================================================== */
.class-showcase-box {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: center;
  background:
    radial-gradient(circle at 22% 50%, rgba(207, 166, 75, 0.14) 0%, transparent 65%),
    var(--bg-obsidian);
  border: 1px solid var(--iron-border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.class-stage-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.class-stage-art img {
  height: 230px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.85));
  margin-bottom: 10px;
}

.stage-switch-row {
  display: flex;
  gap: 5px;
  width: 100%;
  justify-content: center;
}

.stage-btn {
  flex: 1;
  padding: 5px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--iron-border);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.stage-btn.active {
  background: rgba(207, 166, 75, 0.2);
  border-color: var(--gold-bright);
  color: var(--gold-pale);
}

.class-details h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  color: var(--gold-pale);
}

.class-evo-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: var(--gold);
}

.class-stat-bars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.cstat-item {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--iron-dark);
  font-size: 0.82rem;
}

.cstat-item strong {
  color: var(--gold-bright);
  display: block;
}

.skill-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--iron-light);
  font-size: 0.81rem;
  color: var(--text-main);
}

.skill-chip img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

/* ==========================================================================
   10. Quick Links & Game Highlights Grid
   ========================================================================== */
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.qlink-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--iron-border);
  color: var(--text-main);
}

.qlink-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.qlink-card img,
.qlink-ico {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.qlink-txt strong {
  display: block;
  font-size: 0.88rem;
  color: var(--gold-pale);
  line-height: 1.2;
}

.qlink-txt span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Filter & Search Bar for Full Pages */
.page-hero-head {
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 85% 20%, rgba(207, 166, 75, 0.16) 0%, transparent 55%),
    linear-gradient(180deg, #221c16 0%, #14100c 100%);
  border: 1px solid var(--gold-dim);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.page-hero-head h1 {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--gold-pale);
}

.page-hero-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.search-field {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-obsidian);
  border: 1px solid var(--iron-light);
  color: var(--text-main);
  font-size: 0.9rem;
  min-width: 240px;
}

.search-field:focus {
  outline: none;
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 2px var(--gold-glow);
}

/* Class Distribution Bar */
.dist-strip {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-obsidian);
  border: 1px solid var(--iron-border);
  margin-bottom: 16px;
}

.dist-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: #0a0806;
  margin: 8px 0;
}

.dist-seg.knight { background: #ef4444; }
.dist-seg.mage { background: #a855f7; }
.dist-seg.archer { background: #22c55e; }

.dist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   11. Footer & Mobile Sticky Navigation
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: #0b0907;
  border-top: 2px solid var(--iron-border);
  padding: 40px 16px 32px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--iron-dark);
}

.footer-brand-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.footer-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold-bright);
}

.footer-tag {
  display: block;
  font-size: 0.76rem;
  color: var(--text-dim);
}

.footer-desc {
  margin: 0 0 16px;
  line-height: 1.65;
}

.footer-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-footer-play {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #d97724 0%, #9a3b12 100%);
  border: 1px solid #f5b864;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
}

.btn-footer-wiki {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--gold-dim);
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 0.88rem;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.footer-col h4 {
  margin: 0 0 10px;
  color: var(--gold-pale);
  font-size: 0.92rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col a {
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--gold-bright);
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-bottom-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Mobile Sticky Bottom Bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 110;
  background: rgba(15, 12, 9, 0.97);
  backdrop-filter: blur(10px);
  border-top: 1.5px solid var(--gold-dim);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.85);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: 4px;
}

.mbar-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 2px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.mbar-link.active {
  color: var(--gold-bright);
}

.mbar-ico {
  font-size: 1.05rem;
  line-height: 1.2;
}

.mbar-play {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f59e0b 0%, #b84312 100%);
  border: 1px solid #fde08d;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.5);
  transform: translateY(-4px);
}

/* ==========================================================================
   12. Responsive Breakpoints (Tablet & Mobile)
   ========================================================================== */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 28px 22px 20px;
  }

  .hero-champions {
    height: 250px;
    margin-top: 4px;
  }

  .champ-fig.knight img { height: 245px; }
  .champ-fig.mage img,
  .champ-fig.archer img { height: 205px; }

  .hero-telemetry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tele-cell:nth-child(2) {
    border-right: none;
  }

  .tele-cell:nth-child(1),
  .tele-cell:nth-child(2) {
    border-bottom: 1px solid var(--iron-dark);
  }

  .portal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 68px;
  }

  .hide-sm {
    display: none !important;
  }

  .main-nav {
    order: 3;
    width: 100%;
    padding-top: 6px;
    border-top: 1px solid var(--iron-dark);
  }

  .podium-grid,
  .podium-grid.podium-count-1,
  .podium-grid.podium-count-2 {
    grid-template-columns: 1fr;
  }

  .podium-card {
    flex-direction: row;
    text-align: left;
    gap: 12px;
    padding: 12px;
  }

  .podium-card.rank-1 {
    order: -1;
  }

  .podium-avatar,
  .rank-1 .podium-avatar {
    width: 64px;
    height: 64px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .podium-body {
    flex: 1;
    min-width: 0;
  }

  .podium-stats {
    justify-content: flex-start;
    margin-top: 4px;
  }

  .class-showcase-box {
    grid-template-columns: 1fr;
  }

  .footer-links-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mobile-bottom-bar {
    display: grid;
  }
}

@media (max-width: 520px) {
  .hide-xs {
    display: none !important;
  }

  .hero-grid {
    padding: 20px 14px 16px;
  }

  .btn-hero-play {
    width: 100%;
    padding: 10px 14px;
    gap: 10px;
  }

  .btn-hero-play .play-main-txt {
    font-size: 1.06rem;
  }

  .btn-hero-sec {
    flex: 1;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .hero-telemetry {
    grid-template-columns: minmax(0, 1fr);
  }

  .tele-cell {
    border-right: none !important;
    border-bottom: 1px solid var(--iron-dark);
    padding: 10px 14px;
  }

  .tele-cell:last-child {
    border-bottom: none;
  }

  .channel-grid,
  .quick-links-grid,
  .class-stat-bars,
  .footer-links-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ornate-panel {
    padding: 15px 14px;
  }

  .toolbar-row .search-field {
    width: 100%;
  }
}
