/* ===================================================
   MC.KANJIV.AT - CraftAttack Inspired Retro Pixel Style
   Extended with Modals, Sound Controls, Hardware & Quests
   =================================================== */

@font-face {
  font-family: 'Monocraft';
  src: url('https://cdn.jsdelivr.net/gh/IdreesInc/Monocraft@1.4/dist/Monocraft.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-main: #131317;
  --bg-card: #1c1d25;
  --bg-card-hover: #23242e;
  --border-color: #0b0c0e;
  --border-highlight: #3b3d4f;
  
  --font-retro: 'Monocraft', 'Silkscreen', 'VT323', monospace;
  --font-pixel-heading: 'Press Start 2P', 'Monocraft', monospace;

  /* Minecraft Accent Colors */
  --c-ender: #a855f7;
  --c-ender-bg: #2d1840;
  --c-diamond: #38bdf8;
  --c-diamond-bg: #0c3347;
  --c-gold: #facc15;
  --c-gold-bg: #423204;
  --c-redstone: #ef4444;
  --c-redstone-bg: #401010;
  --c-grass: #22c55e;
  --c-grass-bg: #0d3817;
  --c-orange: #fb923c;
  --c-orange-bg: #422006;
  --c-paper: #e2e8f0;

  --shadow-chunky: 4px 4px 0 #000;
  --shadow-chunky-lg: 6px 6px 0 #000;
  --shadow-chunky-xl: 8px 8px 0 #000;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  background-image: 
    linear-gradient(rgba(19, 19, 23, 0.94), rgba(19, 19, 23, 0.94)),
    repeating-linear-gradient(0deg, transparent, transparent 16px, rgba(255,255,255,0.015) 16px, rgba(255,255,255,0.015) 32px),
    repeating-linear-gradient(90deg, transparent, transparent 16px, rgba(255,255,255,0.015) 16px, rgba(255,255,255,0.015) 32px);
  color: #f1f2f6;
  font-family: var(--font-retro);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- Marquee Banner ---------------- */
.marquee-container {
  background: #09090b;
  border-bottom: 3px solid #000;
  overflow: hidden;
  white-space: nowrap;
  padding: 8px 0;
  position: relative;
  z-index: 100;
}

.marquee-content {
  display: inline-block;
  animation: marqueeAnim 40s linear infinite;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--c-gold);
  text-shadow: 2px 2px 0 #000;
}

.marquee-content span {
  margin: 0 16px;
}

@keyframes marqueeAnim {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

/* ---------------- Wrapper & Layout ---------------- */
.wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 16px 60px 16px;
}

/* ---------------- Hero Section ---------------- */
.hero-section {
  background: var(--bg-card);
  border: 3px solid var(--border-color);
  box-shadow: var(--shadow-chunky-lg);
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 28px;
}

.hero-tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.hero-tag {
  display: inline-block;
  background: var(--c-ender);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  font-weight: bold;
}

.sound-toggle-btn {
  background: #232533;
  color: #facc15;
  font-family: var(--font-retro);
  font-size: 11px;
  font-weight: bold;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  padding: 3px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.1s;
}

.sound-toggle-btn:hover {
  transform: translate(-1px, -1px);
  background: #313448;
}

.sound-toggle-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #000;
}

.btn-guide-pill {
  background: #0284c7;
  color: #fff;
  font-family: var(--font-retro);
  font-size: 11px;
  font-weight: bold;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  padding: 3px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.1s;
}

.btn-guide-pill:hover {
  transform: translate(-1px, -1px);
  background: #0369a1;
}

.hero-title {
  font-family: var(--font-pixel-heading);
  font-size: 28px;
  color: #fff;
  text-shadow: 3px 3px 0 #000;
  letter-spacing: -1px;
  margin-bottom: 6px;
}

.hero-subtitle {
  color: #9ca3af;
  font-size: 14px;
}

.hero-server-connect {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #09090b;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: bold;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--c-grass);
  box-shadow: 0 0 8px var(--c-grass);
}

.status-dot.pinging {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.ip-box {
  background: #0f1015;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  padding: 10px 14px;
  position: relative;
}

.ip-label {
  font-size: 10px;
  color: #6b7280;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.ip-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ip-address {
  font-family: var(--font-pixel-heading);
  font-size: 16px;
  color: var(--c-diamond);
  text-shadow: 2px 2px 0 #000;
}

.btn-copy {
  background: var(--c-gold);
  color: #000;
  font-family: var(--font-retro);
  font-size: 12px;
  font-weight: bold;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
}

.btn-copy:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
  background: #ffe04d;
}

.btn-copy:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 #000;
}

.copy-alert {
  position: absolute;
  top: -30px;
  right: 0;
  background: var(--c-grass);
  color: #000;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.copy-alert.show {
  opacity: 1;
}

/* ---------------- Server Tabs ---------------- */
.server-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 2px solid #282a36;
  padding-top: 20px;
}

.tab-btn {
  background: #15161c;
  color: #9ca3af;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  padding: 10px 16px;
  font-family: var(--font-retro);
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.1s ease;
}

.tab-btn:hover {
  background: #232530;
  color: #fff;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #000;
}

.tab-btn.active {
  background: var(--c-ender);
  color: #fff;
  border-color: #000;
  box-shadow: 3px 3px 0 #000;
  transform: translate(1px, 1px);
}

.tab-btn[data-server="atm10"].active { background: var(--c-ender); }
.tab-btn[data-server="dawncraft"].active { background: #b45309; }
.tab-btn[data-server="prominence2"].active { background: #0284c7; }
.tab-btn[data-server="cavehorror"].active { background: #b91c1c; }

.utility-tab {
  margin-left: auto;
  background: #1e202d;
  color: #cbd5e1;
}

.utility-tab:hover {
  background: #292d3f;
}

.tab-count {
  background: rgba(0,0,0,0.5);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 2px;
}

/* ---------------- Server Detail Banner ---------------- */
.server-detail-banner {
  background: #161720;
  border: 3px solid #000;
  box-shadow: var(--shadow-chunky);
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.sdb-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.sdb-info h2 {
  font-family: var(--font-pixel-heading);
  font-size: 18px;
  color: #fff;
}

.server-badge {
  background: #272836;
  border: 1px solid #000;
  padding: 3px 8px;
  font-size: 12px;
  color: var(--c-gold);
}

.server-ver {
  font-size: 12px;
  color: #9ca3af;
}

.sdb-meta {
  display: flex;
  gap: 20px;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 10px;
  color: #6b7280;
  letter-spacing: 1px;
}

.meta-value {
  font-family: var(--font-pixel-heading);
  font-size: 14px;
}

.text-green { color: var(--c-grass); }
.text-cyan { color: var(--c-diamond); }
.text-gold { color: var(--c-gold); }
.text-red { color: var(--c-redstone); }

/* ---------------- Section Containers ---------------- */
.section-container {
  margin-bottom: 32px;
}

.section-title {
  font-family: var(--font-pixel-heading);
  font-size: 15px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.title-sub {
  font-family: var(--font-retro);
  font-size: 12px;
  color: #9ca3af;
  font-weight: normal;
  text-shadow: none;
}

.week-pill {
  background: #232533;
  color: var(--c-gold);
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: bold;
}

/* ---------------- Quick Stats Cards ---------------- */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 3px solid #000;
  box-shadow: var(--shadow-chunky);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.1s;
}

.stat-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-chunky-lg);
}

.card-icon {
  font-size: 32px;
  min-width: 40px;
  text-align: center;
}

.card-num {
  font-family: var(--font-pixel-heading);
  font-size: 18px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  line-height: 1.2;
}

.card-lbl {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

.card-green { border-left: 6px solid var(--c-grass); }
.card-gold { border-left: 6px solid var(--c-gold); }
.card-red { border-left: 6px solid var(--c-redstone); }
.card-purple { border-left: 6px solid var(--c-ender); }
.card-orange { border-left: 6px solid var(--c-orange); }
.card-cyan { border-left: 6px solid var(--c-diamond); }

/* ---------------- Online Players ---------------- */
.online-players-list {
  background: var(--bg-card);
  border: 3px solid #000;
  box-shadow: var(--shadow-chunky);
  padding: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 70px;
  align-items: center;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #14151b;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  padding: 6px 12px 6px 8px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.player-chip:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 #000;
  background: #232533;
}

.player-avatar-small {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  border: 1px solid #000;
}

.player-chip-name {
  font-weight: bold;
  font-size: 14px;
  color: #fff;
}

.player-chip-srv {
  font-size: 10px;
  background: #252733;
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--c-gold);
}

.empty-state {
  color: #6b7280;
  font-style: italic;
  font-size: 13px;
}

/* ---------------- Weekly Challenges ---------------- */
.challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.challenge-card {
  background: var(--bg-card);
  border: 3px solid #000;
  box-shadow: var(--shadow-chunky);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.1s;
}

.challenge-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-chunky-lg);
}

.challenge-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.challenge-icon {
  font-size: 26px;
}

.challenge-title {
  font-family: var(--font-pixel-heading);
  font-size: 12px;
  color: var(--c-gold);
}

.challenge-desc {
  font-size: 12px;
  color: #9ca3af;
  flex-grow: 1;
}

.challenge-leader {
  background: #12131a;
  border: 2px solid #000;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.challenge-leader:hover {
  background: #1a1c27;
}

.ch-head {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  border: 1px solid #000;
}

.ch-name {
  font-weight: bold;
  font-size: 13px;
  color: #fff;
  flex-grow: 1;
}

.ch-val {
  font-family: var(--font-pixel-heading);
  font-size: 12px;
  color: var(--c-diamond);
}

/* ---------------- Leaderboards ---------------- */
.leaderboard-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.lb-category-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lb-tab-btn {
  background: #161720;
  color: #9ca3af;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  padding: 6px 12px;
  font-family: var(--font-retro);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.1s;
}

.lb-tab-btn:hover {
  background: #262734;
  color: #fff;
}

.lb-tab-btn.active {
  background: var(--c-gold);
  color: #000;
  font-weight: bold;
  box-shadow: 2px 2px 0 #000;
}

.leaderboard-container {
  background: var(--bg-card);
  border: 3px solid #000;
  box-shadow: var(--shadow-chunky-lg);
  overflow: hidden;
}

.lb-table-wrapper {
  overflow-x: auto;
}

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

.lb-table th {
  background: #101116;
  padding: 12px 16px;
  font-family: var(--font-pixel-heading);
  font-size: 11px;
  color: #9ca3af;
  border-bottom: 2px solid #000;
  letter-spacing: 1px;
}

.lb-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #232533;
  vertical-align: middle;
}

.lb-table tr.clickable-row {
  cursor: pointer;
}

.lb-table tr.clickable-row:hover td {
  background: #272836;
}

.rank-badge {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 24px;
  text-align: center;
  font-family: var(--font-pixel-heading);
  font-size: 12px;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  font-weight: bold;
}

.rank-1 { background: #ffd700; color: #000; }
.rank-2 { background: #c0c0c0; color: #000; }
.rank-3 { background: #cd7f32; color: #fff; }
.rank-other { background: #262733; color: #9ca3af; }

.player-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-head-img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  border: 2px solid #000;
  box-shadow: 1px 1px 0 #000;
}

.player-cell-name {
  font-size: 15px;
  font-weight: bold;
  color: #fff;
}

.lb-val {
  font-family: var(--font-pixel-heading);
  font-size: 15px;
  color: var(--c-diamond);
  text-shadow: 1px 1px 0 #000;
}

.lb-extra-badge {
  background: #13141a;
  border: 1px solid #000;
  padding: 3px 8px;
  font-size: 12px;
  color: #9ca3af;
}

/* ---------------- Event Feed ---------------- */
.feed-box {
  background: var(--bg-card);
  border: 3px solid #000;
  box-shadow: var(--shadow-chunky);
  padding: 12px;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #14151b;
  border: 1px solid #282a36;
  padding: 8px 12px;
  font-size: 13px;
}

.feed-time {
  font-family: var(--font-retro);
  font-size: 11px;
  color: #6b7280;
  min-width: 65px;
}

.feed-badge {
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border: 1px solid #000;
  text-transform: uppercase;
}

.badge-atm10 { background: var(--c-ender); color: #fff; }
.badge-dawncraft { background: #b45309; color: #fff; }
.badge-prominence2 { background: #0284c7; color: #fff; }
.badge-cavehorror { background: #b91c1c; color: #fff; }

.feed-msg { color: #e2e8f0; }
.feed-msg.death { color: #fca5a5; }
.feed-msg.advancement { color: #fde047; font-weight: bold; }
.feed-msg.join { color: #86efac; }
.feed-msg.leave { color: #9ca3af; }

/* ---------------- Hardware Dashboard ---------------- */
.perf-dashboard {
  background: var(--bg-card);
  border: 3px solid #000;
  box-shadow: var(--shadow-chunky-lg);
  padding: 20px;
}

.perf-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.perf-box {
  background: #13141c;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  padding: 16px;
}

.perf-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 10px;
}

.progress-bar-bg {
  width: 100%;
  height: 14px;
  background: #090a0f;
  border: 2px solid #000;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.fill-green { background: var(--c-grass); }
.fill-cyan { background: var(--c-diamond); }

.perf-meta-text {
  font-size: 11px;
  color: #6b7280;
  margin-top: 8px;
}

.perf-servers-table-wrapper {
  overflow-x: auto;
}

.perf-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.perf-table th {
  background: #0d0e14;
  padding: 10px 14px;
  font-size: 11px;
  color: #9ca3af;
  border-bottom: 2px solid #000;
}

.perf-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #202230;
  font-size: 13px;
}

/* ---------------- Live Map Section ---------------- */
.map-showcase-box {
  background: var(--bg-card);
  border: 3px solid #000;
  box-shadow: var(--shadow-chunky-lg);
  padding: 24px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.map-showcase-info {
  flex: 1;
  min-width: 280px;
}

.map-showcase-info h4 {
  font-family: var(--font-pixel-heading);
  font-size: 16px;
  color: var(--c-diamond);
  margin-bottom: 10px;
}

.map-showcase-info p {
  color: #9ca3af;
  margin-bottom: 18px;
  line-height: 1.6;
}

.btn-map-action {
  background: var(--c-diamond);
  color: #000;
  font-family: var(--font-retro);
  font-size: 13px;
  font-weight: bold;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.1s;
}

.btn-map-action:hover {
  transform: translate(-1px, -1px);
  background: #6feff8;
}

.map-hint {
  display: block;
  font-size: 11px;
  color: #6b7280;
  margin-top: 8px;
}

.map-visual-placeholder {
  width: 280px;
  height: 180px;
  background: #0e1017;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.map-badge-corner {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--c-gold);
  color: #000;
  font-size: 9px;
  font-weight: bold;
  padding: 2px 6px;
  border: 1px solid #000;
}

.map-status-overlay {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.8);
  font-size: 10px;
  color: var(--c-grass);
  padding: 3px 6px;
  border: 1px solid #000;
}

.map-isometric-grid {
  display: grid;
  grid-template-columns: repeat(2, 40px);
  gap: 8px;
  transform: rotate(45deg);
}

.iso-block {
  width: 40px;
  height: 40px;
  border: 2px solid #000;
}

.iso-block.b1 { background: var(--c-grass); }
.iso-block.b2 { background: #4a3728; }
.iso-block.b3 { background: #0284c7; }
.iso-block.b4 { background: #64748b; }

/* ---------------- 4 Worlds Grid ---------------- */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.srv-card {
  background: var(--bg-card);
  border: 3px solid #000;
  box-shadow: var(--shadow-chunky);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.1s;
}

.srv-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-chunky-lg);
}

.srv-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.srv-chip {
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
}

.srv-chip.ender { background: var(--c-ender); color: #fff; }
.srv-chip.gold { background: var(--c-gold); color: #000; }
.srv-chip.diamond { background: var(--c-diamond); color: #000; }
.srv-chip.redstone { background: var(--c-redstone); color: #fff; }

.srv-card h4 {
  font-family: var(--font-pixel-heading);
  font-size: 14px;
  color: #fff;
}

.srv-desc {
  font-size: 13px;
  color: #9ca3af;
  flex-grow: 1;
}

.srv-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #282a36;
  padding-top: 10px;
}

.srv-footer code {
  font-family: var(--font-retro);
  font-size: 13px;
  color: var(--c-diamond);
}

.srv-player-pill {
  font-size: 11px;
  background: #14151c;
  border: 1px solid #000;
  padding: 3px 6px;
  color: #fff;
}

/* ---------------- Modals ---------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: var(--bg-card);
  border: 4px solid #000;
  box-shadow: var(--shadow-chunky-xl);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalPop 0.15s ease-out;
}

@keyframes modalPop {
  0% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

.modal-header {
  background: #101116;
  border-bottom: 3px solid #000;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  font-size: 22px;
}

.modal-header h3 {
  font-family: var(--font-pixel-heading);
  font-size: 16px;
  color: #fff;
}

.modal-rank-badge {
  background: var(--c-gold);
  color: #000;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 8px;
  border: 2px solid #000;
}

.btn-close-modal {
  background: #ef4444;
  color: #fff;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  font-size: 20px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-close-modal:hover {
  background: #dc2626;
}

.modal-body {
  padding: 20px;
}

/* Player Profile Layout */
.player-profile-body {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.pp-left-col {
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.pp-skin-container {
  background: #101117;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  padding: 16px;
  width: 100%;
  height: 280px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pp-skin-img {
  max-height: 250px;
  image-rendering: pixelated;
  filter: drop-shadow(4px 4px 0 rgba(0,0,0,0.6));
}

.pp-active-servers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.pp-srv-pill {
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border: 1px solid #000;
}

.pp-right-col {
  flex: 1;
  min-width: 300px;
}

.pp-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.pp-metric-chip {
  background: #12131b;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.chip-lbl {
  font-size: 10px;
  color: #6b7280;
  letter-spacing: 1px;
}

.chip-val {
  font-family: var(--font-pixel-heading);
  font-size: 14px;
  margin-top: 4px;
}

.pp-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid #292b3a;
  padding-bottom: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pp-tab-btn {
  background: #151620;
  color: #9ca3af;
  border: 2px solid #000;
  padding: 6px 12px;
  font-family: var(--font-retro);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.1s;
}

.pp-tab-btn:hover {
  background: #232532;
  color: #fff;
}

.pp-tab-btn.active {
  background: var(--c-diamond);
  color: #000;
  font-weight: bold;
  border-color: #000;
}

.pp-tab-content {
  display: none;
}

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

.pp-subhead {
  font-family: var(--font-pixel-heading);
  font-size: 11px;
  color: #9ca3af;
  margin: 14px 0 8px 0;
  letter-spacing: 1px;
}

.pp-ores-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ore-pill {
  background: #12131a;
  border: 2px solid #000;
  padding: 6px 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pp-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.pp-list-item {
  background: #13141c;
  border: 1px solid #272938;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.pp-nemesis-box {
  background: #301111;
  border: 2px solid var(--c-redstone);
  box-shadow: 3px 3px 0 #000;
  padding: 12px;
  margin-bottom: 14px;
}

.nemesis-title {
  font-family: var(--font-pixel-heading);
  font-size: 11px;
  color: var(--c-redstone);
  display: block;
  margin-bottom: 6px;
}

.nemesis-details {
  font-size: 14px;
  color: #fff;
  font-weight: bold;
}

.pp-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.badge-item {
  background: #141520;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.bi-icon {
  font-size: 24px;
}

.bi-title {
  font-family: var(--font-pixel-heading);
  font-size: 11px;
  color: var(--c-gold);
}

.bi-desc {
  font-size: 11px;
  color: #9ca3af;
}

/* Guide Modal */
.guide-modal-window {
  max-width: 780px;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-step-card {
  background: #14151f;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  padding: 16px;
}

.step-num {
  font-family: var(--font-pixel-heading);
  font-size: 10px;
  color: var(--c-diamond);
  margin-bottom: 4px;
}

.guide-step-card h4 {
  font-family: var(--font-pixel-heading);
  font-size: 14px;
  color: #fff;
  margin-bottom: 8px;
}

.guide-step-card p {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 10px;
}

.guide-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-guide-dl {
  background: var(--c-grass);
  color: #000;
  font-weight: bold;
  padding: 6px 12px;
  text-decoration: none;
  font-size: 12px;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
}

.btn-guide-dl.secondary {
  background: #334155;
  color: #fff;
}

.guide-packs-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.guide-pack-row {
  background: #0f1017;
  border: 1px solid #282a3c;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

.guide-pack-row code {
  color: var(--c-diamond);
}

/* ---------------- Footer ---------------- */
.footer {
  margin-top: 40px;
  border-top: 3px solid #000;
  padding-top: 24px;
  text-align: center;
}

.footer-content p {
  font-family: var(--font-pixel-heading);
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 6px;
}

.footer-sub {
  font-family: var(--font-retro) !important;
  font-size: 12px !important;
  color: #6b7280 !important;
}

.footer-refresh-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f1015;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  padding: 4px 12px;
  font-size: 11px;
  margin-top: 12px;
  color: #9ca3af;
}

.refresh-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-grass);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 768px) {
  .hero-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-server-connect {
    align-items: flex-start;
    width: 100%;
  }
  .server-detail-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .sdb-meta {
    width: 100%;
    justify-content: space-between;
  }
  .leaderboard-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .utility-tab {
    margin-left: 0;
  }
  .player-profile-body {
    flex-direction: column;
    align-items: center;
  }
  .pp-left-col {
    width: 100%;
  }
}
