/* ============================================================
   Mega OTS — dark fantasy AAA
   Paleta: głęboka czerń + krwawa czerwień + stare złoto
   ============================================================ */
:root {
  --bg: #08060a;
  --bg-2: #0e0a10;
  --surface: #141017;
  --surface-2: #1b141d;
  --border: #2a2130;
  --border-hot: rgba(214, 69, 55, 0.35);
  --text: #d9d4dc;
  --text-muted: #8d8496;
  --ember: #e0492f;
  --ember-bright: #ff7a4d;
  --crimson: #a11c2e;
  --gold: #d9b06a;
  --gold-bright: #f0d194;
  --success: #58c98c;
  --error: #e06b66;
  --font-display: "Cinzel", "Georgia", serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* ===== One-page (htmx) ===== */
/* pasek postępu na czas ładowania treści */
.nav-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--crimson), var(--ember-bright));
  box-shadow: 0 0 12px rgba(255, 122, 77, 0.8);
  z-index: 100;
  opacity: 0;
  transition: width 0.25s ease, opacity 0.2s;
}
body.htmx-request .nav-progress { width: 70%; opacity: 1; }

/* płynne wejście podmienionej treści */
body.htmx-settling main.content,
body.htmx-settling .hero,
body.htmx-settling .sidebar {
  animation: page-in 0.28s ease-out;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

html { scrollbar-color: var(--border) var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15.5px/1.65 var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; width: 100%; }

a { color: var(--gold); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--gold-bright); }

/* ===== Topbar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 6, 10, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(214, 69, 55, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: 0 0 18px rgba(224, 73, 47, 0.35);
}
.brand-rune { color: var(--ember); font-size: 1rem; }
.nav { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav a:hover { color: var(--ember-bright); }
.nav-cta {
  background: linear-gradient(180deg, var(--ember-bright), var(--crimson));
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  font-weight: 600;
  box-shadow: 0 0 18px rgba(224, 73, 47, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 122, 77, 0.6);
}
.nav-cta:hover { filter: brightness(1.12); }
.nav-account { color: var(--gold-bright) !important; font-weight: 600; }
.nav-online {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.85rem;
  border: 1px solid var(--border-hot);
  border-radius: 999px;
  background: rgba(20, 16, 23, 0.7);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.nav-online strong { color: var(--ember-bright); }
.nav-muted { color: var(--text-muted) !important; font-size: 0.78rem !important; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 2.6rem 0 2.4rem;
  background:
    radial-gradient(900px 420px at 20% 0%, rgba(161, 28, 46, 0.28), transparent 60%),
    radial-gradient(1000px 500px at 80% 10%, rgba(224, 73, 47, 0.16), transparent 60%),
    radial-gradient(700px 380px at 50% 110%, rgba(217, 176, 106, 0.08), transparent 70%),
    linear-gradient(180deg, #120a10 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border-hot);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; }
.hero-kicker {
  margin: 0 0 0.6rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}
.hero-logo-wrap { margin: 0; line-height: 0; }
.hero-logo-wrap { margin-bottom: 1.2rem; }
.hero-logo-img {
  width: min(360px, 78vw);
  height: auto;
  filter: drop-shadow(0 10px 40px rgba(224, 73, 47, 0.4)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
  animation: logo-breathe 5s ease-in-out infinite;
}
@keyframes logo-breathe {
  0%, 100% { filter: drop-shadow(0 10px 40px rgba(224, 73, 47, 0.35)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8)); }
  50%      { filter: drop-shadow(0 10px 55px rgba(255, 122, 77, 0.55)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8)); }
}
.hero-logo {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 9vw, 5.5rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.05;
  background: linear-gradient(180deg, #fff3d6 0%, var(--gold-bright) 35%, var(--gold) 55%, #7d5a2c 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 22px rgba(224, 73, 47, 0.35)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
}
.hero-tag {
  margin: 0.9rem 0 1.6rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border-hot);
  border-radius: 999px;
  background: rgba(20, 16, 23, 0.7);
  font-size: 0.92rem;
  margin-bottom: 1.8rem;
}
.hero-status strong { color: var(--ember-bright); }
.hero-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* żar unoszący się w hero */
.hero-embers { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-embers span {
  position: absolute;
  bottom: -8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ember-bright);
  box-shadow: 0 0 10px 2px rgba(255, 122, 77, 0.55);
  opacity: 0;
  animation: ember-rise 9s linear infinite;
}
.hero-embers span:nth-child(1)  { left: 6%;  animation-delay: 0s;   animation-duration: 10s; }
.hero-embers span:nth-child(2)  { left: 16%; animation-delay: 2.2s; width: 3px; height: 3px; }
.hero-embers span:nth-child(3)  { left: 27%; animation-delay: 4.8s; animation-duration: 12s; }
.hero-embers span:nth-child(4)  { left: 38%; animation-delay: 1.4s; width: 4px; height: 4px; }
.hero-embers span:nth-child(5)  { left: 49%; animation-delay: 6.3s; }
.hero-embers span:nth-child(6)  { left: 58%; animation-delay: 3.1s; animation-duration: 11s; width: 3px; height: 3px; }
.hero-embers span:nth-child(7)  { left: 69%; animation-delay: 0.8s; }
.hero-embers span:nth-child(8)  { left: 78%; animation-delay: 5.2s; width: 4px; height: 4px; }
.hero-embers span:nth-child(9)  { left: 88%; animation-delay: 2.9s; animation-duration: 13s; }
.hero-embers span:nth-child(10) { left: 95%; animation-delay: 7.1s; width: 3px; height: 3px; }
@keyframes ember-rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  8%   { opacity: 0.9; }
  60%  { opacity: 0.5; }
  100% { transform: translateY(-420px) translateX(28px); opacity: 0; }
}

/* ===== Layout ===== */
.page-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.6rem;
  padding-top: 2rem;
  padding-bottom: 3.5rem;
  align-items: start;
}
@media (max-width: 920px) {
  .page-body { grid-template-columns: 1fr; }
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-hot), transparent);
}

/* ===== Cards & panels ===== */
.card, .panel {
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  position: relative;
}
.card { padding: 1.5rem 1.8rem; margin-bottom: 1.4rem; }
.card:last-child { margin-bottom: 0; }
.card-narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }

.news-featured { border-color: var(--border-hot); }
.news-featured::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, var(--ember-bright), var(--crimson));
  box-shadow: 0 0 14px rgba(224, 73, 47, 0.5);
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: 0.04em; color: var(--gold-bright); }
h1 { font-size: 1.4rem; margin: 0 0 0.85rem; }
h2 { font-size: 1.1rem; margin: 1.4rem 0 0.7rem; }
h1:first-child, h2:first-child, h3:first-child { margin-top: 0; }
.lead { color: var(--text-muted); margin-top: 0; }
.muted { color: var(--text-muted); }

/* ===== News ===== */
.news-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.news-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember-bright);
  border: 1px solid var(--border-hot);
  border-radius: 3px;
  padding: 0.15rem 0.55rem;
  background: rgba(224, 73, 47, 0.08);
}
.news-date {
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.news-title { font-size: 1.35rem; margin: 0 0 0.6rem; }
.news-card p { margin: 0.55rem 0; }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 1.3rem; }
.panel-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  margin: 0;
  padding: 0.7rem 1.15rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--border-hot);
  background: linear-gradient(180deg, rgba(161, 28, 46, 0.12), transparent);
  border-radius: 8px 8px 0 0;
}
.panel-body { padding: 1.05rem 1.15rem 1.25rem; }
.side-form input { width: 100%; margin-bottom: 0.6rem; }
.side-note { margin: 0.8rem 0 0; font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.side-account { margin: 0 0 0.8rem; color: var(--text-muted); }
.side-account strong { color: var(--gold-bright); font-size: 1.05rem; }
.side-table { width: 100%; font-size: 0.88rem; border-collapse: collapse; }
.side-table td { padding: 0.38rem 0; border-bottom: 1px dashed var(--border); }
.side-table td:first-child { color: var(--text-muted); }
.side-table td:last-child { text-align: right; font-weight: 600; }
.side-table tr:last-child td { border-bottom: none; }
.stat-hot { color: var(--ember-bright); text-shadow: 0 0 12px rgba(224, 73, 47, 0.5); }

.status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pulse 2.2s infinite;
  display: inline-block;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Ranking w sidebarze */
.ranking-list { list-style: none; margin: 0 0 0.4rem; padding: 0; }
.ranking-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.42rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.92rem;
}
.ranking-list li:last-child { border-bottom: none; }
.ranking-list a { flex: 1; color: var(--text); }
.ranking-list a:hover { color: var(--gold-bright); }
.rank-lvl { color: var(--text-muted); font-size: 0.82rem; }
.rank-no {
  width: 1.6rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.rank-1 { color: var(--gold-bright); text-shadow: 0 0 10px rgba(240, 209, 148, 0.5); }
.rank-2 { color: #c3c8d4; }
.rank-3 { color: #c08a52; }

/* ===== Tables ===== */
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 0.55rem 0.7rem; }
thead th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--border-hot);
}
tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(224, 73, 47, 0.05); }
.table-info th { color: var(--text-muted); font-weight: 500; width: 40%; }
.col-rank { width: 2.2rem; text-align: center; }

/* ===== Forms ===== */
label { display: block; margin-bottom: 1rem; font-weight: 500; font-size: 0.93rem; }
input, select {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.62rem 0.8rem;
  background: rgba(8, 6, 10, 0.8);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: var(--text-muted); }
input:focus, select:focus {
  outline: none;
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(224, 73, 47, 0.15);
}
small { display: block; color: var(--text-muted); font-weight: 400; margin-top: 0.3rem; font-size: 0.8rem; }

button, .btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--ember-bright), var(--crimson));
  color: #fff;
  border: 1px solid rgba(255, 122, 77, 0.55);
  border-radius: 5px;
  padding: 0.62rem 1.5rem;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(224, 73, 47, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: filter 0.15s, transform 0.1s;
  text-align: center;
}
button:hover, .btn:hover { filter: brightness(1.12); color: #fff; }
button:active, .btn:active { transform: translateY(1px); }
.btn-lg { padding: 0.8rem 2.2rem; font-size: 1.02rem; }
.btn-block { display: block; width: 100%; margin-top: 0.5rem; }
.btn-ghost {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.58rem 1.3rem;
  color: var(--text);
  font-weight: 500;
  text-align: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-ghost:hover { border-color: var(--ember); color: var(--ember-bright); background: rgba(224, 73, 47, 0.06); }
.btn-ghost.btn-lg { padding: 0.78rem 2rem; font-size: 1.02rem; }

/* ===== Flash ===== */
.flash {
  border-radius: 6px;
  padding: 0.8rem 1.1rem;
  margin-bottom: 1.4rem;
  border: 1px solid;
  font-weight: 500;
}
.flash-success { border-color: rgba(88, 201, 140, 0.5); color: var(--success); background: rgba(88, 201, 140, 0.07); }
.flash-error { border-color: rgba(224, 107, 102, 0.5); color: var(--error); background: rgba(224, 107, 102, 0.07); }

/* ===== Badges, tabs, pager ===== */
.badge {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.65rem;
  vertical-align: middle;
}
.badge-online { color: var(--success); border-color: rgba(88, 201, 140, 0.5); }
.tabs { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.tab {
  padding: 0.34rem 0.9rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.84rem;
}
.tab:hover { border-color: var(--ember); color: var(--ember-bright); }
.tab-active {
  background: linear-gradient(180deg, var(--ember-bright), var(--crimson));
  color: #fff;
  border-color: rgba(255, 122, 77, 0.55);
  font-weight: 600;
}
.tab-active:hover { color: #fff; }
.pager { display: flex; justify-content: space-between; margin-top: 1.1rem; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border-hot);
  padding: 1.3rem 0;
  background: linear-gradient(0deg, #0c080d, transparent);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.6rem; }
.footer-brand {
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer-nav { display: flex; gap: 1.2rem; }
.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--gold-bright); }

/* Stan przed startem serwera: rejestracja zamknięta.
   Wyglądem przypominają przyciski, ale nie kuszą kliknięciem. */
.nav-cta-soon,
.btn-disabled {
  opacity: .55;
  cursor: default;
  pointer-events: none;
  border-style: dashed;
}
