:root {
  --bg-dark: #0b0f17;
  --card-bg: rgba(18, 24, 34, 0.92);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(26, 35, 50, 0.95);
  --primary: #22c55e;
  --primary-hover: #16a34a;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --danger: #ef4444;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overscroll-behavior-x: none;
}

main.container {
  flex: 1 0 auto;
}

.bg-backdrop {
  position: fixed;
  top: -5vh;
  left: 0;
  width: 100%;
  height: 110vh;
  height: 110lvh;
  background: url('/images/background.jpg') center center / cover no-repeat;
  z-index: -2;
  pointer-events: none;
  /* GPU layer promotion prevents mobile scroll momentum drift/lag */
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

.bg-overlay {
  position: fixed;
  top: -5vh;
  left: 0;
  width: 100%;
  height: 110vh;
  height: 110lvh;
  background: rgba(11, 15, 23, 0.78);
  z-index: -1;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 23, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
  padding: 8px 0;
  width: 100%;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: white;
  flex-shrink: 0;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-text {
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Header Service Buttons */
.nav-service-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  transition: all 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-service-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.immich-logo-wide {
  height: 18px;
  width: auto;
  max-width: 68px;
  object-fit: contain;
}

.nextcloud-logo-nav {
  height: 20px;
  width: auto;
  max-width: 68px;
  object-fit: contain;
}

.admin-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: #f3f4f6;
  padding: 0 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Hero Section */
.hero {
  padding: 25px 0 15px 0;
  text-align: center;
}

.hero-logo-large {
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: #ffffff;
}

/* Status Bar & Notice */
.status-area {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4ade80;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  flex-shrink: 0;
}

.status-dot.offline { background-color: var(--danger); }

.notice-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fbbf24;
}

/* Connect Cards */
.connect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.connect-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
}

.card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
}

.badge-java {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-bedrock {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.connect-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 6px 0 4px 0;
}

.connect-info-line {
  font-size: 0.88rem;
  color: #e5e7eb;
  margin-top: 6px;
  font-family: monospace;
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  word-break: break-word;
}

/* Online Server Status Card */
.server-status-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 25px;
  text-align: left;
}

.status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.status-header-title {
  font-size: 1.02rem;
  font-weight: 700;
}

.players-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.players-progress-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.online-players-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}

.player-chip img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

/* Section Header */
.section-header {
  text-align: center;
  margin: 30px 0 16px 0;
}

.section-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 2px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* Sort Controls */
.sort-controls {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sort-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sort-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.sort-btn.active {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

/* Podium */
.podium-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.podium-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 10px;
  text-align: center;
  position: relative;
}

.podium-1 {
  border-color: var(--card-border);
  background: var(--card-bg);
  order: 2;
}

.podium-2 { order: 1; }
.podium-3 { order: 3; }

.podium-rank {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.rank-1 { background: transparent; }
.rank-2 { background: #94a3b8; color: #000; }
.rank-3 { background: #d97706; color: #fff; }

.podium-avatar-wrap {
  width: 60px;
  height: 60px;
  margin: 4px auto 8px auto;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.podium-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podium-name {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  word-break: break-word;
}

.bedrock-tag {
  font-size: 0.58rem;
  background: #3b82f6;
  color: white;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}

.podium-main-stat {
  font-size: 1.2rem;
  font-weight: 800;
  color: #22c55e;
  margin-bottom: 4px;
}

.podium-substats {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* Leaderboard Table */
.leaderboard-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
  width: 100%;
}

.leaderboard-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  flex-wrap: wrap;
  gap: 8px;
}

.search-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 6px 10px;
  color: white;
  font-size: 0.85rem;
  outline: none;
  min-width: 180px;
}
.search-input:focus { border-color: var(--primary); }

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lb-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  text-align: left;
}

.lb-table th {
  padding: 10px 14px;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.lb-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  white-space: nowrap;
}

.lb-table tr:hover td { background: rgba(255, 255, 255, 0.03); }

.lb-player-cell { display: flex; align-items: center; gap: 8px; }
.lb-player-cell img { width: 24px; height: 24px; border-radius: 4px; }

.lb-rank-badge {
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
}

/* Old Leaderboard Collapsible */
.old-leaderboard-wrap {
  text-align: center;
  margin-bottom: 25px;
  width: 100%;
}

.old-leaderboard-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: #e5e7eb;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.old-leaderboard-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.old-leaderboard-content {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
  text-align: left;
  width: 100%;
}

.old-lb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.old-player-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
}

.old-player-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: #fff;
}

.old-player-stat {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.old-summary-box {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 0.85rem;
}

/* Downloads Section */
.downloads-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 25px;
  width: 100%;
}

.downloads-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.downloads-block {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.downloads-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 8px;
}

.dl-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4ade80;
  text-decoration: none;
  background: rgba(34, 197, 94, 0.1);
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
  word-break: break-word;
}

.dl-link:hover {
  background: rgba(34, 197, 94, 0.2);
  color: #fff;
}

/* FOOTER */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  background: rgba(11, 15, 23, 0.95);
  padding: 20px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  width: 100%;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }

/* MOBILE RESPONSIVE TWEAKS */
@media (max-width: 768px) {
  .hero-title { font-size: 1.8rem; }
  .connect-grid { grid-template-columns: 1fr; }
  .podium-container { grid-template-columns: 1fr; }
  .podium-1 { order: 1; }
  .podium-2 { order: 2; }
  .podium-3 { order: 3; }
  .old-lb-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .brand-text { font-size: 1.1rem; }
  .brand-logo { width: 28px; height: 28px; }
  .nav-actions { gap: 5px; }
  .nav-service-btn { height: 32px; padding: 0 6px; }
  .immich-logo-wide { max-width: 52px; height: 16px; }
  .nextcloud-logo-nav { max-width: 52px; height: 17px; }
  .admin-nav-btn { height: 32px; padding: 0 8px; font-size: 0.78rem; }
  .admin-nav-btn span.admin-label { display: none; }
  .leaderboard-toolbar { flex-direction: column; align-items: stretch; }
  .search-input { width: 100%; min-width: 0; }
  .sort-controls { justify-content: flex-start; }
}

/* ==========================================
   Elections 2026 Grid & Campaign Cards (2x2 Tile Layout)
   ========================================== */
.elections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

@media (max-width: 680px) {
  .elections-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.election-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  position: relative;
}

.election-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.18);
}

.election-card-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--card-border);
}

.election-candidate-name {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-main);
  text-transform: capitalize;
  letter-spacing: -0.2px;
}

.election-candidate-badge {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
  text-transform: none;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.election-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #06090e;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.election-img-backdrop {
  position: absolute;
  inset: -15px;
  background-size: cover;
  background-position: center;
  filter: blur(16px) brightness(0.35);
  transform: scale(1.15);
  pointer-events: none;
}

.election-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.election-card:hover .election-img {
  transform: scale(1.03);
}

.election-zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #f3f4f6;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 2;
}

.election-card:hover .election-zoom-hint {
  opacity: 1;
}

.election-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.election-view-all-btn:hover {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.65);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.25);
  color: #86efac;
}

/* User pill next to profile button */
.nav-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  height: 32px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-user-pill:hover {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.6);
  color: #86efac;
}

.nav-user-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
  flex-shrink: 0;
}

/* Modal for full viewing */
.election-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: electionFadeIn 0.2s ease;
}

.election-modal.active {
  display: flex;
}

.election-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.election-modal-header {
  padding: 12px 18px;
  font-weight: 800;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  text-transform: capitalize;
}

.election-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.election-modal-close:hover {
  background: var(--danger);
}

.election-modal img {
  max-width: 85vw;
  max-height: calc(85vh - 60px);
  object-fit: contain;
  display: block;
}

@keyframes electionFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Updates / Changelog Section */
.updates-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 25px;
  width: 100%;
}

.updates-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.updates-scroll-box {
  max-height: 440px;
  overflow-y: auto;
  padding-right: 6px;
}

.updates-scroll-box::-webkit-scrollbar {
  width: 6px;
}

.updates-scroll-box::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.updates-scroll-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.updates-scroll-box::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.update-release {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}

.update-release:last-child {
  margin-bottom: 0;
}

.update-release-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.update-version-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.update-version {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f3f4f6;
}

.update-badge-latest {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.update-date {
  font-size: 0.82rem;
  color: #9ca3af;
  font-weight: 600;
}

.update-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.update-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: #d1d5db;
  line-height: 1.45;
}

/* Badges for Site vs Server */
.tag-site {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.tag-server {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Footer Version Info */
.footer-version {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.78rem;
  color: #9ca3af;
}

.footer-version-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
  color: #f3f4f6;
  font-weight: 700;
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
}

/* Hide third-party injected floating widgets */
div[class*="ym-"],
div[id*="ya-site-"],
div[class*="metrika"],
div[style*="z-index: 2147483647"],
div[style*="z-index: 999999"] {
  display: none !important;
}

/* Restored Stats Badge */
.stats-restored-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  vertical-align: middle;
  outline: none;
}

.stats-restored-badge:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

/* Restored Notice Modal */
.restored-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: electionFadeIn 0.2s ease;
}

.restored-modal.active {
  display: flex;
}

.restored-modal-content {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #131a29;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  animation: electionFadeIn 0.25s ease;
}

.restored-modal-header {
  padding: 14px 18px;
  background: rgba(245, 158, 11, 0.08);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.restored-modal-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #f3f4f6;
  display: flex;
  align-items: center;
  gap: 6px;
}

.restored-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  font-size: 1.4rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.restored-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.restored-modal-body {
  padding: 18px;
}

.restored-alert-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
}

.restored-modal-footer {
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: flex-end;
}

.restored-modal-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s;
}

.restored-modal-btn:hover {
  background: #1d4ed8;
}


