/* =========================================================
   LT-FR — Shared Stylesheet (menu styles included)
   Sections: 1 Themes · 2 Base · 3 Shared components · 4 Header & menu
             5 Index · 6 Login · 7 Account · 8 Leaderboard · 9 Admin · 10 Player profile
             11 Map
   ========================================================= */

/* =========================================================
   1. Theme variables
   ========================================================= */
:root {
  --bg-color: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.85);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --border-color: rgba(255, 255, 255, 0.1);
  --status-online: #22c55e;
  --status-offline: #ef4444;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --bg-overlay: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.85));
  --dropdown-bg: #1e293b;
  --row-alt: rgba(255, 255, 255, 0.03);
  --row-hover: rgba(59, 130, 246, 0.1);
  --accent-soft: rgba(59, 130, 246, 0.2);   /* pill / soft highlight backgrounds */
  --accent-glow: rgba(59, 130, 246, 0.3);   /* button drop-shadow glow */
  --nav-hover: rgba(59, 130, 246, 0.15);    /* burger menu item hover */

  --inset-bg: rgba(0, 0, 0, 0.15);          /* recessed boxes / inputs */
  --accent-fill: var(--accent-color);       /* solid fills that carry white text */
  --btn-image: none;                        /* extra background layer for solid buttons */
  --btn-hover-filter: none;
}

[data-theme="light"] {
  --bg-color: #dde3ec;
  --card-bg: rgba(234, 239, 246, 0.90);
  --text-main: #0f172a;
  --text-muted: #475569;
  --accent-color: #1d4ed8;
  --accent-hover: #1e40af;
  --border-color: rgba(15, 23, 42, 0.12);
  --shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.18);
  --bg-overlay: linear-gradient(rgba(203, 213, 225, 0.80), rgba(191, 202, 217, 0.88));
  --dropdown-bg: #eaeff6;
  --row-alt: rgba(15, 23, 42, 0.03);
  --row-hover: rgba(29, 78, 216, 0.08);
  --accent-soft: rgba(29, 78, 216, 0.14);
  --accent-glow: rgba(29, 78, 216, 0.25);
  --nav-hover: rgba(29, 78, 216, 0.10);
}

/* Vice — GTA VI, toned down: near-black indigo base (like the GTAForums 2020
   blue theme, but darker), cool lavender borders, and a soft pink accent used
   sparingly. Solid buttons use a deep plum gradient instead of the bright accent
   (white text on soft pink is unreadable). */
[data-theme="vice"] {
  color-scheme: dark;
  --bg-color: #0b0916;
  --card-bg: rgba(21, 17, 44, 0.86);
  --text-main: #ece8f7;
  --text-muted: #a79fc4;
  --accent-color: #e04a9a;            /* links, icons, borders, focus rings */
  --accent-hover: #a8286f;            /* hover for solid buttons */
  --border-color: rgba(150, 160, 255, 0.16);
  --status-online: #35d0b0;
  --status-offline: #f0546e;
  --shadow: 0 10px 28px -8px rgba(0, 0, 0, 0.65);
  --bg-overlay: linear-gradient(180deg, rgba(8, 6, 20, 0.90) 0%, rgba(14, 11, 32, 0.88) 60%, rgba(46, 14, 54, 0.82) 100%);
  --dropdown-bg: #17122f;
  --row-hover: rgba(224, 74, 154, 0.10);
  --accent-soft: rgba(224, 74, 154, 0.14);
  --accent-glow: rgba(224, 74, 154, 0.22);
  --nav-hover: rgba(224, 74, 154, 0.12);

  --accent-fill: #a8286f;
  --btn-image: linear-gradient(135deg, #8f2a78, #b8336f);
  --btn-hover-filter: brightness(1.12);
}

/* =========================================================
   2. Base
   ========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

[hidden] { display: none !important; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  background-image: var(--bg-overlay), url('/inc/images/background.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header + footer pinned to top/bottom (login, account, top, reset password) */
body.layout-split { justify-content: space-between; }

a {
  color: var(--accent-color);
  text-decoration: none;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Main containers ---------- */
main {
  margin: 2rem auto;
  padding: 0 1.5rem;
  width: 100%;
}

main.main-index   { max-width: 800px; text-align: center; }
main.main-login   { max-width: 500px; }
main.main-account { max-width: 700px; }
main.main-top     { max-width: 900px; }
main.main-admin   { max-width: 960px; }

/* A single card centred in the free space (reset password) */
main.main-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Player profile. NOTE: the old page asked for 1000px but the more specific
   main.main-account (700px) silently won - 700px is what was always displayed. */
main.main-profile {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 15px;
}

footer {
  margin-top: auto; /* body is a full-height flex column: the footer always sits at the bottom, on every page */
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ---------- Small utilities ---------- */
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.icon-accent { color: var(--accent-color); }
.icon-gold   { color: #eab308; margin-right: 0.5rem; }

/* =========================================================
   3. Shared components
   ========================================================= */

/* ---------- Glass surfaces ---------- */
.server-card,
.account-card,
.auth-card,
.players-card,
.faq-content,
.nav-menu {
  background-color: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.server-card,
.account-card,
.auth-card,
.faq-content {
  padding: 2rem;
}

.players-card {
  padding: 1.5rem;
  text-align: left;
}

.server-card,
.account-card {
  margin-bottom: 2rem;
}

/* Reset-password card: narrower, centred text */
.auth-card-sm {
  max-width: 400px;
  width: 100%;
  text-align: center;
}

/* Small glass controls */
.btn-burger,
.social-btn {
  background-color: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

/* ---------- Recessed boxes ---------- */
.ip-address,
.player-badge,
.form-control,
.stat-box,
.vip-status-card,
.admin-panel {
  background-color: var(--inset-bg);
  border: 1px solid var(--border-color);
}

/* ---------- Solid buttons (one look, theme-aware via --btn-image / --btn-hover-filter) ---------- */
.btn-copy,
.btn-submit,
.btn-block {
  background-color: var(--accent-color);
  background-image: var(--btn-image);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-copy:hover,
.btn-submit:hover,
.btn-block:hover {
  background-color: var(--accent-hover);
  filter: var(--btn-hover-filter);
}

.btn-copy {
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-submit {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-buy { margin-top: 1rem; }

/* Full-width action button (admin actions, logout). Variants: .btn-ghost, .btn-danger */
.btn-block {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-block.btn-ghost {
  background-color: transparent;
  background-image: none;
  border-color: var(--border-color);
  color: var(--text-main);
  box-shadow: none;
}

.btn-block.btn-ghost:hover {
  background-color: var(--accent-soft);
  border-color: var(--accent-color);
  filter: none;
}

.btn-block.btn-danger {
  background-color: #dc2626;
  background-image: none;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-block.btn-danger:hover {
  background-color: #b91c1c;
  filter: none;
}

/* ---------- Alerts ---------- */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.account-card .alert { margin-bottom: 1.5rem; }
.auth-card .alert    { margin-bottom: 1.25rem; }

.alert-danger {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--status-offline);
  color: #fca5a5;
}

.alert-success {
  background-color: rgba(34, 197, 94, 0.15);
  border: 1px solid var(--status-online);
  color: #86efac;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Selects: kill the native OS chrome (the "grey box" Edge/Chrome draw) and
   swap in a theme-aware arrow. The popup list itself is styled via the
   option rule below, using a solid --dropdown-bg since browsers ignore
   translucent backgrounds on native option lists. */
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--dropdown-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 13px;
  padding-right: 2.5rem;
  cursor: pointer;
}

select.form-control::-ms-expand { display: none; }

select.form-control option {
  background-color: var(--dropdown-bg);
  color: var(--text-main);
}

/* ---------- Tables (leaderboard + admin log) ---------- */
.lb-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.2s;
}

.lb-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1.5rem 1rem;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.data-table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background-color: rgba(0, 0, 0, 0.12);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

[data-theme="light"] .data-table thead th { background-color: rgba(0, 0, 0, 0.04); }

.data-table tbody td {
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:nth-child(even) { background-color: var(--row-alt); }
.data-table tbody tr:hover { background-color: var(--row-hover); }

/* ---------- VIP badge ---------- */
.badge-vip {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #000000;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.8rem;
}

/* ---------- Page headings shared by account / admin / top / profile ---------- */
.welcome-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.welcome-title {
  font-size: 1.75rem;
  font-weight: 800;
}

.nickname-badge { color: var(--accent-color); }

/* Title on the left, something on the right (wraps on narrow screens) */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-row .welcome-title { margin: 0; }

/* =========================================================
   4. Header, burger menu, footer
   ========================================================= */
header {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-main);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}


.btn-account {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--accent-soft);
  border: 1px solid var(--accent-color);
  color: var(--text-main);
}

.btn-account:hover {
  background-color: var(--accent-fill);
  color: #ffffff;
}

.nav-dropdown { position: relative; }

.btn-burger {
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.btn-burger:hover,
.btn-burger.active {
  background-color: var(--accent-fill);
  color: #ffffff;
  border-color: var(--accent-color);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  width: 200px;
  border-radius: 12px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.nav-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-item i {
  color: var(--accent-color);
  width: 18px;
  text-align: center;
}

.nav-item:hover {
  background-color: var(--nav-hover);
  color: var(--accent-color);
}

/* Settings menu (gear next to the account button): language + theme */
.settings-menu {
  left: auto;
  right: 0;
  width: 210px;
}

.settings-label {
  padding: 0.5rem 1rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.settings-label:not(:first-child) {
  margin-top: 0.25rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Theme options are <button>s - make them look like the links */
button.settings-option {
  width: 100%;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.settings-code {
  width: 18px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-color);
}

.settings-check {
  margin-left: auto;
  visibility: hidden;
}

.settings-option.active { background-color: var(--accent-soft); }
.settings-option.active .settings-check { visibility: visible; }

/* Background overlay when the menu is open */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Vice theme flourishes (safe to delete) */
[data-theme="vice"] .logo span {
  background: linear-gradient(90deg, #7c8cff 0%, #c46fd6 50%, #e04a9a 80%, #f0a35e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none; /* otherwise the shadow shows through the transparent glyphs */
}

[data-theme="vice"] .hero-title { text-shadow: 0 0 14px rgba(224, 74, 154, 0.25); }

@media (max-width: 480px) {
  header { padding: 1rem 1rem; }
  .logo { font-size: 1.05rem; }
  .header-controls { gap: 0.5rem; }
  main { padding: 0 1rem; }
}

/* =========================================================
   5. Index page (server status / landing)
   ========================================================= */
.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  background-color: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--status-offline);
}

.status-dot.online {
  background-color: var(--status-online);
  box-shadow: 0 0 10px var(--status-online);
}

.ip-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.ip-address {
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-family: monospace;
  font-size: 1.1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.stat-item h4 {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.stat-item p {
  font-size: 1.25rem;
  font-weight: 600;
}

.players-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.players-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.player-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-main);
}

.player-badge i {
  font-size: 0.5rem;
  color: var(--status-online);
}

.player-badge a { color: inherit; }

/* Download / community buttons: rows of centred buttons */
.links-section { margin-top: 2.5rem; }

.links-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.links-grid + .links-grid { margin-top: 1rem; }

.social-btn {
  color: var(--text-main);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

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

.openmp-icon {
  width: 18px;
  height: 18px;
}

/* DUK (FAQ) section */
.faq-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 2rem;
}

.faq-content {
  width: 100%;
  text-align: left;
  animation: fadeIn 0.3s ease;
}

.faq-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.faq-item:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.faq-item h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-item h3 i {
  color: var(--accent-color);
  font-size: 0.9rem;
}

.faq-item p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  padding-left: 1.4rem;
}

.faq-item p strong { color: var(--text-main); }

.close-faq-btn {
  width: 100%;
  justify-content: center;
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: none;
  margin-top: 1.5rem;
}

.close-faq-btn:hover {
  background-color: var(--status-offline);
  color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .hero-title { font-size: 1.8rem; }
  .ip-box { flex-direction: column; }
  .btn-copy { width: 100%; justify-content: center; }
}

/* =========================================================
   6. Login page (auth tabs)
   ========================================================= */
.tab-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem 0.5rem;
  border-radius: 8px;
  text-align: center;
}

.tab-btn.active {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.account-list {
  list-style: none;
  margin-top: 1rem;
  text-align: left;
}

.account-list li {
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-family: monospace;
  font-weight: 600;
}

.account-list-intro {
  font-size: 0.9rem;
  text-align: left;
}

.account-list-empty { margin-top: 1rem; }

.divider {
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid var(--border-color);
}

.form-subtitle {
  margin-bottom: 0.8rem;
  text-align: left;
}

/* =========================================================
   7. Account page (profile / VIP)
   ========================================================= */
.stat-box {
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  font-size: 1.5rem;
  color: var(--accent-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
}

.vip-status-card {
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.vip-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.vip-active { color: #facc15; }

.vip-line  { margin-bottom: 0.5rem; }
.vip-until { font-size: 0.95rem; }
.vip-until-none { margin-bottom: 1rem; }

.vip-missing-credits {
  color: var(--status-offline);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  text-align: center;
}

/* ---------- Credit transfer (/transfer) ---------- */
.transfer-hint { font-size: 0.9rem; margin-bottom: 1.25rem; }

.form-group .form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* 1..5 as big tap targets: one row on every screen width */
.amount-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.amount-picker .amount-option { position: relative; margin: 0; } /* beats .form-group label */

.amount-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.amount-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--inset-bg);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.amount-option input:checked + span {
  background-color: var(--accent-soft);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 1px var(--accent-color) inset;
}

.amount-option input:focus-visible + span { outline: 2px solid var(--accent-color); outline-offset: 2px; }

.amount-option input:disabled + span { opacity: 0.35; cursor: not-allowed; }

.transfer-list { list-style: none; margin: 0; padding: 0; }

.transfer-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-color);
}

.transfer-row:first-child { border-top: none; padding-top: 0; }

.transfer-who {
  flex: 1;
  min-width: 0;            /* long nicknames wrap instead of pushing the amount off-screen */
  overflow-wrap: anywhere;
}

.transfer-date { display: block; font-size: 0.8rem; margin-top: 0.15rem; }

.transfer-amount { font-weight: 800; white-space: nowrap; }

.transfer-in  { color: var(--status-online); }
.transfer-out { color: var(--status-offline); }

/* Admin list (admin_transfers.php) */
.transfer-summary { margin: 1.25rem 0 0.75rem; font-size: 0.9rem; }
.transfer-list-admin .transfer-row:first-child { padding-top: 0.75rem; border-top: 1px solid var(--border-color); }
.transfer-arrow { margin: 0 0.35rem; font-size: 0.8rem; }
.transfer-was   { font-size: 0.8rem; }

/* =========================================================
   8. TOP 10 leaderboard
   ========================================================= */
.top-subtitle { margin-top: 0.5rem; }

.top-selector {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.top-selector label {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.95rem;
}

.top-selector select {
  width: auto;
  max-width: 100%;
}

.top-board {
  padding: 1rem;
  position: relative;
}

.top-board h3 {
  margin-bottom: 1.25rem;
  text-align: center;
  color: var(--text-main);
  transition: opacity 0.2s;
  font-size: 1.1rem;
}

.leaderboard-table {
  max-width: 620px;
  min-width: 380px;
  margin: 0 auto;
  table-layout: fixed;
}

.leaderboard-table thead th {
  padding: 0.8rem 0.5rem;
  text-align: center;
}

.leaderboard-table thead th.lb-col-rank  { width: 44px; }
.leaderboard-table thead th.lb-col-name  { width: auto; text-align: left; padding-left: 0.9rem; }
.leaderboard-table thead th.lb-col-value { width: 150px; color: var(--text-main); }
.leaderboard-table thead th.lb-col-vip   { width: 64px; }

.leaderboard-table tbody td {
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.lb-rank {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.lb-rank.lb-top1 { color: #eab308; font-size: 1.1rem; }
.lb-rank.lb-top2 { color: #cbd5e1; }
.lb-rank.lb-top3 { color: #d97706; }

.leaderboard-table tbody td.lb-name {
  text-align: left;
  font-weight: 600;
  padding-left: 0.9rem;
  max-width: 0; /* forces ellipsis to respect the table-layout column width */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-name a { color: var(--accent-color); }

.lb-value {
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Tighten everything up so all 4 columns fit on a phone screen without
   forcing a horizontal scroll (which hides the VIP column with no
   visible scrollbar cue on iOS). */
@media (max-width: 480px) {
  .leaderboard-table {
    min-width: 0;
    font-size: 0.78rem;
  }

  .leaderboard-table thead th,
  .leaderboard-table tbody td {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .leaderboard-table thead th.lb-col-rank  { width: 24px; padding-left: 0.3rem; padding-right: 0.2rem; }
  .leaderboard-table thead th.lb-col-name,
  .leaderboard-table tbody td.lb-name      { padding-left: 0.4rem; }
  .leaderboard-table thead th.lb-col-value { width: 118px; }
  .leaderboard-table thead th.lb-col-vip   { width: 40px; }

  .leaderboard-table tbody td.lb-value {
    font-size: 0.74rem;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
  }

  .badge-vip {
    padding: 0.15rem 0.4rem;
    font-size: 0.68rem;
  }
}

/* =========================================================
   9. Admin page (player moderation)
   Uses the shared theme variables, so dark / light / vice
   all work without extra per-theme rules.
   ========================================================= */
.admin-who {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  flex-wrap: wrap;           /* 2 buttons + name: wrap on phones instead of overflowing */
  align-items: center;
  gap: 0.5rem;
}

.admin-who i { color: var(--accent-color); }

/* Search */
.admin-search {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-search .form-control { flex: 1 1 240px; width: auto; }

.admin-search .btn-submit {
  width: auto;
  margin-top: 0;
}

/* Pagination (bans.php) */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 1.25rem 0;
}

.pagination a,
.pagination .pagination-current {
  min-width: 2.25rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  text-align: center;
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--text-main);
}

.pagination a:hover { background-color: var(--row-hover); }

.pagination .pagination-current {
  background-color: var(--accent-color);
  color: #ffffff;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  display: inline-flex;
}

/* Players list (players.php) */
.players-stats  { margin-bottom: 1.5rem; }
.players-search { margin-bottom: 1.25rem; align-items: center; }
.players-search .players-clear,
.admin-search .bans-clear { width: auto; margin: 0; }
.players-found  { margin-bottom: 0.75rem; font-size: 0.9rem; }
/* 3 columns, 1 on narrow screens (no 2-column step): with 27 per page (players.php) every row is full */
.players-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (max-width: 860px) {
  .players-grid { grid-template-columns: minmax(0, 1fr); }
}

.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background-color: var(--row-alt);
  transition: background-color 0.15s, border-color 0.15s;
}

.player-row:hover {
  background-color: var(--row-hover);
  border-color: var(--accent-color);
}

.player-row-name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-weight: 600;
}

/* Nickname is never cut off: a long one wraps inside the card, after ] ) _ . where possible (player_link adds <wbr>) */
.player-row-name a {
  color: var(--accent-color);
  min-width: 0;
  overflow-wrap: anywhere;
}

.player-row-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.player-level {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Fixed-width number (right-aligned), so "LYGIS" and the VIP badge line up whether the level is 1 or 364 */
.player-level-num {
  display: inline-block;
  min-width: 3ch;
  text-align: right;
}

.player-level small {
  margin-right: 0.15rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Teams (teams.php): each card / header gets its team colour through --team-color */
.teams-lead { margin: -0.25rem 0 1.25rem; line-height: 1.6; }

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.team-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--team-color, var(--accent-color));
  border-radius: 10px;
  background-color: var(--row-alt);
  color: var(--text-main);
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}

.team-card:hover {
  background-color: var(--row-hover);
  border-color: var(--team-color, var(--accent-color));
  transform: translateY(-2px);
}

.team-card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.team-card-name { font-size: 1.1rem; font-weight: 800; }

/* Gang logo instead of an icon (teams.php ?gang=) */
.team-icon-img { overflow: hidden; background-color: transparent; }
.team-icon-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

/* Profile (player.php): team / gang tile - the whole tile links to its /teams page */
.profile-team-link {
  color: var(--text-main);
  text-decoration: none;
  border-left: 4px solid var(--team-color, var(--accent-color));
  transition: background-color 0.15s, border-color 0.15s;
}

.profile-team-link:hover {
  background-color: var(--row-hover);
  border-color: var(--team-color, var(--accent-color));
}

.profile-team-link .stat-icon { background: transparent; }
.profile-team-link .stat-value { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; }

/* Gang page (teams.php ?gang=): "Leaders" and "Members" headings above the two lists */
.team-list-title { margin-top: 0.25rem; }
.team-leaders { margin-bottom: 1.25rem; }

/* Gang management (gang.php) */
.gang-note { margin: -0.25rem 0 1rem; line-height: 1.5; font-size: 0.9rem; }
.gang-table-wrap { overflow-x: auto; }
.gang-table th,
.gang-table td { padding: 0.6rem 0.75rem; text-align: left; vertical-align: middle; }
.gang-table td:nth-child(3) { font-weight: 700; font-variant-numeric: tabular-nums; }
.gang-name { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-weight: 600; }
.gang-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.gang-action { margin: 0; }
.gang-action .btn-block {
  width: auto;
  margin: 0;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  white-space: nowrap;
}
.gang-wait { white-space: nowrap; font-size: 0.85rem; }

/* Phones: no horizontal scroll (the action buttons were hidden off to the right). Every member is a small
   card: name + rank on top, level and "in gang since" (labelled from data-label) below, buttons full width. */
@media (max-width: 600px) {
  .gang-card { padding: 1.25rem; }
  .gang-card .welcome-title { font-size: 1.3rem; }
  .gang-table-wrap { overflow: visible; }

  .gang-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0); /* hidden, but screen readers still get the column names */
  }
  .gang-table,
  .gang-table tbody { display: block; width: 100%; }

  .gang-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem 0.75rem;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
  }
  .gang-table tbody tr:last-child { margin-bottom: 0; }

  .gang-table tbody td { display: block; padding: 0; border: none; }
  .gang-table td:first-child { min-width: 0; }
  .gang-table .gang-col-rank { justify-self: end; }
  .gang-table .gang-col-level,
  .gang-table .gang-col-joined { font-size: 0.85rem; }
  .gang-table .gang-col-joined { justify-self: end; white-space: nowrap; }
  .gang-table .gang-name a { overflow-wrap: anywhere; }
  .gang-table td[data-label]::before {
    content: attr(data-label) ": ";
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  /* "In gang since": a calendar icon instead of the long label, so the right column stays narrow
     and the name keeps its width (the label is still in the hidden table header) */
  .gang-table .gang-col-joined[data-label]::before {
    content: "\f073";
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0;
    margin-right: 0.35rem;
  }

  .gang-table .gang-col-actions { grid-column: 1 / -1; }
  .gang-table .gang-col-actions:has(.gang-none) { display: none; }
  .gang-actions .gang-action { flex: 1 1 0; }
  .gang-action .btn-block { width: 100%; justify-content: center; padding: 0.5rem 0.7rem; }
}

/* Gang rank in the member list (gang_admin: leader / admin) */
.badge-gang-rank {
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--team-color, var(--accent-color));
  color: var(--team-color, var(--accent-color));
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.team-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 8px;
  background-color: color-mix(in srgb, var(--team-color, var(--accent-color)) 18%, transparent);
  color: var(--team-color, var(--accent-color));
  font-size: 1.1rem;
}

.team-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.team-card-stats span { display: inline-flex; align-items: center; gap: 0.35rem; }
.team-card-stats strong { color: var(--text-main); font-variant-numeric: tabular-nums; }

/* Nobody online: the dot stays, but grey and without the glow */
.players-online.team-offline { background-color: var(--text-muted); box-shadow: none; opacity: 0.5; }

.team-card-weapons {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.team-card-weapons i { color: var(--team-color, var(--accent-color)); margin-right: 0.2rem; }

.team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.team-header .welcome-title { display: flex; align-items: center; gap: 0.6rem; }
.team-back { width: auto; margin: 0; }
/* Disbanded clan (teams.php ?clan=): badge next to the name */
.team-disbanded-badge { --team-color: #f59e0b; font-size: 0.75rem; vertical-align: middle; }
.team-weapons { font-size: 0.9rem; font-weight: 600; line-height: 1.4; }

/* Account list panel (admin.php ?ip= / ?email=): gap below the search box */
.admin-ip-accounts { margin-top: 1.25rem; }

/* Accounts on one IP (admin.php ?ip=): small cards (name, then level / VIP / last seen), as many per row as fit */
.ip-accounts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.5rem;
}

.ip-account {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background-color: var(--row-alt);
}

.ip-account:hover { background-color: var(--row-hover); }

.ip-account-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
  font-weight: 600;
}

.ip-account-nick {
  color: var(--accent-color);
  overflow-wrap: anywhere;
}

.ip-account-profile {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.ip-account-profile:hover { color: var(--accent-color); }

.ip-account-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ip-account-seen {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Online: a green dot before the nickname (text in title / aria-label), like .status-dot.online */
.players-online {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--status-online);
  box-shadow: 0 0 8px var(--status-online);
}

/* Layout */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: start;
}

.admin-panel {
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.admin-grid > div > .admin-panel:last-child { margin-bottom: 0; }

.admin-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-section-title i { color: var(--accent-color); }

/* Player info rows */
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.92rem;
}

.info-row:last-child { border-bottom: none; }

.info-label { color: var(--text-muted); font-weight: 600; }

.info-value {
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

/* Action panels */
.admin-status {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.9rem;
}

.admin-status i { margin-top: 0.15rem; color: var(--accent-color); }
.admin-status.is-active i { color: var(--status-offline); }
.admin-status.is-ok i     { color: var(--status-online); }

.admin-note {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: -0.4rem 0 0.9rem 1.6rem;
  overflow-wrap: anywhere;
}

.admin-buttons { display: flex; flex-direction: column; gap: 0.6rem; }

.admin-form { display: flex; flex-direction: column; gap: 0.6rem; }

/* Latest actions table */
.admin-table { min-width: 480px; }

.admin-table thead th {
  padding: 0.8rem 0.6rem;
  text-align: left;
}

.admin-table tbody td { padding: 0.7rem 0.6rem; }

.admin-table th:first-child,
.admin-table td.num {
  width: 44px;
  text-align: center;
  color: var(--text-muted);
  font-weight: 700;
}

.admin-tag {
  background-color: var(--accent-soft);
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

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

/* =========================================================
   10. Player profile
   ========================================================= */
.profile-header .welcome-title {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  word-break: break-all;
  overflow-wrap: break-word;
}

.profile-header .nickname-badge { word-break: break-all; }

/* Profile nickname: a button that copies the permanent link (/player?id=N) */
.nickname-copy {
  padding: 0;
  border: 0;
  border-bottom: 2px dashed transparent;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s;
}

.nickname-copy:hover,
.nickname-copy:focus-visible { border-bottom-color: var(--accent-color); outline: none; }

.nickname-copy i,
.nickname-admin-link i {
  margin-left: 0.45rem;
  font-size: 0.6em;
  vertical-align: middle;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.nickname-copy:hover i,
.nickname-copy.copied i,
.nickname-admin-link:hover i { opacity: 1; }

.nickname-copy.copied i { color: #22c55e; }

/* Admins: shield icon next to the nickname opens /admin for this player */
.nickname-admin-link {
  color: var(--accent-color);
  text-decoration: none;
}

/* "Link copied!" note under the title */
.profile-copied {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #22c55e;
  word-break: break-all;
}

.profile-copied:empty { display: none; }

.grid-3,
.grid-4 {
  display: grid;
  gap: 15px;
}

.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.stat-box-custom {
  background: var(--card-bg, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.stat-box-custom .stat-icon {
  font-size: 1.4rem;
  min-width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--icon-bg, rgba(255, 255, 255, 0.05));
  border-radius: 8px;
  flex-shrink: 0;
}

.stat-box-custom .stat-content {
  overflow: hidden;
  width: 100%;
}

.stat-box-custom .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #8a99ad);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.stat-box-custom .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main, #333333);
  word-break: break-word;
}

.stat-box-custom .stat-value.stat-value-sm { font-size: 0.95rem; }

.stat-win { color: #22c55e; }

.profile-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.8rem 0 0.8rem 0;
  color: var(--text-main, #333333);
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-section-title i { color: var(--accent-color, #3b82f6); }

[data-theme="light"] .stat-box-custom {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.10);
}

[data-theme="light"] .stat-box-custom .stat-icon {
  background: rgba(15, 23, 42, 0.06);
}

/* =========================================================
   11. Map page
   ========================================================= */
/* The map fills a centred, clipped card instead of the full viewport */
main.main-map {
  max-width: 1200px;
  height: 75vh;
  padding: 0;
  display: flex;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

#map-canvas {
  width: 100%;
  height: 100%;
}

.map-status {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.map-status.is-error { border-color: var(--status-offline); }

/* Marker popup: Google draws it on a white background, so it needs its own
   dark text regardless of the site theme */
.map-popup {
  color: #1f2937;
  font: 13px/1.45 'Inter', system-ui, sans-serif;
  text-align: center;
  padding: 2px 0;
}

/* Trim Google's generous default InfoWindow padding */
.gm-style .gm-style-iw-c { padding: 10px !important; }
.gm-style .gm-style-iw-d { overflow: auto !important; }

/* =========================================================
   12. Features page (features.php)
   ========================================================= */
.features-lead { margin: 0.5rem 0 1.25rem; line-height: 1.6; }

/* Quick numbers: 3 per row on desktop, 2 on phones */
.features-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.features-highlight {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background-color: var(--row-alt);
}

.features-highlight strong { font-size: 1.15rem; }
.features-highlight span { font-size: 0.85rem; color: var(--text-muted); }

/* Category jump links */
.features-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.features-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}

.features-nav a i { color: var(--accent-color); }
.features-nav a:hover { background-color: var(--accent-soft); border-color: var(--accent-color); }

/* Anchor targets stop below the top edge instead of touching it */
.features-section { scroll-margin-top: 1rem; }

.features-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
}

.features-intro { margin: 0 0 1rem; line-height: 1.6; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background-color: var(--row-alt);
}

.feature-item h3 { margin: 0; font-size: 1rem; color: var(--accent-color); }
.feature-item p { margin: 0; line-height: 1.55; font-size: 0.92rem; }

/* Commands sit at the bottom of the card */
.feature-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.2rem;
}

.feature-cmds code {
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background-color: var(--accent-soft);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 760px) {
  .features-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Phones: still 3 per row (9 stats = 3 full rows), icon + number on top, label underneath */
@media (max-width: 560px) {
  .features-highlights { gap: 0.4rem; }
  .features-highlight {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.15rem 0.35rem;
    padding: 0.55rem 0.3rem;
    text-align: center;
  }
  .features-highlight span { flex-basis: 100%; font-size: 0.75rem; line-height: 1.25; }
}
/* ---------- Clan wars (clanwars.php) ---------- */
.cw-score { font-weight: 800; margin: 0 0.35rem; white-space: nowrap; }
.cw-winner { font-weight: 700; }
.cw-back { margin-top: 0.6rem; display: inline-flex; width: auto; }
.cw-table th, .cw-table td { padding: 0.55rem 0.7rem; text-align: center; }
.cw-table th.cw-name, .cw-table td.cw-name { text-align: left; }
.cw-table td.cw-rank { width: 2.5rem; color: var(--text-muted); }
.cw-table tr.cw-mvp-row td { background-color: rgba(234, 179, 8, 0.10); }
.cw-table tr.cw-total td { font-weight: 700; border-top: 2px solid var(--border-color); }
.cw-list td { white-space: nowrap; }
.cw-board { table-layout: fixed; } /* abieju komandu lenteliu stulpeliai sutampa */
.cw-board th.cw-name { width: 34%; }
.cw-open { white-space: nowrap; }
.cw-mvp { margin-top: 1rem; display: flex; align-items: center; gap: 0.5rem; font-size: 1.05rem; }
.cw-note { margin-top: 0.8rem; }
.cw-intro { margin: 0 0 1.5rem; line-height: 1.5; } /* tarpas iki statistikos plyteliu */
.cw-stats { margin-bottom: 0; }
/* Kovu tipo filtras (klanas / laikina komanda) */
.cw-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.cw-filter {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.8rem; border-radius: 8px; border: 1px solid transparent;
  color: var(--text-muted); font-weight: 600; font-size: 0.85rem; text-decoration: none;
}
.cw-filter:hover { background-color: var(--row-hover); color: var(--text-main); }
.cw-filter.active { color: var(--text-main); background-color: rgba(255, 255, 255, 0.05); border-color: var(--border-color); }
.cw-filter-count { font-weight: 400; color: var(--text-muted); }
.cw-clan-icon { color: #eab308; margin-right: 0.3rem; font-size: 0.85em; }
.cw-tops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 860px) {
  .cw-tops { grid-template-columns: minmax(0, 1fr); }
  .cw-open-text { display: none; } /* tik ikona - sarasas telpa siauresniame ekrane */
}