:root {
  --bg: #04060c;
  --bg-2: #0a0f1c;
  --glass: rgba(18, 24, 42, 0.55);
  --glass-strong: rgba(14, 19, 34, 0.82);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #eef2ff;
  --muted: #8b96b5;
  --violet: #2f6bff;
  --cyan: #38bdf8;
  --mint: #3dffb5;
  --gold: #ffc94a;
  --red: #ff4d6d;
  /* brand gradient — matches the gold of the GLOBUS logo */
  --grad: linear-gradient(100deg, #fff1c9, #f0c060 35%, #c98f35 65%, #fff1c9);
  --radius: 20px;
  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font: inherit; color: inherit; }
::placeholder { color: var(--muted); opacity: .85; }
input:disabled, select:disabled, textarea:disabled { color: var(--muted); -webkit-text-fill-color: var(--muted); opacity: 1; cursor: not-allowed; }
select option { background: #0e1322; color: var(--text); }
.mono { font-family: var(--font-mono); }

.grad {
  background: var(--grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 0 rgba(255, 77, 109, .7);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(255, 77, 109, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0); }
}

.flag { width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; flex-shrink: 0; }
.cur-flag { width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.15); }

/* ===== Loader ===== */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; align-content: center; gap: 22px;
  background: var(--bg);
  transition: opacity .8s ease, visibility .8s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-orb { position: relative; width: 90px; height: 90px; display: grid; place-items: center; }
.loader-orb::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--gold), #fff3cf, transparent 70%);
  -webkit-mask: radial-gradient(circle, transparent 66%, #000 68%);
  mask: radial-gradient(circle, transparent 66%, #000 68%);
  animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { font-family: var(--font-display); font-weight: 900; letter-spacing: 10px; font-size: 22px; }

/* ===== Navigation ===== */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(1320px, calc(100% - 28px));
  height: 62px; padding: 0 10px 0 16px;
  display: flex; align-items: center; gap: 14px;
  border-radius: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-orb {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); font-size: 22px; color: #061022;
  box-shadow: 0 0 24px rgba(255, 201, 74, .45);
}
.brand-text { font-family: var(--font-display); font-weight: 900; font-size: 19px; letter-spacing: 3px; }
.brand-text.small { font-size: 14px; }

.nav-links { display: flex; gap: 2px; margin-left: 8px; min-width: 0; }
.nav-links a {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 11px; border-radius: 12px; white-space: nowrap;
  color: var(--muted); font-weight: 500; transition: color .2s, background .2s;
}
.nav-links a i { font-size: 19px; }
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav-links a.active { color: var(--text); background: rgba(255, 255, 255, .08); }
.nav-links a.active i { color: var(--cyan); }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pill {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 14px;
}
.pill small { color: var(--muted); font-size: 11px; }
.pill.gold i { color: var(--gold); font-size: 19px; filter: drop-shadow(0 0 6px rgba(255, 201, 74, .6)); }
.pill.bump, .wallet-row.bump { animation: bump .5s; }
@keyframes bump { 40% { transform: scale(1.12); border-color: var(--mint); } }

.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; font-size: 20px; color: var(--muted);
  transition: color .2s, background .2s;
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.icon-btn[data-badge]::after {
  content: attr(data-badge); position: absolute; top: 5px; right: 5px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px;
}
.burger { display: none; }

.avatar-mini {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; overflow: hidden;
  display: grid; place-items: center; font-size: 17px;
  background: var(--grad); color: #061022; font-family: var(--font-display); font-weight: 900;
}
.avatar-mini img { width: 100%; height: 100%; object-fit: cover; }

/* The profile picture in the top bar (every page has it, so it lives here) */
.nav-avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: var(--grad); color: #1f1400; font-family: var(--font-display); font-weight: 900; flex-shrink: 0; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nav-avatar.active { box-shadow: 0 0 0 2px var(--gold); }


/* ===== Hero ===== */
.hero { position: relative; height: 100vh; min-height: 760px; overflow: hidden; }

.stars {
  position: absolute; inset: 0;
  background:
    radial-gradient(1px 1px at 12% 22%, #fff9, transparent),
    radial-gradient(1px 1px at 72% 12%, #fff8, transparent),
    radial-gradient(1.5px 1.5px at 33% 78%, #fffa, transparent),
    radial-gradient(1px 1px at 88% 66%, #fff7, transparent),
    radial-gradient(1px 1px at 52% 42%, #fff5, transparent),
    radial-gradient(1.5px 1.5px at 6% 88%, #fff8, transparent),
    radial-gradient(1px 1px at 94% 32%, #fff9, transparent),
    radial-gradient(ellipse at 50% 55%, rgba(34, 211, 255, .12), transparent 55%),
    radial-gradient(ellipse at 15% 10%, rgba(47, 107, 255, .22), transparent 50%),
    radial-gradient(ellipse at 90% 90%, rgba(61, 255, 181, .1), transparent 50%);
  background-size: 400px 400px, 500px 500px, 600px 600px, 450px 450px, 350px 350px, 550px 550px, 480px 480px, auto, auto, auto;
}

#globe { position: absolute; inset: 150px 0 0 0; z-index: 0; }
#globe canvas { cursor: grab; }
#globe canvas:active { cursor: grabbing; }

.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; pointer-events: none;
  background: linear-gradient(transparent, var(--bg));
}

.hero-title {
  position: absolute; top: 100px; left: 50%; transform: translateX(-50%); z-index: 5;
  text-align: center; pointer-events: none; width: min(560px, 90%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px; color: var(--muted);
}
.hero-title h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(26px, 2.9vw, 42px); line-height: 1.08; letter-spacing: -1px;
  margin: 14px 0 10px; text-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}
.hero-title p { color: var(--muted); font-size: 15px; }

.panel { position: absolute; z-index: 6; border-radius: var(--radius); padding: 18px; }

/* Player panel */
.player-panel { left: max(14px, calc(50% - 660px)); top: 96px; width: 290px; }
.player-head { display: flex; align-items: center; gap: 14px; }
.ring {
  --p: 50%;
  position: relative; width: 70px; height: 70px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--cyan) var(--p), rgba(255, 255, 255, .08) 0);
  display: grid; place-items: center; transition: --p .6s;
}
.ring-inner {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, #1c2640, #0b1020);
  font-family: var(--font-display); font-weight: 900; font-size: 24px;
}
.ring-lvl {
  position: absolute; bottom: -4px; right: -4px;
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--gold); color: #1a1200; font-weight: 800; font-size: 12px;
  border: 2px solid var(--bg-2);
}
.player-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.player-rank { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 5px; margin: 2px 0 4px; }
.player-rank i { color: var(--gold); }
.player-country { display: flex; align-items: center; gap: 6px; font-size: 13px; }

.xp-line { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin: 14px 0 12px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
  padding: 10px 4px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
}
.stat i { font-size: 20px; color: var(--cyan); }
.stat b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat small { color: var(--muted); font-size: 10.5px; }

.health { margin: 14px 0; }
.health-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.health-top i { color: var(--red); }
.health-bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.health-bar div {
  height: 100%; border-radius: 8px; transition: width .5s;
  background: linear-gradient(90deg, #ff4d6d, #ff8a5c 50%, #3dffb5);
  background-size: 290px 100%;
}

.wallet { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wallet-row {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); min-width: 0;
}
.wallet-row b { display: block; font-size: 14px; }
.wallet-row small { color: var(--muted); font-size: 10.5px; letter-spacing: 1px; }
.coin { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; }
.gold-coin { background: radial-gradient(circle at 30% 30%, #ffe599, #e0a100); color: #6b4a00; font-size: 16px; box-shadow: 0 0 16px rgba(255, 201, 74, .4); }

.tasks-title { margin: 16px 0 8px; font-size: 11px; letter-spacing: 1.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.tasks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.task {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 6px; border-radius: 14px;
  background: linear-gradient(145deg, rgba(47, 107, 255, .25), rgba(34, 211, 255, .12));
  border: 1px solid rgba(47, 107, 255, .4);
  font-weight: 600; transition: transform .15s, box-shadow .2s;
}
.task:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(47, 107, 255, .35); }
.task:active { transform: scale(.97); }
.task small { color: var(--muted); font-weight: 400; font-size: 11px; }
.task-emoji { font-size: 24px; }
.task.done { background: rgba(61, 255, 181, .1); border-color: rgba(61, 255, 181, .4); cursor: default; transform: none; box-shadow: none; }
.task.done small { color: var(--mint); }

/* Feed panel */
.feed-panel {
  right: max(14px, calc(50% - 660px)); top: 96px; width: 330px;
  max-height: calc(100vh - 190px); display: flex; flex-direction: column;
}
.seg {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line);
}
.seg button { position: relative; z-index: 1; padding: 7px 0; font-size: 12px; font-weight: 600; color: var(--muted); transition: color .2s; }
.seg button.active { color: var(--text); }
.seg-glider {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 4);
  border-radius: 9px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line-strong);
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1);
}

.feed { margin-top: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.feed-item {
  display: flex; gap: 12px; padding: 12px; border-radius: 14px;
  background: rgba(255, 255, 255, .035); border: 1px solid transparent;
  transition: background .2s, border-color .2s, transform .2s;
  animation: slideIn .4s both;
}
.feed-item:hover { background: rgba(255, 255, 255, .06); border-color: var(--line); transform: translateX(-3px); }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } }
.feed-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center;
  background: rgba(34, 211, 255, .1); color: var(--cyan); font-size: 20px;
}
.feed-item p { font-size: 13px; line-height: 1.4; font-weight: 500; }
.feed-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; color: var(--muted); font-size: 11.5px; }
.feed-battle { flex-direction: column; gap: 8px; }
.fb-top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; }
.fb-top .vs { color: var(--muted); font-size: 11px; }
.fb-side { display: flex; align-items: center; gap: 6px; }

/* Battle bar (shared) */
.bbar { position: relative; height: 8px; border-radius: 8px; overflow: hidden; background: #3a1420; }
.bbar div {
  height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, #ff4d6d, #ff8a5c);
  box-shadow: 0 0 12px rgba(255, 77, 109, .6); transition: width .5s;
}
.bbar.def { background: linear-gradient(90deg, #22d3ff, #3dffb5); }
.bbar.def div { background: linear-gradient(90deg, #ff4d6d, #ff8a5c); }
.fb-bottom { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; }

/* Globe controls, hint, ticker */
.globe-ctrl {
  position: absolute; z-index: 6; right: max(14px, calc(50% - 660px)); bottom: 88px;
  display: flex; flex-direction: column; padding: 5px; border-radius: 14px;
}
.globe-ctrl button { width: 38px; height: 38px; border-radius: 10px; font-size: 18px; color: var(--muted); }
.globe-ctrl button:hover { color: var(--text); background: rgba(255, 255, 255, .08); }

.hero-hint {
  position: absolute; z-index: 5; bottom: 96px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; pointer-events: none;
  animation: float 3s ease-in-out infinite;
}
.hero-hint i { font-size: 18px; }
@keyframes float { 50% { transform: translate(-50%, -5px); } }

.ticker {
  position: absolute; z-index: 7; left: 50%; bottom: 22px; transform: translateX(-50%);
  width: min(1320px, calc(100% - 28px)); height: 48px; border-radius: 14px;
  display: flex; align-items: center; overflow: hidden;
}
.ticker-label {
  display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 16px;
  font-weight: 800; font-size: 12px; letter-spacing: 2px; border-right: 1px solid var(--line);
  background: rgba(255, 77, 109, .1); flex-shrink: 0;
}
.ticker-viewport {
  flex: 1; overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.ticker-track { display: flex; gap: 40px; width: max-content; animation: ticker 50s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; }
.ticker-item b { font-family: var(--font-mono); }
.up { color: var(--mint); }
.down { color: var(--red); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Globe tooltip (globe.gl) */
.float-tooltip-kap, .scene-tooltip {
  background: var(--glass-strong) !important; border: 1px solid var(--line-strong);
  border-radius: 14px !important; padding: 10px 12px !important;
  backdrop-filter: blur(14px); font-family: var(--font-body) !important; color: var(--text) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.float-tooltip-kap:empty, .scene-tooltip:empty { display: none; }
.gt-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.gt-head img { width: 22px; height: 22px; border-radius: 50%; }
.gt-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.gt-war { color: var(--red); font-size: 12px; margin-top: 4px; font-weight: 600; }


/* ===== Country drawer ===== */
.drawer {
  position: fixed; z-index: 60; top: 90px; right: 14px; bottom: 14px; width: 360px;
  border-radius: var(--radius); padding: 22px; overflow-y: auto;
  background: var(--glass-strong);
  transform: translateX(calc(100% + 30px)); transition: transform .5s cubic-bezier(.2, .9, .2, 1);
}
.drawer.open { transform: none; }
.drawer-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-size: 18px; background: rgba(255, 255, 255, .06);
}
.drawer-close:hover { background: rgba(255, 255, 255, .12); }
.dr-flag { width: 84px; height: 84px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255, 255, 255, .08), 0 10px 40px rgba(34, 211, 255, .25); }
.dr-noflag { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 44px; background: rgba(255,255,255,.06); color: var(--cyan); }
.dr-name { font-family: var(--font-display); font-weight: 900; font-size: 26px; margin: 16px 0 4px; line-height: 1.1; }
.dr-sub { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dr-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600; }
.dr-badge.mine { background: rgba(255, 201, 74, .15); color: var(--gold); }
.dr-badge.war { background: rgba(255, 77, 109, .15); color: var(--red); }
.dr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 20px 0; }
.dr-stat { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.dr-stat small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11.5px; }
.dr-stat b { display: block; margin-top: 4px; font-size: 15px; font-family: var(--font-mono); }
.dr-actions { display: grid; gap: 8px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 13px; font-weight: 700; width: 100%;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); background-size: 200% auto; color: #1f1400; box-shadow: 0 8px 30px rgba(255, 201, 74, .25); }
.btn.primary:hover { background-position: right center; box-shadow: 0 10px 40px rgba(255, 201, 74, .45); }
.btn.ghost { background: rgba(255, 255, 255, .06); border: 1px solid var(--line-strong); }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.btn.danger { background: linear-gradient(100deg, #ff4d6d, #ff8a5c); color: #1a0008; box-shadow: 0 8px 30px rgba(255, 77, 109, .35); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ===== Dashboard ===== */
.dashboard { position: relative; width: min(1320px, calc(100% - 28px)); margin: 40px auto 0; }
.section-head { text-align: center; margin-bottom: 36px; }
.kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); font-size: 12px; font-weight: 700; letter-spacing: 2px; }
.section-head h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(26px, 3.5vw, 44px); letter-spacing: -1px; margin-top: 10px; }

.bento {
  display: grid; gap: 16px;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(120px, auto);
  perspective: 1400px;
}
.card {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden;
  padding: 22px; border-radius: 24px;
  background:
    radial-gradient(500px circle at var(--mx) var(--my), rgba(34, 211, 255, .09), transparent 40%),
    linear-gradient(160deg, rgba(24, 31, 54, .9), rgba(10, 14, 26, .95));
  border: 1px solid var(--line);
  transform-style: preserve-3d;
  transition: transform .25s ease, border-color .3s;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(300px circle at var(--mx) var(--my), rgba(34, 211, 255, .6), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s;
}
.card:hover::before { opacity: 1; }
.card-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 16px; }
.card-head i { font-size: 22px; color: var(--cyan); }
.tag { margin-left: auto; padding: 3px 9px; border-radius: 8px; background: rgba(255, 201, 74, .12); color: var(--gold); font-size: 11px; letter-spacing: 1px; }

.c-battle    { grid-column: span 7; grid-row: span 2; }
.c-election  { grid-column: span 5; grid-row: span 2; }
.c-market    { grid-column: span 4; grid-row: span 2; }
.c-companies { grid-column: span 4; grid-row: span 2; }
.c-leaders   { grid-column: span 4; grid-row: span 2; }
.c-shouts    { grid-column: span 12; }

/* Battle card */
.c-battle { background:
    radial-gradient(500px circle at var(--mx) var(--my), rgba(255, 77, 109, .12), transparent 40%),
    radial-gradient(ellipse at 100% 0%, rgba(255, 77, 109, .18), transparent 55%),
    linear-gradient(160deg, rgba(34, 20, 38, .95), rgba(10, 14, 26, .95)); }
.bt-live { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 99px; background: rgba(255, 77, 109, .14); color: var(--red); font-size: 11px; font-weight: 800; letter-spacing: 1.5px; }
.bt-region { font-family: var(--font-display); font-weight: 900; font-size: clamp(24px, 3vw, 38px); margin: 14px 0 4px; }
.bt-sub { color: var(--muted); }
.bt-arena { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin: 28px 0 18px; }
.bt-side { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.bt-side img { width: 76px; height: 76px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); transition: transform .2s; }
.bt-side.att img { box-shadow: 0 0 0 4px rgba(255, 77, 109, .35), 0 0 40px rgba(255, 77, 109, .4); }
.bt-side.def img { box-shadow: 0 0 0 4px rgba(34, 211, 255, .35), 0 0 40px rgba(34, 211, 255, .4); }
.bt-side b { font-size: 15px; }
.bt-side small { color: var(--muted); font-size: 12px; }
.bt-pct { font-family: var(--font-mono); font-size: 22px; font-weight: 700; }
.bt-side.att .bt-pct { color: var(--red); }
.bt-side.def .bt-pct { color: var(--cyan); }
.bt-vs { font-family: var(--font-display); font-weight: 900; font-size: 30px; color: rgba(255, 255, 255, .15); }
.bt-bar { height: 14px; border-radius: 14px; overflow: hidden; display: flex; background: rgba(255, 255, 255, .06); }
.bt-bar .a { background: linear-gradient(90deg, #ff4d6d, #ff8a5c); box-shadow: 0 0 20px rgba(255, 77, 109, .6); transition: width .5s cubic-bezier(.3, 1.4, .5, 1); }
.bt-bar .d { flex: 1; background: linear-gradient(90deg, #22d3ff, #3dffb5); }
.bt-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.bt-timer { font-family: var(--font-mono); font-size: 28px; font-weight: 700; }
.bt-timer small { display: block; font-family: var(--font-body); font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 1px; }
.bt-actions { display: flex; gap: 8px; }
.bt-foot .btn { width: auto; min-width: 190px; height: 52px; font-size: 15px; }
.bt-damage { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.bt-damage b { color: var(--text); font-family: var(--font-mono); }
.dmg-pop {
  position: absolute; z-index: 5; pointer-events: none;
  font-family: var(--font-display); font-weight: 900; font-size: 22px; color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 201, 74, .8);
  animation: dmgPop 1s ease-out forwards;
}
@keyframes dmgPop { from { opacity: 1; transform: translate(-50%, 0) scale(.8); } to { opacity: 0; transform: translate(-50%, -80px) scale(1.3); } }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Election card */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.cd-box { text-align: center; padding: 12px 0; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.cd-box b { display: block; font-family: var(--font-mono); font-size: 26px; font-weight: 700; }
.cd-box small { color: var(--muted); font-size: 10.5px; letter-spacing: 1.5px; }
.candidates { display: grid; gap: 12px; margin-bottom: 18px; }
.cand { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; }
.cand-av { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #061022; }
.cand-name { font-weight: 600; font-size: 13.5px; }
.cand-party { color: var(--muted); font-size: 11.5px; }
.cand-bar { grid-column: 2 / 4; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; margin-top: -4px; }
.cand-bar div { height: 100%; border-radius: 6px; transition: width 1s cubic-bezier(.2, .9, .2, 1); }
.cand-pct { font-family: var(--font-mono); font-weight: 700; }
.vote-btn { margin-left: 6px; padding: 3px 9px; border-radius: 8px; background: rgba(255, 255, 255, .07); font-size: 11px; font-weight: 700; }
.vote-btn:hover { background: rgba(255, 255, 255, .14); }
.vote-btn.voted { background: var(--mint); color: #061022; }

/* Market card */
.market { display: grid; gap: 6px; }
.mk-row {
  display: grid; grid-template-columns: 34px 1fr 80px 70px; align-items: center; gap: 10px;
  padding: 8px; border-radius: 12px; transition: background .2s;
}
.mk-row:hover { background: rgba(255, 255, 255, .04); }
.mk-emoji { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); font-size: 18px; }
.mk-name { font-weight: 600; font-size: 13.5px; }
.mk-name small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.mk-spark { width: 80px; height: 30px; }
.mk-price { text-align: right; font-family: var(--font-mono); font-size: 13px; }
.mk-price small { display: block; font-size: 11px; }

/* Companies card */
.chains { display: grid; gap: 10px; margin-bottom: 18px; }
.chain { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; gap: 6px; }
.chain-node { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); text-align: center; }
.chain-node span { font-size: 26px; }
.chain-node small { font-size: 11.5px; font-weight: 600; }
.chain-arrow { position: relative; height: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; border-radius: 2px; }
.chain-arrow::after {
  content: ''; position: absolute; top: 0; left: -40%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: flow 1.6s linear infinite;
}
@keyframes flow { to { left: 100%; } }
.chain-note { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: 11.5px; margin-top: -2px; }

/* Leaders card */
.leaders { display: grid; gap: 8px; }
.ld-row { display: grid; grid-template-columns: 22px 26px 1fr auto; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.ld-row:hover { background: rgba(255, 255, 255, .04); }
.ld-rank { font-family: var(--font-mono); color: var(--muted); font-weight: 700; }
.ld-row:nth-child(1) .ld-rank { color: var(--gold); }
.ld-row:nth-child(2) .ld-rank { color: #d9e2ff; }
.ld-row:nth-child(3) .ld-rank { color: #e3a26a; }
.ld-row img { width: 26px; height: 26px; border-radius: 50%; }
.ld-name { font-weight: 600; font-size: 13.5px; }
.ld-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .06); margin-top: 5px; overflow: hidden; }
.ld-bar div { height: 100%; background: var(--grad); border-radius: 4px; }
.ld-score { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }

/* Shouts */
.composer { display: flex; gap: 8px; }
.composer input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line); outline: none; transition: border-color .2s;
}
.composer input:focus { border-color: var(--cyan); }
.composer button { width: 44px; height: 44px; border-radius: 12px; background: var(--grad); color: #061022; font-size: 18px; }
.shouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 14px; }
.shout { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); animation: slideIn .4s both; }
.shout-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.shout-head span { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: auto; }
.shout p { margin: 8px 0 10px; line-height: 1.45; font-size: 13.5px; }
.like { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .05); font-size: 12px; color: var(--muted); transition: all .2s; }
.like:hover { color: var(--text); }
.like.liked { color: var(--red); background: rgba(255, 77, 109, .12); }
.like.liked i { animation: bump .4s; }

.footer {
  display: flex; justify-content: space-between; align-items: center;
  width: min(1320px, calc(100% - 28px)); margin: 60px auto 0; padding: 26px 0 40px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px;
}

/* ===== Chat ===== */
.chat-fab {
  position: fixed; z-index: 40; right: 22px; bottom: 90px;
  width: 56px; height: 56px; border-radius: 18px;
  background: var(--grad); color: #061022; font-size: 26px;
  box-shadow: 0 10px 40px rgba(255, 201, 74, .35); transition: transform .2s;
}
.chat-fab:hover { transform: translateY(-3px) rotate(-6deg); }
.chat {
  position: fixed; z-index: 45; right: 22px; bottom: 90px; width: 330px;
  border-radius: var(--radius); padding: 14px; background: var(--glass-strong);
  transform-origin: bottom right; transform: scale(.6); opacity: 0; pointer-events: none;
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), opacity .2s;
}
.chat.open { transform: none; opacity: 1; pointer-events: auto; }
.chat-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 10px; }
.chat-head span { display: flex; align-items: center; gap: 8px; }
.chat-head button { font-size: 18px; color: var(--muted); }
.chat-messages { height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; scrollbar-width: thin; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: rgba(255, 255, 255, .06); font-size: 13px; }
.msg b { display: block; font-size: 11px; color: var(--cyan); margin-bottom: 2px; }
.msg.me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: linear-gradient(135deg, rgba(47, 107, 255, .5), rgba(34, 211, 255, .35)); }
.msg.me b { color: #fff; }

/* ===== Toasts ===== */
.toasts { position: fixed; z-index: 200; top: 90px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px;
  background: var(--glass-strong); border: 1px solid var(--line-strong); backdrop-filter: blur(14px);
  font-weight: 600; box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  animation: toastIn .45s cubic-bezier(.3, 1.4, .5, 1), toastOut .4s ease 2.6s forwards;
}
.toast span { font-size: 20px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .9, .2, 1); }
.reveal.visible { opacity: 1; transform: none; }
.hero-title.reveal { transform: translate(-50%, 24px); }
.hero-title.reveal.visible { transform: translate(-50%, 0); }

/* ===== Responsive ===== */
@media (max-width: 1600px) {
  .nav { gap: 10px; }
  .nav .brand-text { display: none; }
  .nav-links { margin-left: 0; }
  .nav-links a { padding: 9px 9px; gap: 6px; }
}
@media (max-width: 1200px) {
  .nav-links a span { display: none; }
  .c-battle, .c-election { grid-column: span 12; }
  .c-market, .c-companies, .c-leaders { grid-column: span 6; }
  .c-leaders { grid-column: span 12; }
}

@media (max-width: 1000px) {
  .nav .icon-btn[data-badge], .avatar-mini, .brand-text { display: none; }
  .hero { height: auto; min-height: 0; display: flex; flex-direction: column; padding: 90px 14px 20px; gap: 14px; }
  #globe { position: relative; inset: auto; height: 62vh; min-height: 420px; order: 1; margin: 0 -14px; }
  .hero-title { position: relative; top: 0; left: 0; transform: none; width: 100%; order: 0; margin: 10px auto 0; }
  .hero-title.reveal, .hero-title.reveal.visible { transform: none; }
  .panel { position: relative; left: auto !important; right: auto !important; top: auto; width: 100%; max-height: none; }
  .player-panel { order: 2; }
  .feed-panel { order: 3; }
  .globe-ctrl { top: 520px; bottom: auto; }
  .hero-hint { display: none; }
  .ticker { position: relative; order: 4; left: auto; bottom: auto; transform: none; width: 100%; }
  .hero::after { display: none; }
  .drawer { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 75vh; transform: translateY(calc(100% + 30px)); }
  .drawer.open { transform: none; }
}

@media (max-width: 700px) {
  .nav { height: 56px; gap: 8px; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
    padding: 8px; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a span { display: inline; }
  .burger { display: grid; }
  .brand-text { display: none; }
  .pill { padding: 0 10px; height: 36px; font-size: 13px; }
  .pill small { display: none; }
  .nav .icon-btn[data-badge], .avatar-mini { display: none; }
  .c-market, .c-companies, .c-leaders { grid-column: span 12; }
  .bt-foot { flex-direction: column; align-items: stretch; }
  .bt-foot .btn { width: 100%; }
  .chat { left: 10px; right: 10px; width: auto; }
  .footer { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 700px) { .bt-actions { flex-direction: column; } }


/* ===== Region block in the drawer ===== */
.dr-region { margin-top: 18px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.dr-region-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 16px; }
.dr-region-head i { color: var(--cyan); font-size: 20px; }
.dr-badge.cap { background: rgba(255, 201, 74, .15); color: var(--gold); }
.dr-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); color: var(--muted); font-size: 12.5px; }
.dr-note.ok { background: rgba(61, 255, 181, .08); color: var(--mint); }
.dr-note.warn { background: rgba(255, 77, 109, .08); color: var(--red); }
.dr-borders-title { margin: 14px 0 8px; font-size: 11px; letter-spacing: 1.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.dr-borders { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-size: 12px; font-weight: 500;
  transition: background .2s, border-color .2s;
}
.dr-chip:hover { background: rgba(255, 255, 255, .12); }
.dr-chip img { width: 16px; height: 16px; border-radius: 50%; }
.dr-chip.foreign { border-color: rgba(255, 77, 109, .45); }
.dr-empty { color: var(--muted); font-size: 12.5px; }

/* Notifications */
.bell-panel { position: fixed; z-index: 80; width: min(360px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; padding: 10px; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.bell-head { font-weight: 700; font-size: 13px; padding: 4px 8px 8px; color: var(--muted); letter-spacing: 1px; }
.bell-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: start; padding: 9px 8px; border-radius: 12px; font-size: 13px; color: var(--text); }
.bell-item:hover { background: rgba(255, 255, 255, .05); }
.bell-item.unread { background: rgba(255, 201, 74, .07); }
.bell-item span { font-size: 17px; }
.bell-item p { line-height: 1.35; }
.bell-item small { color: var(--muted); font-size: 11px; }
.bell-empty { padding: 10px; color: var(--muted); font-size: 13px; }
.cand-sub { font-size: 11px; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin: 10px 0 4px; text-transform: uppercase; }

/* ===== Tutorial ===== */
.tut-spot { position: fixed; z-index: 150; border-radius: 16px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(2, 4, 10, .66), 0 0 0 2px var(--gold), 0 0 30px rgba(255, 201, 74, .6); transition: all .25s ease; }
.tut-card { position: fixed; z-index: 160; width: min(340px, calc(100vw - 24px)); padding: 16px; border-radius: 18px; background: linear-gradient(160deg, #1a2340, #0b1020); border: 1px solid rgba(255, 201, 74, .45); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); animation: tutIn .35s both; }
.tut-card b { display: block; font-family: var(--font-display); font-size: 16px; margin: 4px 0 6px; }
.tut-card p { color: #c6cfe8; font-size: 13.5px; line-height: 1.5; }
.tut-count { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.tut-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.tut-actions .btn { width: auto; height: 38px; padding: 0 16px; font-size: 13px; display: inline-flex; align-items: center; }
.tut-skip { color: var(--muted); font-size: 12px; text-decoration: underline; }
.tut-hint { color: var(--gold); font-size: 12.5px; font-weight: 600; }
.tut-center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 24px)); }
.tut-center::before { content: ''; position: fixed; inset: -100vmax; z-index: -1; background: rgba(2, 4, 10, .66); }
.tut-dock { right: 18px; bottom: 18px; }
.tut-pulse { position: relative; box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(255, 201, 74, .7); border-radius: 12px; animation: tutPulse 1.2s ease-in-out infinite; }
@keyframes tutIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tut-center { animation: none; }
@keyframes tutPulse { 50% { box-shadow: 0 0 0 2px var(--gold), 0 0 4px rgba(255, 201, 74, .2); } }

/* Product pictures (img/res/…) shown wherever an emoji used to be */
.res-art { width: 24px; height: 24px; object-fit: contain; vertical-align: -6px; }
.res-art.sm { width: 19px; height: 19px; vertical-align: -4px; }
.res-art.big { width: 100%; height: 100%; vertical-align: 0; }
.res-emoji { display: inline-block; }
.res-art.res-emoji, .res-art.sm.res-emoji, .res-art.big.res-emoji { width: auto; height: auto; }
.res-chip span .res-art, .inv-item span .res-art { width: 30px; height: 30px; }
.supply span .res-art { width: 22px; height: 22px; }
