/* Best Game Servers — additions for the dynamic multi-game app.
   Loaded after style.css so it can reuse the same design tokens. */

/* ---- Flash messages ----
   Positioned as a fixed overlay (not in normal document flow) so it never
   collides with the sticky header or the hero section's negative-margin
   layout, and shows consistently on every page regardless of layout. */
.flash-messages {
  position: fixed;
  top: calc(var(--header-height) + 14px);
  right: 20px;
  left: auto;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100% - 40px));
}

.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  background: var(--bg-surface);
  animation: flash-in 0.25s var(--ease-out);
}

@keyframes flash-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.flash-message {
  flex: 1;
  line-height: 1.4;
}

.flash-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: inherit;
  opacity: 0.6;
  padding: 0;
}

.flash-close:hover {
  opacity: 1;
}

.flash-success {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.flash-error {
  background: #fbe9e7;
  border-color: #c0392b;
  color: #942f22;
}

@media (max-width: 480px) {
  .flash-messages {
    right: 12px;
    left: 12px;
    width: auto;
  }
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  font: inherit;
}

/* ---- Game switcher (homepage + submission picker) ---- */
.game-filter {
  margin: 0 0 4px;
}

.panel-body > .login-subtitle + .game-filter {
  margin-top: 14px;
  margin-bottom: 8px;
}

.panel-body .home-game-search {
  max-width: 520px;
}

.home-game-search {
  position: relative;
  max-width: 420px;
  width: 100%;
}

.home-game-search input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.98rem;
  background: var(--bg-elevated, #fff);
  color: var(--text-primary);
  box-sizing: border-box;
}

.home-game-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 156, 78, 0.2);
}

.home-game-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  width: 14px;
  cursor: pointer;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e53935' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}

.home-game-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, var(--text-secondary));
  pointer-events: none;
  width: 17px;
  height: 17px;
}

.game-filter-empty {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.game-switcher-card[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.game-switcher {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin: 18px 0 32px;
}

.game-switcher-card,
.game-switcher-card:hover,
.game-switcher-card:visited,
.game-switcher-card:active {
  /* Explicitly pinned (not just inherited) so the global a:hover link color
     doesn't tint the card text on hover — it's a higher-specificity rule
     applied directly to the anchor to beat that global rule regardless of
     state, since the card is a full-bleed image background, not body text. */
  color: #fff;
}

.game-switcher-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  min-height: 180px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, border-color 0.25s;
}

.game-switcher-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  border-color: var(--accent);
}

.game-switcher-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px;
}

.game-switcher-name {
  font-size: 22px;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.game-switcher-cta {
  font-size: 13px;
  opacity: 0.9;
}

/* ---- Recently visited game lists (slim row) ---- */
.recent-game-lists {
  margin: 0 0 8px;
}

.recent-game-lists .section-heading {
  margin-bottom: 8px;
}

.recent-game-lists .section-heading h2 {
  font-size: 1.15rem;
  font-weight: 650;
}

.game-switcher--recent {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 28px;
}

.game-switcher-card--slim {
  min-height: 76px;
  padding: 10px 12px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.game-switcher-card--slim:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.game-switcher-card--slim .game-switcher-icon {
  position: static;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 3px;
}

.game-switcher-card--slim .game-switcher-name {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-switcher-card--slim .game-switcher-cta {
  display: none;
}

@media (max-width: 900px) {
  .game-switcher--recent {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    margin-bottom: 22px;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .game-switcher-card--slim {
    flex: 0 0 min(46vw, 180px);
    scroll-snap-align: start;
  }
}

@media (max-width: 560px) {
  .game-switcher-card--slim {
    flex-basis: min(62vw, 200px);
    min-height: 68px;
    padding: 8px 10px;
  }

  .game-switcher-card--slim .game-switcher-name {
    font-size: 14px;
  }
}

/* ---- Homepage features (below game picker) ---- */
.home-features {
  margin: 8px 0 40px;
  padding: 28px 0 8px;
  border-top: 1px solid var(--border);
}

.home-features-heading {
  margin-bottom: 6px;
}

.home-features-lead {
  margin: 0 0 22px;
  max-width: 40rem;
  font-size: 0.97rem;
  line-height: 1.6;
  color: #3f3a34;
}

.home-features-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.home-features-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-feature-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  background: var(--bg-surface, #fff);
}

.home-feature-card--action {
  padding: 20px 20px 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 55%, #fff) 0%, var(--bg-surface) 72%);
}

.home-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  margin-bottom: 2px;
}

.home-feature-icon--soft {
  width: 36px;
  height: 36px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.home-feature-card h3 {
  margin: 0;
  font-family: var(--font);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.home-feature-card p {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.58;
  color: #3f3a34;
}

.home-feature-btn {
  align-self: flex-start;
  margin-top: 8px;
}

@media (max-width: 980px) {
  .home-features-actions {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .home-features {
    margin-top: 4px;
    padding-top: 22px;
  }

  .home-features-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Buy Credits ---- */
.credits-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.credits-balance-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.credits-balance-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.credits-balance-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-dark);
  letter-spacing: -0.02em;
}

.credits-balance-unit {
  margin-left: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.credits-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fbf3e3;
  border: 1px solid #e2c98a;
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.55;
}

.credits-alert--danger {
  background: #fdecea;
  border-color: #e5a39a;
}

.credits-label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.credits-label small {
  display: block;
  margin-top: 4px;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.credits-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(90px, 0.7fr) minmax(100px, 0.7fr);
  gap: 8px;
  margin-bottom: 12px;
}

.credits-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 700;
}

.credits-addon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: var(--bg-elevated);
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
}

.credits-addon--total {
  background: #fff;
  border-color: var(--border);
  font-weight: 800;
  color: var(--text-primary);
}

.credits-price-line {
  margin-bottom: 18px;
}

.credits-pay-area {
  max-width: 420px;
  margin: 0 auto;
}

.credits-paypal,
.credits-paypal-disabled {
  width: 100%;
}

.credits-paypal-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.credits-orders-title {
  margin: 28px 0 10px;
  font-size: 0.95rem;
}

.credits-orders {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.credits-order-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.credits-order-status {
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.credits-order-status--completed { color: var(--accent-dark); }
.credits-order-status--pending { color: #a16207; }
.credits-order-status--failed,
.credits-order-status--cancelled { color: #b42318; }

.credits-vip-bar {
  height: 28px;
  margin: 10px 0 16px;
  background: #f1f1f1;
  border-radius: 4px;
  overflow: hidden;
}

.credits-vip-bar-fill {
  height: 100%;
  min-width: 2.5rem;
  background: #7fb85c;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.credits-vip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: center;
}

.credits-vip-table th,
.credits-vip-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-light);
}

.credits-vip-table th {
  background: var(--bg-table-head);
  color: var(--text-primary);
  font-weight: 700;
}

.credits-vip-table tr.is-current td {
  background: #7fb85c;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.admin-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

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

  .credits-input-row {
    grid-template-columns: 1fr;
  }
}

/* ---- Sort bar (button group) ---- */
.sort-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 4px 0 18px;
  font-size: 14px;
}

.sort-bar-label {
  color: var(--text-secondary);
  font-weight: 600;
}

.sort-bar-add {
  margin-left: auto;
  height: 34px;
  padding: 0 14px;
  font-size: 0.84rem;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    background 0.22s var(--ease-out),
    transform 0.28s var(--ease-spring),
    box-shadow 0.28s var(--ease-out),
    filter 0.22s var(--ease-out);
}

.sort-bar-add::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 60%,
    transparent 100%
  );
  transform: translateX(-120%);
  transition: transform 0.55s var(--ease-out);
  pointer-events: none;
  z-index: 1;
}

.sort-bar-add::after {
  content: '+';
  font-size: 1.05em;
  font-weight: 700;
  line-height: 1;
  opacity: 0.9;
  transition: transform 0.28s var(--ease-spring), opacity 0.2s;
}

.sort-bar-add:hover,
a.sort-bar-add:hover,
a.sort-bar-add:focus-visible {
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 6px 18px rgba(74, 156, 78, 0.35),
    0 0 0 3px rgba(74, 156, 78, 0.18);
  filter: brightness(1.05);
}

.sort-bar-add:hover::before,
a.sort-bar-add:focus-visible::before {
  transform: translateX(120%);
}

.sort-bar-add:hover::after,
a.sort-bar-add:focus-visible::after {
  transform: rotate(90deg) scale(1.15);
  opacity: 1;
}

.sort-bar-add:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px var(--accent-glow);
  transition-duration: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
  .sort-bar-add,
  .sort-bar-add::before,
  .sort-bar-add::after {
    transition: none;
  }

  .sort-bar-add:hover,
  a.sort-bar-add:hover,
  a.sort-bar-add:focus-visible,
  .sort-bar-add:active {
    transform: none;
  }

  .sort-bar-add:hover::before,
  a.sort-bar-add:focus-visible::before {
    transform: none;
  }
}

@media (max-width: 720px) {
  .sort-bar-add {
    margin-left: 0;
    width: 100%;
    white-space: normal;
    text-align: center;
  }
}

.sort-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated, #fff);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.sort-btn:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.sort-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.sort-btn.is-active:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.sort-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.sort-dropdown-btn {
  gap: 6px;
  cursor: pointer;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.sort-dropdown-btn svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.sort-dropdown.open .sort-dropdown-btn svg {
  transform: rotate(180deg);
}

.sort-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  min-width: 240px;
  max-width: min(340px, 90vw);
  max-height: min(360px, 60vh);
  overflow-y: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(44, 40, 36, 0.14);
}

.sort-dropdown-menu[hidden] {
  display: none !important;
}

.sort-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: calc(var(--radius) - 2px);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.sort-dropdown-item:hover {
  background: var(--accent-soft, rgba(74, 156, 78, 0.12));
  color: var(--accent-dark, #2f6b32);
}

.sort-dropdown-item.is-active {
  background: var(--accent-soft, rgba(74, 156, 78, 0.16));
  color: var(--accent-dark, #2f6b32);
  font-weight: 700;
}

.sort-dropdown-btn-label,
.sort-dropdown-item-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sort-dropdown-item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sort-dropdown-item-count {
  flex-shrink: 0;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.sort-dropdown-empty {
  display: block;
  padding: 10px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 16px;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.active-filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.active-filter-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  margin-top: 1px;
  font-size: 1.05em;
  font-weight: 500;
  line-height: 1;
}

/* ---- Tag badges (server detail) ---- */
.tag-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tag-badge {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
}

.tag-badge:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* ---- Compact tags in server list rows ---- */
.list-tag-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  max-width: 468px;
}

.list-tag-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted, var(--text-secondary));
  font-size: 11px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.list-tag-badge:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.list-tag-badges--meta {
  margin-top: 6px;
}

.list-tag-badge--meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: default;
  background: var(--bg-surface, #fff);
  color: var(--text-primary);
  border-color: var(--border-light, var(--border));
}

.list-tag-badge--meta:hover {
  border-color: var(--border-strong, var(--border));
  color: var(--text-primary);
}

.list-tag-badge-k {
  color: var(--text-muted, var(--text-secondary));
  font-weight: 500;
}

.list-tag-badge-v {
  color: var(--text-primary);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.list-tag-badge--flag .flag-img {
  width: 18px;
  height: 13px;
}

/* ---- Trailer + gallery ---- */
.server-trailer, .server-gallery {
  margin-top: 24px;
}

.server-trailer .video-embed + .video-embed,
.server-trailer .video-embed + p {
  margin-top: 14px;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-embed-facade {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: #000;
  cursor: pointer;
}

.video-embed-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-embed-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 48px;
  margin: -24px 0 0 -34px;
  border-radius: 12px;
  background: rgba(255, 0, 0, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.video-embed-play::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -10px 0 0 -5px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}

.video-embed-facade:hover .video-embed-play,
.video-embed-facade:focus-visible .video-embed-play {
  background: #f00;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.gallery-item {
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
}

.gallery-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  transition: transform 0.2s var(--ease-out), border-color 0.2s;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.03);
  border-color: var(--accent);
}

.gallery-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  width: 100%;
  margin: 10px 0 12px;
}

.gallery-edit-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.gallery-edit-item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

.gallery-edit-remove {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---- Gallery lightbox ---- */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  padding: 24px;
}

.gallery-lightbox.active {
  display: flex;
}

.gallery-lightbox-inner {
  position: relative;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.gallery-lightbox-inner img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  background: #111;
}

.gallery-lightbox-caption {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(20, 20, 22, 0.75);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover {
  background: rgba(74, 156, 78, 0.85);
  border-color: var(--accent);
}

.gallery-lightbox-close {
  top: -8px;
  right: -8px;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  line-height: 1;
}

.gallery-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
}

.gallery-lightbox-prev { left: -56px; }
.gallery-lightbox-next { right: -56px; }

@media (max-width: 760px) {
  .gallery-lightbox {
    padding: 16px;
  }
  .gallery-lightbox-prev,
  .gallery-lightbox-next {
    left: auto;
    right: auto;
    top: auto;
    bottom: 8px;
    transform: none;
  }
  .gallery-lightbox-prev { left: 16px; }
  .gallery-lightbox-next { right: 16px; }
  .gallery-lightbox-close {
    top: 8px;
    right: 8px;
  }
  .gallery-lightbox-inner img {
    max-height: calc(100vh - 140px);
  }
}

/* ---- Forms ---- */
.form-section-title {
  margin: 26px 0 10px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
}

.form-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.captcha-field {
  margin: 4px 0 8px;
}

.captcha-field .cf-turnstile {
  line-height: 0;
}

.form-actions .captcha-field {
  flex: 1 1 100%;
  width: 100%;
  margin: 0;
  order: 5;
}

.form-actions .btn-primary {
  order: 6;
}

.server-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 920px;
  margin: 0 auto;
}

.form-card {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  padding: 22px 24px 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.form-card-head {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light, var(--border));
}

.form-card-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.form-card-head p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.form-subsection {
  margin: 8px 0 18px;
  padding: 16px 16px 4px;
  border: 1px dashed var(--border);
  border-radius: var(--radius, 8px);
  background: var(--bg-elevated, #faf9f6);
}

.form-subsection--vote-alt {
  margin-top: 12px;
}

.form-subsection-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.form-subsection-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.form-subsection-lead {
  margin: 0 0 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.form-grid .form-group--full {
  grid-column: 1 / -1;
}

.form-grid .form-group--port {
  max-width: none;
}

.tag-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tag-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated, #fff);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.tag-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.tag-chip:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.tag-chip:has(input:checked),
.tag-chip.is-checked {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tag-chip:has(input:focus-visible) {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.file-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated, #faf9f7);
  transition: border-color 0.15s, background 0.15s;
}

.file-dropzone:hover {
  border-color: var(--accent);
  background: var(--bg-surface, #fff);
}

.file-dropzone-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

.file-dropzone-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.file-dropzone input[type="file"] {
  width: 100%;
  font-size: 0.86rem;
}

.file-dropzone-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.file-dropzone-preview[hidden] {
  display: none !important;
}

.file-dropzone-preview img,
.file-dropzone-preview video,
.file-dropzone-preview .server-banner {
  display: block;
  width: min(100%, var(--banner-w, 468px));
  height: auto;
  max-height: none;
  aspect-ratio: var(--banner-w, 468) / var(--banner-h, 60);
  border-radius: 4px;
  object-fit: contain;
  background: #141414;
}

.file-dropzone-preview--icon img {
  width: 48px;
  height: 48px;
  object-fit: cover;
}

.icon-fetch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  width: 100%;
}

.icon-fetch-row .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--border, #d4d0c8);
  border-radius: 8px;
  background: var(--bg-surface, #fff);
  color: var(--text-primary, #1a1a1a);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.icon-fetch-row .btn-secondary:hover:not(:disabled) {
  border-color: var(--accent, #c45c26);
  color: var(--accent, #c45c26);
}

.icon-fetch-row .btn-secondary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.icon-fetch-status {
  font-size: 0.78rem;
  color: var(--text-muted, #6b6560);
  line-height: 1.35;
}

.icon-fetch-status.is-error {
  color: #b42318;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  padding: 18px 24px;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.form-actions .btn-primary {
  width: auto;
  min-width: 180px;
  padding: 12px 28px;
}

.form-actions-note {
  margin: 0;
  margin-right: auto;
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 18px 16px 4px;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .form-actions-note {
    margin-right: 0;
  }

  .form-actions .btn-primary {
    width: 100%;
  }
}

.tag-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.tag-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---- Dashboard ---- */
.dashboard-empty-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 36px 32px 40px;
}

.dashboard-empty-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.dashboard-server-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-server-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.dashboard-server-meta {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.dashboard-server-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.claim-info {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 22px;
  padding: 18px 20px;
  border-radius: var(--radius-lg, 12px);
  border: 1px solid color-mix(in srgb, var(--accent, #4a9c4e) 28%, var(--border, #e5e1db));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft, rgba(74, 156, 78, 0.12)) 80%, #fff) 0%, var(--bg-surface, #fff) 100%);
  max-width: 52rem;
}

.claim-info-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft, rgba(74, 156, 78, 0.16));
  color: var(--accent-dark, #2f6b32);
}

.claim-info-icon svg {
  width: 32px;
  height: 32px;
}

.claim-info-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.claim-info-body p {
  margin: 0;
  color: var(--text-primary, #1c1917);
  font-size: 0.98rem;
  line-height: 1.55;
}

.claim-info-status {
  text-decoration: none;
}

.claim-search-wrap {
  position: relative;
}

.claim-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  max-height: 320px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  background: var(--bg-page, #f7f5f2);
}

.claim-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--bg-surface, #fff);
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.claim-result-item:hover:not(:disabled) {
  border-color: var(--accent, #c45c26);
}

.claim-result-item:disabled,
.claim-result-item.is-own {
  opacity: 0.65;
  cursor: not-allowed;
}

.claim-result-item img,
.claim-result-icon-empty {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--border);
}

.claim-result-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.claim-result-text strong {
  font-size: 0.95rem;
}

.claim-result-text small {
  color: var(--text-muted, #6b6560);
  font-size: 0.78rem;
}

.claim-search-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted, #6b6560);
}

.claim-selected-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  background: var(--bg-page, #f7f5f2);
}

.claim-selected-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.claim-selected-icon--empty {
  display: inline-block;
  background: var(--border);
}

.claim-selected-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.claim-selected-meta span {
  font-size: 0.8rem;
  color: var(--text-muted, #6b6560);
}

.claim-proof-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.claim-proof-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.claim-history {
  margin-top: 36px;
  scroll-margin-top: 96px;
}

.claim-history-title {
  margin: 0 0 14px;
  font-size: 1.15rem;
}

@media (max-width: 560px) {
  .claim-info {
    gap: 12px;
    padding: 14px;
  }

  .claim-info-icon {
    width: 44px;
    height: 44px;
  }

  .claim-info-icon svg {
    width: 26px;
    height: 26px;
  }
}

.players-offline {
  opacity: 0.6;
}

.info-row-software {
  margin-top: 2px;
}

.info-value-muted {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.error-page {
  max-width: 640px;
  margin: 60px auto;
}

/* ---- Custom footer content (admin-managed, global or per-game) ----
   Sits inside .footer-content, which already constrains max-width/padding. */
.footer-custom {
  margin: 0 0 18px;
  color: var(--header-text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.footer-custom p {
  margin: 0 0 8px;
}

.footer-custom a {
  color: inherit;
  text-decoration: underline;
}

/* ---- Game listing SEO (below server table; reuses .page-prose) ---- */
.listing-seo-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px 20px;
  margin-top: 8px;
}

.listing-seo-video {
  margin: 0;
  min-width: 0;
}

.listing-seo-video figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-top: 8px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.listing-seo-video figcaption a {
  color: var(--text-primary);
  text-decoration: none;
}

.listing-seo-video figcaption a:hover {
  text-decoration: underline;
}

.listing-seo-video-promo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 18px;
  padding: 0;
}

.listing-seo-video-promo-text {
  margin: 0;
  max-width: 42rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-secondary, var(--text-muted));
}

.listing-seo-video-cta {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.listing-seo-video-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent, #c9a227);
}

.form-optional {
  font-weight: 400;
  opacity: 0.7;
}

/* ---- Global search results ---- */
.search-game-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.search-game-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  line-height: 1.2;
  background: var(--bg-surface);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.search-game-chip span {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.search-game-chip:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.search-game-chip.is-active {
  color: var(--accent-dark);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.search-game-chip.is-active span {
  color: var(--accent-dark);
}

.search-game-filters.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.search-game-chip.is-pending {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.search-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px 14px;
  align-items: start;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px var(--accent-glow);
}

.search-card-rank {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.search-card-main {
  display: flex;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.search-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border-light);
  background: #f3efe6;
}

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

.search-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  white-space: normal;
}

.search-card-main:hover .search-card-title {
  color: var(--accent-dark);
}

.search-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.search-card-game {
  font-weight: 600;
  color: var(--text-primary);
}

.search-card-sep {
  margin: 0 6px;
  color: var(--text-muted);
}

.search-card-snippet {
  margin: 4px 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.search-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: #f7f4ec;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.3;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.search-card-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.search-card-game-link {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.search-card-game-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.search-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.search-card-cta:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.search-mark {
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 650;
}

.search-empty .panel-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-empty-tips {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

@media (max-width: 700px) {
  .search-card {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px 10px;
    padding: 12px;
  }

  .search-card-rank {
    width: 28px;
    height: 28px;
    margin-top: 10px;
    font-size: 0.72rem;
  }

  .search-card-icon {
    width: 40px;
    height: 40px;
  }

  .search-card-aside {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 0;
  }

  .search-card-title {
    font-size: 0.98rem;
  }
}

/* ---- Voting Check docs ---- */
.voting-check {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.voting-check-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 88px;
  min-width: 0;
}

.voting-check-intro h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
}

.voting-check-intro p {
  margin: 0 0 10px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.voting-check-intro p:last-child {
  margin-bottom: 0;
}

.voting-check-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.voting-check-toc a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: background 0.15s ease, color 0.15s ease;
}

.voting-check-toc a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.voting-check-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.voting-check-section {
  scroll-margin-top: 96px;
  min-width: 0;
}

.voting-check-callout {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: var(--accent-soft);
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.voting-check-callout--warn {
  background: #fbf3e3;
  border-color: #e2c98a;
}

.voting-check-steps {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  counter-reset: vc-step;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.voting-check-steps > li {
  position: relative;
  margin: 0;
  padding: 14px 16px 14px 52px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.voting-check-steps > li::before {
  counter-increment: vc-step;
  content: counter(vc-step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voting-check-steps > li strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.voting-check-steps > li span {
  display: block;
}

.voting-check-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 16px;
}

.voting-check-compare-card {
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  min-width: 0;
}

.voting-check-compare-card h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.voting-check-compare-card p {
  margin: 0 0 10px;
}

.voting-check-compare-card ul {
  margin: 0 0 12px;
}

.voting-check-compare-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.voting-check-compare-link:hover {
  text-decoration: underline;
}

.voting-check-table-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.voting-check-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.84rem;
}

.voting-check-table th,
.voting-check-table td {
  border: 1px solid var(--border-light);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
  color: var(--text-secondary);
}

.voting-check-table tr > *:first-child {
  border-left: none;
}

.voting-check-table tr > *:last-child {
  border-right: none;
}

.voting-check-table thead tr > * {
  border-top: none;
}

.voting-check-table tbody tr:last-child > * {
  border-bottom: none;
}

.voting-check-table th {
  background: var(--bg-table-head);
  color: var(--text-primary);
  font-weight: 700;
  white-space: nowrap;
}

.voting-check-table code {
  word-break: break-all;
  overflow-wrap: anywhere;
}

.voting-check-code {
  margin: 14px 0 8px;
  padding: 16px 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.55;
  max-width: 100%;
}

.voting-check-code code {
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
  word-break: normal;
}

.voting-check .legal-content code,
.voting-check .legal-content p,
.voting-check .legal-content li {
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .voting-check {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .voting-check-side {
    position: static;
    gap: 12px;
  }

  .voting-check-nav .panel-body {
    padding: 12px;
  }

  .voting-check-toc {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .voting-check-toc li {
    flex: 0 0 auto;
  }

  .voting-check-toc a {
    padding: 8px 12px;
    background: var(--accent-soft);
    white-space: nowrap;
  }

  .voting-check-compare {
    grid-template-columns: 1fr;
  }

  .voting-check-main {
    gap: 14px;
  }

  .voting-check-section {
    scroll-margin-top: 80px;
  }

  .voting-check-section .panel-body {
    padding: 16px;
  }

  .voting-check-steps > li {
    padding: 12px 12px 12px 48px;
  }

  .voting-check-table {
    font-size: 0.8rem;
  }

  .voting-check-table th,
  .voting-check-table td {
    padding: 8px 10px;
  }

  .voting-check-code {
    font-size: 0.72rem;
    padding: 14px;
  }
}

@media (max-width: 560px) {
  .voting-check-intro .panel-body,
  .voting-check-nav .panel-body,
  .voting-check-section .panel-body {
    padding: 14px;
  }

  .voting-check-callout {
    padding: 12px;
    font-size: 0.84rem;
  }

  .voting-check-steps > li {
    padding: 12px 12px 12px 44px;
    font-size: 0.84rem;
  }

  .voting-check-steps > li::before {
    left: 10px;
    top: 12px;
    width: 24px;
    height: 24px;
  }

  .voting-check-table {
    min-width: 360px;
  }

  .voting-check-code {
    margin-left: -14px;
    margin-right: -14px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* ---- Advertising ---- */
.ads-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.ads-alert {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.5;
}

.ads-alert--warn {
  background: #fbf3e3;
  border: 1px solid #e2c98a;
}

.ads-alert--danger {
  background: #fdecea;
  border: 1px solid #e5a39a;
  color: #7f1d1d;
}

.ads-balance-hint {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.ads-meta-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.ads-meta-table td {
  padding: 8px 10px;
  border: 1px solid var(--border-light);
}

.ads-meta-table td:first-child {
  width: 35%;
  background: var(--bg-elevated);
  font-weight: 600;
}

.ads-example-label,
.ads-subhead {
  font-weight: 700;
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.ads-benefits {
  margin: 16px 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.ads-benefits strong { color: var(--text-primary); }

.ads-premium-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid #e4d19a;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 248, 220, 0.95) 0%, rgba(255, 252, 240, 0.98) 55%, #fff 100%);
  box-shadow: inset 3px 0 0 #c9a227;
}

.ads-premium-card-rank {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2px;
}

.ads-premium-card-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ads-premium-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ads-premium-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.ads-premium-card-titlewrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ads-premium-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 2px 7px;
  border-radius: 999px;
  background: #c9a227;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ads-premium-card-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ads-premium-card-banner {
  position: relative;
  width: 100%;
  max-width: 468px;
  aspect-ratio: 468 / 60;
  border-radius: 4px;
  overflow: hidden;
  background: #f3f0e8;
  border: 1px solid rgba(201, 162, 39, 0.28);
}

.ads-demo-banner {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.ads-demo-banner[hidden] {
  display: none !important;
}

.ads-demo-banner-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 6px,
      rgba(0, 0, 0, 0.03) 6px,
      rgba(0, 0, 0, 0.03) 12px
    );
}

.ads-premium-card-banner.has-banner .ads-demo-banner-ph,
.ads-top-demo-banner.has-banner .ads-demo-banner-ph,
.ads-sticky-demo-banner.has-banner .ads-demo-banner-ph {
  display: none;
}

.ads-premium-card-ip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ads-note {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.ads-top-demo {
  display: grid;
  grid-template-columns: 56px minmax(0, 468px) minmax(120px, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fffef8, #f7f4ea);
}

.ads-top-demo .top-ad-rank {
  display: flex;
  justify-content: center;
}

.ads-top-demo .top-ad-about {
  min-width: 0;
}

.ads-top-demo .top-ad-server {
  min-width: 0;
}

.ads-top-demo .ads-top-demo-banner {
  position: relative;
  width: min(100%, var(--banner-w, 468px));
  aspect-ratio: var(--banner-w, 468) / var(--banner-h, 60);
  border-radius: 4px;
  overflow: hidden;
  background: #f3f0e8;
  border: 1px solid var(--border-light);
  max-width: none;
}

@media (max-width: 720px) {
  .ads-top-demo {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas:
      "rank about"
      "banner banner"
      "action action";
  }

  .ads-top-demo .top-ad-rank { grid-area: rank; }
  .ads-top-demo .top-ad-about { grid-area: about; }
  .ads-top-demo .top-ad-server { grid-area: banner; }
  .ads-top-demo .top-ad-action { grid-area: action; }
}

.ads-horn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border-radius: 4px;
  background: #2f2a24;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.ads-sticky-demo {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(20, 18, 16, 0.94);
  color: #f5f2eb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.ads-sticky-demo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 16px;
}

.ads-sticky-demo-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
  max-width: 220px;
}

.ads-sticky-demo-meta strong,
.ads-sticky-demo-meta .sticky-ad-name,
#sticky-demo-name {
  font-family: var(--font-minecraft);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.ads-sticky-demo-ip {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.85;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ads-sticky-demo .sticky-ad-copy.ipcopy,
.ads-sticky-demo .ipcopy.sticky-ad-copy {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: #1c1916;
  box-shadow: none;
  overflow: hidden;
}

.ads-sticky-demo .sticky-ad-copy .ipcopy-host,
.ads-sticky-demo .ipcopy.sticky-ad-copy .ipcopy-host {
  background: #1c1916;
}

.ads-sticky-demo-banner {
  position: relative;
  flex: 0 1 auto;
  width: min(100%, var(--banner-w, 468px));
  max-width: var(--banner-w, 468px);
  aspect-ratio: var(--banner-w, 468) / var(--banner-h, 60);
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.ads-sticky-demo .ads-demo-banner-ph {
  color: rgba(245, 242, 235, 0.55);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 6px,
      rgba(255, 255, 255, 0.04) 6px,
      rgba(255, 255, 255, 0.04) 12px
    );
}

@media (max-width: 640px) {
  .ads-sticky-demo-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .ads-sticky-demo-meta {
    max-width: 100%;
  }

  .ads-sticky-demo-banner {
    width: 100%;
  }

  .ads-sticky-demo .sticky-ad-copy {
    width: 100%;
    --ip-w: 100%;
  }
}

.form-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.form-section-subtitle {
  margin: 8px 0 10px;
  font-size: 0.95rem;
}

/* Top ads on listing — same columns as .server-table so banners align */
.top-ads-wrap {
  margin: 0 0 10px;
}

.top-ads-table {
  margin: 0;
  /* collapse + cell radius paints a second outer ring at the corners */
  border-collapse: separate;
  border-spacing: 0;
}

.top-ad td {
  padding: 12px 18px;
  vertical-align: middle;
  background: linear-gradient(180deg, #fffef8, #f7f4ea);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 0;
  border-right: 0;
}

.top-ad td:first-child {
  border-left: 1px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
}

.top-ad td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.top-ad + .top-ad td {
  border-top: none;
}

.top-ad:hover td {
  border-color: rgba(74, 156, 78, 0.45);
  background: linear-gradient(180deg, #fffef8, #f3f0e4);
}

.top-ad:hover .top-ad-copy {
  border-color: var(--accent);
}

.top-ad-rank {
  text-align: center;
}

.top-ad-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 48px;
  height: 48px;
  padding: 4px 0;
  border-radius: var(--radius);
  background: #2f2a24;
  color: #fff;
  box-shadow: 0 1px 3px rgba(44, 40, 36, 0.12);
}

.top-ad-megaphone {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.top-ad-badge-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.top-ad-about {
  min-width: 0;
  padding-left: 4px;
}

.top-ad-name {
  display: block;
  font-family: var(--font-minecraft);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-ad-name:hover {
  color: var(--accent-dark);
}

.top-ad-ip {
  display: block;
  margin-top: 4px;
  max-width: 100%;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-ad-ip--muted {
  font-weight: 500;
  color: var(--text-muted);
}

.top-ad-server {
  min-width: 0;
}

.top-ad-info {
  display: none;
}

.top-ad-action {
  text-align: left;
}

.top-ad-action .row-actions {
  max-width: 210px;
}

.top-ad-copy.ipcopy {
  --ip-w: 200px;
  width: var(--ip-w);
  max-width: 100%;
}

.top-ad--activation td {
  background: linear-gradient(180deg, #1a1a16, #14140f);
  border-color: #2a2820;
}

.top-ad--activation:hover td {
  background: linear-gradient(180deg, #1f1f1a, #181812);
  border-color: #2a2820;
}

.top-ad--activation + .top-ad td,
.top-ad + .top-ad--activation td {
  border-top: none;
}

.top-ad-name--muted {
  color: rgba(255, 202, 40, 0.75);
}

.top-ad--activation .top-ad-name--muted:hover {
  color: #ffca28;
}

.top-ad--activation .top-ad-badge {
  background: #2a2410;
  color: #ffca28;
  box-shadow: none;
  border: 1px solid rgba(255, 202, 40, 0.45);
}

.top-ad--activation .top-ad-copy {
  border-color: rgba(255, 202, 40, 0.45);
  color: #ffca28;
  border-radius: var(--radius);
  overflow: hidden;
}

.top-ad--activation .top-ad-copy .ipcopy-host {
  border-radius: 0;
}

.top-ad--activation .top-ad-copy .ipcopy-action {
  background: #ffca28;
  color: #1a1608;
  border-top-color: rgba(26, 22, 8, 0.12);
}

.top-ad--activation:hover .top-ad-copy {
  border-color: #ffca28;
}

.top-ad--activation:hover .top-ad-copy .ipcopy-action {
  background: #ffd54f;
  color: #1a1608;
}

/* Avoid double frame: .server-block already has a border/radius. */
.top-ad--activation .server-block {
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.activation-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: min(100%, var(--ad-banner-w, 468px));
  height: var(--ad-banner-h, 60px);
  padding: 0 14px;
  color: #ffca28;
  border: 1px solid #ffca28;
  border-radius: var(--radius);
  background: rgba(255, 202, 40, 0.06);
  text-decoration: none;
  text-align: center;
  font-family: var(--font-ui, inherit);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  transition: background 0.15s ease;
}

.activation-bar:hover {
  color: #ffca28;
  background: rgba(255, 202, 40, 0.14);
}

/* Compact CTA under existing sponsored rows — one clean bar, not a crushed ad row. */
.top-ad--activation-slim td.top-ad-slim-cell {
  padding: 8px 12px;
  background: linear-gradient(180deg, #1a1a16, #14140f);
  border-color: #2a2820;
}

.top-ad--activation-slim:hover td.top-ad-slim-cell {
  background: linear-gradient(180deg, #1f1f1a, #181812);
}

.activation-slim-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px 8px 12px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 202, 40, 0.4);
  border-radius: var(--radius);
  background: rgba(255, 202, 40, 0.06);
  text-decoration: none;
  color: #ffca28;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.activation-slim-bar:hover {
  background: rgba(255, 202, 40, 0.12);
  border-color: #ffca28;
  color: #ffca28;
}

.activation-slim-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 5px 9px;
  border-radius: calc(var(--radius) - 2px);
  background: #2a2410;
  border: 1px solid rgba(255, 202, 40, 0.45);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.activation-slim-badge .top-ad-megaphone {
  width: 14px;
  height: 14px;
}

.activation-slim-copy {
  flex: 1;
  min-width: 0;
  font-family: var(--font-ui, inherit);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: rgba(255, 220, 120, 0.92);
}

.activation-slim-bar:hover .activation-slim-copy {
  color: #ffe082;
}

.activation-slim-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: calc(var(--radius) - 2px);
  background: #ffca28;
  color: #1a1608;
  font-family: var(--font-ui, inherit);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.activation-slim-bar:hover .activation-slim-cta {
  background: #ffd54f;
}
@media (max-width: 900px) {
  .top-ads-wrap {
    margin-bottom: 16px;
    overflow: visible;
  }

  .top-ads-table,
  .top-ads-table tbody {
    min-width: 0;
    display: block;
  }

  .top-ad {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "rank about"
      "banner banner"
      "action action";
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: linear-gradient(180deg, #fffef8, #f7f4ea);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-sizing: border-box;
    overflow: hidden;
  }

  .top-ad + .top-ad {
    margin-top: 10px;
  }

  .top-ad td {
    display: block !important;
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    min-height: 0;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    margin: 0;
    /* Kill leaked .server-entry cell grid-area names */
    grid-area: auto;
  }

  .top-ad .top-ad-rank,
  .top-ad .cell-rank {
    grid-area: rank !important;
    width: auto !important;
  }

  .top-ad .top-ad-about,
  .top-ad .cell-name {
    grid-area: about !important;
    min-width: 0;
  }

  .top-ad .top-ad-server,
  .top-ad .cell-server {
    grid-area: banner !important;
    width: 100% !important;
  }

  .top-ad .top-ad-info,
  .top-ad .cell-info {
    display: none !important;
  }

  .top-ad .top-ad-action,
  .top-ad .cell-ip {
    grid-area: action !important;
    width: 100% !important;
  }

  /* Name gets the row; IP is shown on the Copy button below. */
  .top-ad .top-ad-ip {
    display: none;
  }

  .top-ad .top-ad-name {
    font-size: 1.15rem;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .top-ad .server-block {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: var(--banner-w, 468) / var(--banner-h, 60);
    overflow: hidden;
  }

  .top-ad .banner-link,
  .top-ad .server-banner {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
  }

  .top-ad.top-ad--activation-slim {
    padding: 0;
  }

  .top-ad--activation-slim td.top-ad-slim-cell {
    padding: 8px 10px;
  }

  .activation-slim-bar {
    flex-wrap: wrap;
    gap: 10px;
    min-height: 0;
    padding: 10px 12px;
  }

  .activation-slim-copy {
    flex: 1 1 160px;
    font-size: 0.86rem;
  }

  .activation-slim-cta {
    margin-left: auto;
  }

  .top-ad .activation-bar {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: var(--ad-banner-h, 60px);
    aspect-ratio: var(--ad-banner-w, 468) / var(--ad-banner-h, 60);
    font-size: 0.82rem;
    padding: 8px 12px;
  }

  .top-ad .top-ad-copy.ipcopy,
  .top-ad .cell-ip .ipcopy {
    --ip-w: 100%;
    width: 100% !important;
    max-width: 100% !important;
    height: 52px;
    align-self: stretch;
  }
}

/* Sticky bottom ad — desktop aligns with .server-table columns */
.sticky-ad-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: rgba(20, 18, 16, 0.96);
  color: #f5f2eb;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.28);
}

.sticky-ad-inner {
  display: grid;
  grid-template-columns: 70px 280px 480px 140px 220px;
  align-items: center;
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 10px 20px;
  box-sizing: border-box;
}

.sticky-ad-col {
  min-width: 0;
  padding: 0 18px;
  box-sizing: border-box;
}

.sticky-ad-col--rank,
.sticky-ad-col--info {
  padding: 0;
}

.sticky-ad-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.sticky-ad-meta:hover .sticky-ad-name {
  color: #fff;
}

.sticky-ad-name {
  display: block;
  font-family: var(--font-minecraft);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: #f5f2eb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-ad-ip {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  opacity: 0.85;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-ad-banner {
  display: block;
  width: var(--banner-w, 468px);
  max-width: 100%;
  height: var(--banner-h, 60px);
  line-height: 0;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.sticky-ad-banner .server-banner {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sticky-ad-col--action {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.sticky-ad-copy.ipcopy {
  --ip-w: 184px;
  width: var(--ip-w);
  max-width: 100%;
  height: var(--banner-h, 60px);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: #1c1916;
  box-shadow: none;
  overflow: hidden;
}

.sticky-ad-copy.ipcopy:hover,
.sticky-ad-copy.ipcopy:focus-visible {
  border-color: var(--accent);
  box-shadow: none;
}

.sticky-ad-copy .ipcopy-host {
  background: #1c1916;
  color: #f5f2eb;
  font-size: 0.8rem;
}

.sticky-ad-copy .ipcopy-action {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

body.has-sticky-ad {
  /* Fallback until JS measures the bar; JS sets --sticky-ad-offset exactly. */
  padding-bottom: var(--sticky-ad-offset, 120px);
}

/* Tablet / narrow desktop: drop fixed table columns, keep a compact row */
@media (max-width: 1200px) {
  .sticky-ad-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px 14px;
    width: 100%;
    max-width: var(--max-width);
    min-width: 0;
    padding: 10px 16px;
  }

  .sticky-ad-col {
    padding: 0;
  }

  .sticky-ad-col--rank,
  .sticky-ad-col--info {
    display: none;
  }

  .sticky-ad-col--about {
    flex: 0 1 200px;
    min-width: 120px;
  }

  .sticky-ad-col--server {
    flex: 1 1 auto;
    min-width: 0;
  }

  .sticky-ad-banner {
    width: min(100%, var(--banner-w, 468px));
    height: auto;
    aspect-ratio: var(--banner-w, 468) / var(--banner-h, 60);
  }

  .sticky-ad-col--action {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

/* Phones: stacked sticky card — name, banner, full-width copy */
@media (max-width: 700px) {
  .sticky-ad-bar {
    overflow: visible;
  }

  .sticky-ad-inner {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .sticky-ad-col--rank,
  .sticky-ad-col--info {
    display: none;
  }

  .sticky-ad-col--about,
  .sticky-ad-col--server,
  .sticky-ad-col--action {
    flex: none;
    width: 100%;
    margin: 0;
    min-width: 0;
  }

  .sticky-ad-name {
    font-size: 1.15rem;
  }

  .sticky-ad-ip {
    font-size: 0.9rem;
  }

  .sticky-ad-banner {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: var(--banner-w, 468) / var(--banner-h, 60);
  }

  .sticky-ad-col--action {
    display: block;
  }

  .sticky-ad-copy.ipcopy {
    --ip-w: 100%;
    width: 100%;
    max-width: none;
    height: 56px;
    border-radius: 6px;
  }

  .sticky-ad-copy .ipcopy-host {
    font-size: 0.88rem;
  }

  .sticky-ad-copy .ipcopy-action {
    flex-basis: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  body.has-sticky-ad {
    /* Tall stacked sticky (name + banner + copy); JS overrides with exact height. */
    padding-bottom: var(--sticky-ad-offset, 240px);
  }
}

.similar-premium {
  margin-top: 24px;
}

.similar-servers {
  margin-top: 16px;
}

.similar-servers .panel-header h2,
.similar-premium .panel-header h2 {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

.similar-premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.similar-servers-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
}

.similar-premium-card,
.similar-servers-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}

.similar-servers-card {
  flex: 1 1 0;
  min-width: 0;
}

.similar-premium-card:hover,
.similar-servers-card:hover {
  border-color: var(--accent);
}

.similar-premium-card strong,
.similar-servers-card strong {
  display: block;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.similar-premium-card small,
.similar-servers-card small {
  color: var(--text-muted);
}

.similar-premium-card img,
.similar-servers-card img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.similar-servers-card span {
  min-width: 0;
}

@media (max-width: 900px) {
  .similar-servers-grid {
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .similar-servers-card {
    flex: 0 0 180px;
  }

  .ads-layout {
    grid-template-columns: 1fr;
  }
}
