/* client/css/landing.css — Tibia/OTS style landing */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #1a1208;
  --bg2: #221810;
  --bg3: #2b1f12;
  --bg4: #352818;
  --amber: #c8963a;
  --amber-bright: #e8b84a;
  --amber-dim: #8b6914;
  --gold-border: #6b4f10;
  --text: #d4c4a0;
  --text-dim: #8a7a62;
  --border: #4a3820;
  --border-lit: #8b6914;
  --font-title: 'Cinzel', Georgia, serif;
  --font: 'Segoe UI', Tahoma, system-ui, sans-serif;
  --max: 1180px;
  --sidebar: 240px;
  --calendar-col: 240px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(200, 150, 58, 0.06), transparent 60%),
    linear-gradient(180deg, #1a1208 0%, #120c06 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.55;
  min-height: 100vh;
}

/* ─── NAV ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 0 16px;
  min-height: 48px;
  background: linear-gradient(180deg, #2b1f12 0%, #1f160c 100%);
  border-bottom: 2px solid var(--gold-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.nav-logo {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--amber-bright);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  margin-right: 8px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-links a:hover {
  color: var(--amber);
  border-bottom-color: var(--amber-dim);
}

.nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-left: auto;
}

.lang-picker {
  display: flex;
  gap: 2px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.lang-picker-btn {
  min-width: 32px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: none;
  cursor: pointer;
}

.lang-picker-btn:hover { color: var(--text); }
.lang-picker-btn.active {
  color: var(--bg);
  background: var(--amber);
}

.nav-btn {
  display: inline-block;
  padding: 5px 12px;
  font-size: 0.78rem;
  text-decoration: none;
  border-radius: 0;
  transition: all 0.15s;
  white-space: nowrap;
}

.nav-btn-ghost {
  color: var(--text);
  border: 1px solid var(--border-lit);
  background: var(--bg3);
}

.nav-btn-ghost:hover {
  background: var(--bg4);
  border-color: var(--amber);
}

.nav-btn-fill {
  background: linear-gradient(180deg, var(--amber-bright) 0%, var(--amber) 100%);
  color: #1a1208;
  font-weight: 700;
  border: 1px solid var(--amber-dim);
}

.nav-btn-fill:hover {
  background: linear-gradient(180deg, #f0c860 0%, var(--amber-bright) 100%);
}

/* ─── BANNER ─── */
.banner {
  position: relative;
  height: 120px;
  overflow: hidden;
  border-bottom: 2px solid var(--gold-border);
  background: #120a04;
}

.banner-bg {
  position: absolute;
  inset: 0;
  background:
    url('../assets/promo/abyss-rift-bg.png') center / cover no-repeat;
  opacity: 0.45;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26, 18, 8, 0.92) 0%, rgba(26, 18, 8, 0.4) 50%, rgba(26, 18, 8, 0.85) 100%);
}

.banner-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.banner-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: var(--amber-bright);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.06em;
}

.banner-tag {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.banner-version {
  font-size: 0.75rem;
  color: var(--amber);
  border: 1px solid var(--border-lit);
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 10px;
}

/* ─── LAYOUT ─── */
.page-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px;
}

.tibia-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar) var(--calendar-col);
  gap: 16px;
  align-items: start;
}

.tibia-calendar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 56px;
  /* Prawa kolumna (ticker + kalendarz) bywa wyższa od okna — przewijamy ją samą. */
  max-height: calc(100vh - 68px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-border) transparent;
}

.landing-calendar-body {
  padding: 10px;
}

.landing-cal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.landing-cal-nav-btn,
.landing-cal-today {
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.75rem;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 2px;
}

.landing-cal-nav-btn:hover,
.landing-cal-today:hover {
  border-color: var(--border-lit);
  color: var(--amber-bright);
}

.landing-cal-month {
  flex: 1;
  text-align: center;
  font-family: var(--font-title);
  font-size: 0.78rem;
  color: var(--amber-bright);
}

.landing-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 10px;
}

.landing-cal-weekday {
  text-align: center;
  font-size: 0.62rem;
  color: var(--text-dim);
  padding: 2px 0 4px;
}

.landing-cal-cell {
  min-height: 34px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.landing-cal-cell:hover {
  border-color: var(--border-lit);
  background: rgba(200, 150, 58, 0.1);
}

.landing-cal-cell.is-selected {
  border-color: var(--amber);
  box-shadow: inset 0 0 0 1px rgba(200, 150, 58, 0.45);
  background: rgba(200, 150, 58, 0.14);
}

.landing-cal-cell-empty {
  background: transparent;
  border-color: transparent;
}

.landing-cal-cell.is-today {
  border-color: var(--amber-dim);
  box-shadow: inset 0 0 0 1px rgba(200, 150, 58, 0.25);
}

.landing-cal-cell.has-events {
  background: rgba(200, 150, 58, 0.08);
}

.landing-cal-day {
  font-size: 0.68rem;
  color: var(--text);
  line-height: 1.1;
}

.landing-cal-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  min-height: 6px;
}

.landing-cal-event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.landing-cal-more {
  font-size: 0.55rem;
  color: var(--text-dim);
}

.landing-cal-upcoming-head,
.landing-cal-details-head {
  font-family: var(--font-title);
  font-size: 0.72rem;
  color: var(--amber);
  margin-bottom: 6px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.landing-cal-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.landing-cal-details-date {
  font-size: 0.72rem;
  color: var(--amber-bright);
  font-family: var(--font-title);
}

.landing-cal-detail-card {
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.landing-cal-detail-title {
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.3;
}

.landing-cal-detail-meta,
.landing-cal-detail-range,
.landing-cal-detail-mult {
  font-size: 0.62rem;
  color: var(--text-dim);
  margin-top: 3px;
  line-height: 1.35;
}

.landing-cal-detail-desc {
  font-size: 0.68rem;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.4;
}

.landing-cal-upcoming {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.landing-cal-item {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 2px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.landing-cal-item:hover {
  border-color: rgba(200, 150, 58, 0.25);
  background: rgba(200, 150, 58, 0.06);
}

.landing-cal-item-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.landing-cal-item-bar {
  width: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.landing-cal-item-title {
  font-size: 0.72rem;
  color: var(--text);
  line-height: 1.3;
}

.landing-cal-item-meta {
  font-size: 0.62rem;
  color: var(--text-dim);
  margin-top: 2px;
  line-height: 1.35;
}

.landing-cal-empty {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
  padding: 8px 4px;
}

/* ─── DISCORD WIDGET ─── */
.landing-discord-box {
  overflow: hidden;
  padding: 0;
}

.landing-discord-box.hidden {
  display: none;
}

.landing-discord-banner {
  background: linear-gradient(180deg, #5eb3ff 0%, #4a9fe8 100%);
  color: #fff;
  text-align: center;
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 10px 8px;
  text-transform: uppercase;
}

.landing-discord-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #5865f2;
  color: #fff;
  font-size: 0.72rem;
}

.landing-discord-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.landing-discord-logo {
  width: 18px;
  height: 18px;
}

.landing-discord-count {
  font-size: 0.68rem;
  opacity: 0.95;
  text-align: right;
}

.landing-discord-members-head {
  padding: 6px 10px 4px;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: #2f3136;
}

.landing-discord-members {
  max-height: 220px;
  overflow-y: auto;
  background: #2f3136;
  padding: 2px 0 6px;
}

.landing-discord-member {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 1px;
  padding: 5px 10px;
  position: relative;
}

.landing-discord-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  grid-row: 1 / span 2;
  object-fit: cover;
  background: #202225;
}

.landing-discord-avatar-fallback {
  display: block;
  background: #5865f2;
}

.landing-discord-status {
  position: absolute;
  left: 30px;
  top: 24px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid #2f3136;
}

.landing-discord-status.is-online { background: #43b581; }
.landing-discord-status.is-idle { background: #faa61a; }
.landing-discord-status.is-dnd { background: #f04747; }

.landing-discord-name {
  font-size: 0.74rem;
  color: #dcddde;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-discord-activity {
  font-size: 0.62rem;
  color: #b9bbbe;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-discord-empty {
  font-size: 0.72rem;
  color: #b9bbbe;
  text-align: center;
  padding: 12px 8px;
}

.landing-discord-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #202225;
  border-top: 1px solid rgba(0, 0, 0, 0.35);
}

.landing-discord-tagline {
  font-size: 0.62rem;
  color: #b9bbbe;
  line-height: 1.35;
  min-width: 0;
}

.landing-discord-join {
  flex-shrink: 0;
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid #dcddde;
  border-radius: 3px;
  color: #fff;
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  background: #40444b;
}

.landing-discord-join:hover {
  background: #4f545c;
  color: #fff;
}

.tibia-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.tibia-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── PANELS ─── */
.tibia-panel,
.tibia-box {
  background: var(--bg3);
  border: 2px solid var(--gold-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.4);
}

.panel-head {
  padding: 8px 12px;
  background: linear-gradient(180deg, #3d2e18 0%, #2b2010 100%);
  border-bottom: 1px solid var(--gold-border);
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber-bright);
  letter-spacing: 0.03em;
}

.panel-body {
  padding: 12px;
}

.panel-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.6;
}

/* ─── ALPHA COUNTDOWN ─── */
.landing-alpha-countdown .panel-body {
  padding: 14px 16px;
}

.landing-alpha-countdown-body {
  text-align: center;
}

.landing-alpha-tests-ended {
  margin: 0 0 14px;
  color: #ef5350;
  font-family: var(--font-title);
  font-size: 0.9rem;
  line-height: 1.5;
}

.landing-alpha-tests-ended a {
  color: #ff8a80;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.landing-alpha-tests-ended a:hover {
  color: #ffb3ad;
}

.landing-alpha-countdown-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: var(--amber-bright);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.landing-alpha-countdown-date {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.landing-alpha-countdown-timer {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.landing-alpha-countdown-timer.hidden {
  display: none;
}

.landing-alpha-unit {
  min-width: 64px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--gold-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.landing-alpha-unit-value {
  display: block;
  font-family: var(--font-title);
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--amber-bright);
  font-variant-numeric: tabular-nums;
}

.landing-alpha-unit-label {
  display: block;
  margin-top: 4px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.landing-alpha-countdown-live {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 0.9rem;
  color: var(--amber-bright);
}

.landing-alpha-countdown-live.hidden {
  display: none;
}

.landing-alpha-countdown.is-live {
  border-color: #3d6b3d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 12px rgba(67, 181, 129, 0.15);
}

.landing-alpha-play-btn {
  display: inline-block;
  text-decoration: none;
  min-width: 160px;
}

.landing-alpha-tests-ended.hidden {
  display: none;
}

.landing-alpha-discord-btn {
  display: inline-block;
  margin-top: 14px;
  text-decoration: none;
  min-width: 160px;
}

/* ─── NEWS TICKER (prawa kolumna, nad kalendarzem) ─── */
.news-empty {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-style: italic;
  padding: 8px 0;
}

.landing-news-box .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.landing-news-expand {
  flex: 0 0 auto;
  background: var(--bg4);
  border: 1px solid var(--gold-border);
  color: var(--amber);
  font-family: var(--font);
  font-size: 0.68rem;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 2px;
  cursor: pointer;
}

.landing-news-expand:hover {
  border-color: var(--amber);
  color: var(--amber-bright);
}

.landing-news-body { padding: 8px 10px 10px; }

.news-ticker {
  position: relative;
  height: 172px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}

.news-ticker-track {
  display: flex;
  flex-direction: column;
  animation: news-ticker-scroll var(--ticker-duration, 40s) linear infinite;
}

.news-ticker:hover .news-ticker-track,
.news-ticker:focus-within .news-ticker-track {
  animation-play-state: paused;
}

@keyframes news-ticker-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

/* Za mało wpisów na płynną pętlę — pokaż zwykłą, przewijaną listę. */
.news-ticker.is-static {
  height: auto;
  max-height: 200px;
  overflow-y: auto;
}

.news-ticker.is-static .news-ticker-track { animation: none; }

.news-ticker-item {
  display: block;
  width: 100%;
  padding: 8px 8px 8px 9px;
  background: transparent;
  border: 0;
  border-left: 3px solid rgba(200, 150, 58, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.news-ticker-item:hover,
.news-ticker-item:focus-visible {
  background: rgba(200, 150, 58, 0.09);
  border-left-color: var(--amber);
  outline: none;
}

.news-ticker-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 3px;
  font-size: 0.68rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.news-ticker-ver {
  color: var(--amber);
  font-weight: 700;
}

.news-ticker-title {
  display: block;
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.news-ticker-more {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.63rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-dim);
}

.news-ticker-hint {
  margin-top: 8px;
  font-size: 0.68rem;
  color: var(--text-dim);
  font-style: italic;
}

/* ─── NAJNOWSZY UPDATE (kolumna główna) ─── */
.landing-featured-update .panel-body { padding: 0; }

.landing-update-screen { margin: 16px 0 0; }
.landing-update-screen img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--gold-border);
  image-rendering: pixelated;
}
.landing-update-screen figcaption { margin-top: 8px; }
.landing-update-section { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }

.landing-featured-hero {
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  background: #120c06;
  border-bottom: 1px solid var(--gold-border);
}

.landing-featured-hero img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.landing-featured-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

.landing-featured-badge {
  position: absolute;
  z-index: 1;
  left: 12px;
  top: 12px;
  padding: 3px 8px;
  background: rgba(18, 12, 6, 0.85);
  border: 1px solid var(--gold-border);
  color: var(--amber-bright);
  font-family: var(--font-title);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.landing-featured-body { padding: 14px 16px 16px; }

.landing-featured-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: 6px;
}

.landing-featured-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--amber-bright);
  letter-spacing: 0.03em;
}

.landing-featured-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.landing-featured-tagline {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 12px;
}

.landing-featured-changes {
  list-style: none;
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.landing-featured-changes li {
  position: relative;
  padding-left: 16px;
  font-size: 0.82rem;
  line-height: 1.55;
}

.landing-featured-changes li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 0.6rem;
  color: var(--amber-dim);
}

.landing-featured-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.landing-featured-note {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-style: italic;
}

/* ─── MODAL PEŁNOEKRANOWY (patch notes / wpis changelogu) ─── */
body.landing-modal-open { overflow: hidden; }

.landing-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.landing-modal[hidden] { display: none; }

.landing-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 2, 0.84);
}

.landing-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  max-height: min(88vh, 880px);
  background: var(--bg3);
  border: 2px solid var(--gold-border);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.65);
  animation: landing-modal-in 0.16s ease-out;
}

@keyframes landing-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.landing-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #3d2e18 0%, #2b2010 100%);
  border-bottom: 1px solid var(--gold-border);
}

.landing-modal-eyebrow {
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-dim);
  margin-bottom: 3px;
}

.landing-modal-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--amber-bright);
}

.landing-modal-meta {
  margin-top: 3px;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.landing-modal-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  background: var(--bg2);
  border: 1px solid var(--gold-border);
  color: var(--amber-bright);
  font-family: var(--font);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.landing-modal-close:hover {
  border-color: var(--amber);
  color: #fff;
}

.landing-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px;
}

.landing-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg2);
  border-top: 1px solid var(--gold-border);
}

.landing-modal-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.landing-modal-entry + .landing-modal-entry {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.landing-modal-entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.landing-modal-entry-version {
  font-family: var(--font-title);
  font-size: 0.88rem;
  color: var(--amber);
}

.landing-modal-entry-date {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.landing-modal-entry-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0 8px;
}

.landing-modal-entry-changes {
  list-style: none;
  display: grid;
  gap: 7px;
}

.landing-modal-entry-changes li {
  position: relative;
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.landing-modal-entry-changes li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 0.58rem;
  color: var(--amber-dim);
}

.landing-modal-entry-time {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 5px;
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--amber);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.landing-modal-entry-empty {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-style: italic;
}

/* ─── KARTY W PATCH NOTES (Card update) ─── */
.landing-cards {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.landing-cards-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: var(--amber-bright);
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.landing-cards-group + .landing-cards-group {
  margin-top: 18px;
}

.landing-cards-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.landing-cards-group-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.landing-cards-pool {
  font-size: 0.7rem;
  color: var(--amber-dim);
  font-variant-numeric: tabular-nums;
}

.landing-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}

.landing-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
}

.landing-card:hover { border-color: var(--border-lit); }

.landing-card-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  background: #120c06;
  border: 1px solid var(--gold-border);
}

.landing-card-icon-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-family: var(--font-title);
  image-rendering: auto;
}

.landing-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.landing-card-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
}

.landing-card-name-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--amber);
}

.landing-card-slot {
  padding: 1px 5px;
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.landing-card-effect {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.landing-card-drop {
  font-size: 0.68rem;
  color: var(--amber-bright);
  font-variant-numeric: tabular-nums;
}

.landing-featured-cards-note { margin-top: 8px; }

/* ─── FEATURE GRID ─── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.feature-card {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.feature-card:hover { border-color: var(--border-lit); }

.feature-card:focus-visible {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(200, 150, 58, 0.25);
}

.feature-card.expanded {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  padding: 12px;
  border-color: var(--amber-dim);
  background: var(--bg3);
  box-shadow: inset 0 0 0 1px rgba(200, 150, 58, 0.12);
}

.feature-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 54px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0806;
  transition: width 0.2s ease, height 0.2s ease;
}

.feature-card.expanded .feature-thumb {
  width: min(100%, 360px);
  height: auto;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
}

.feature-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  image-rendering: pixelated;
}

.feature-card.expanded .feature-thumb img {
  object-fit: contain;
  object-position: center top;
}

.feature-card-text {
  flex: 1;
  min-width: 0;
}

.feature-card-text h4 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 2px;
}

.feature-card.expanded .feature-card-text h4 {
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.feature-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feature-card.expanded .feature-desc {
  display: block;
  -webkit-line-clamp: unset;
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 8px;
}

.feature-bullets {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-card.expanded .feature-bullets {
  display: block;
}

.feature-bullets li {
  position: relative;
  padding-left: 14px;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 4px;
}

.feature-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--amber-dim);
  font-size: 0.7rem;
}

.feature-hint {
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
}

/* ─── CLASSES ─── */
.classes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.class-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
}

.class-row-coming { opacity: 0.65; }

.class-row-icon {
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.4;
}

.class-row-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.class-row-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.class-row-meta {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-self: center;
}

.class-pill {
  font-size: 0.65rem;
  padding: 2px 6px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.pill-str { border-color: #6b3030; color: #c08080; }
.pill-agi { border-color: #306b30; color: #80c080; }
.pill-int { border-color: #30406b; color: #8090c0; }
.pill-soon { border-color: var(--border); color: var(--text-dim); }

/* ─── SIDEBAR BOXES ─── */
.tibia-box .panel-body { padding: 10px 12px; }

.sidebar-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-tibia {
  display: block;
  text-align: center;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-lit);
  transition: all 0.15s;
}

.btn-tibia-main {
  background: linear-gradient(180deg, var(--amber-bright) 0%, var(--amber) 100%);
  color: #1a1208;
}

.btn-tibia-main:hover {
  background: linear-gradient(180deg, #f0c860 0%, var(--amber-bright) 100%);
}

.btn-tibia-ghost {
  background: var(--bg2);
  color: var(--text);
}

.btn-tibia-ghost:hover {
  background: var(--bg4);
  border-color: var(--amber);
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.82rem;
}

.status-label { color: var(--text-dim); }

.status-value {
  font-weight: 700;
  color: #70c070;
}

.status-value strong { color: var(--amber-bright); }

/* ─── RANKING ─── */
.ranking-panel-head,
.ranking-row {
  display: grid;
  grid-template-columns: 28px 1fr 48px;
  gap: 6px;
  align-items: center;
  padding: 4px 6px;
  font-size: 0.75rem;
}

.ranking-panel-head {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
}

.ranking-row:nth-child(even) { background: rgba(0, 0, 0, 0.15); }

.ranking-row-top .ranking-rank { color: var(--amber-bright); font-weight: 700; }
.ranking-row-top .ranking-name { color: var(--amber); }

.ranking-rank { color: var(--text-dim); text-align: right; }
.ranking-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-value { text-align: right; color: var(--text-dim); font-weight: 600; }

.ranking-empty {
  padding: 12px 6px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
}

.ranking-foot {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
}

.download-note {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 8px;
  line-height: 1.45;
}

/* ─── FOOTER ─── */
footer {
  max-width: var(--max);
  margin: 24px auto 0;
  padding: 16px;
  border-top: 2px solid var(--gold-border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.footer-logo {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--amber-dim);
  text-decoration: none;
}

.footer-logo:hover { color: var(--amber); }

.footer-copy a {
  color: var(--text-dim);
  text-decoration: none;
}

.footer-copy a:hover { color: var(--text); }

/* ─── LEGAL PAGES (shared) ─── */
.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 16px 60px;
}

.legal-wrap h1 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--amber);
  margin-bottom: 8px;
}

.legal-meta {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.legal-wrap h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.legal-wrap p,
.legal-wrap li {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.legal-wrap ul {
  padding-left: 20px;
  margin-top: 6px;
}

.legal-wrap li { margin-bottom: 4px; }

.legal-wrap a {
  color: var(--amber);
  text-decoration: none;
}

.legal-wrap a:hover { text-decoration: underline; }

.legal-back {
  display: inline-block;
  margin-top: 40px;
  color: var(--text-dim);
  font-size: 0.82rem;
  text-decoration: none;
}

.legal-back:hover { color: var(--text); }

.legal-lang.hidden { display: none; }

@media (prefers-reduced-motion: reduce) {
  .news-ticker-track {
    animation: none;
  }

  .news-ticker,
  .news-ticker.is-static {
    height: auto;
    max-height: 200px;
    overflow-y: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .tibia-layout {
    grid-template-columns: 1fr;
  }

  .tibia-calendar {
    position: static;
    order: -1;
    max-height: none;
    overflow: visible;
  }

  .landing-news-box {
    max-width: 420px;
  }

  .landing-calendar-box {
    max-width: 420px;
  }
}

@media (max-width: 900px) {
  .tibia-layout {
    grid-template-columns: 1fr;
  }

  .tibia-sidebar {
    order: -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .tibia-sidebar .tibia-box:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .nav-links { display: none; }

  .landing-featured-title { font-size: 1.05rem; }

  .landing-modal { padding: 12px 8px; }

  .landing-modal-panel { max-height: 92vh; }

  .landing-modal-hint { display: none; }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card.expanded {
    flex-direction: column;
  }

  .feature-card.expanded .feature-thumb {
    width: 100%;
  }

  .tibia-sidebar {
    grid-template-columns: 1fr;
  }

  .banner-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
  }

  .class-row-meta { display: none; }
}

/* Transmisja Twitch */
.landing-twitch-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.landing-twitch-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: #9146ff;
  border: 1px solid #c9b0ff;
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
.landing-twitch-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b3b;
  animation: landing-twitch-pulse 1.8s ease-in-out infinite;
}
@keyframes landing-twitch-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .landing-twitch-badge::before { animation: none; } }
.landing-twitch-badge.hidden,
.landing-twitch-player.hidden,
.landing-twitch-offline.hidden,
.landing-twitch-hint.hidden { display: none; }
.landing-twitch-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 225px;
  background: #000;
  border: 1px solid var(--gold-border);
}
.landing-twitch-frame { width: 100%; height: 100%; min-height: 225px; border: 0; display: block; }
.landing-twitch-msg { margin: 0 0 4px; font-family: var(--font-title); color: var(--amber-bright); }
.landing-twitch-hint { margin: 0; font-size: 0.82rem; color: var(--text-dim); }
.landing-twitch-link { display: inline-block; margin-top: 10px; color: #b79cff; font-size: 0.85rem; }
