:root {
  --bg-color: #030712;
  --panel-bg: rgba(10, 15, 26, 0.9);
  --border-color: rgba(0, 195, 255, 0.25);
  --border-glow: rgba(0, 195, 255, 0.5);
  --accent-cyan: #00c3ff;
  --text-main: #f3f4f6;
  --text-muted: #8a99ad;
}

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

body {
  background-color: var(--bg-color);
  background-image: url('frozen-kundun-citadel-desktop.webp');
  background-repeat: no-repeat;
  background-position: center 54px;
  background-size: 100% auto;
  background-attachment: scroll;
  color: var(--text-main);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* --- LARGE CHARACTER FIGHT RENDERS (Lowered & Layered in Front) --- */
body::before {
  content: "";
  position: fixed;
  top: 180px;
  left: -50px;
  width: 650px;
  height: 90vh;
  background: none;
  z-Index: 20;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}

body::after {
  content: "";
  position: fixed;
  top: 180px;
  right: -50px;
  width: 650px;
  height: 90vh;
  background: none;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}

/* --- CHARACTER-SPECIFIC FLOATING PARTICLES --- */
.mu-particles-left, .mu-particles-right {
  position: fixed;
  top: 0;
  width: 350px;
  height: 100%;
  pointer-events: none;
  z-index: 25;
  overflow: hidden;
  display: none;
}

.mu-particles-left { left: 0; }
.mu-particles-right { right: 0; }

.particle-blue, .particle-red {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  animation: floatUp linear infinite;
  opacity: 0.6;
}

.particle-blue {
  background: #00c3ff;
  box-shadow: 0 0 10px #00c3ff, 0 0 20px rgba(0, 195, 255, 0.5);
}

.particle-red {
  background: #ff3333;
  box-shadow: 0 0 10px #ff3333, 0 0 20px rgba(255, 51, 51, 0.5);
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  20% { opacity: 0.8; }
  80% { opacity: 0.8; }
  100% { transform: translateY(-105vh) scale(1.2); opacity: 0; }
}

/* Left side blue particles */
.mu-particles-left .particle-blue:nth-child(1) { left: 15%; width: 4px; height: 4px; animation-duration: 7s; animation-delay: 0s; }
.mu-particles-left .particle-blue:nth-child(2) { left: 45%; width: 6px; height: 6px; animation-duration: 9s; animation-delay: 2s; }
.mu-particles-left .particle-blue:nth-child(3) { left: 75%; width: 3px; height: 3px; animation-duration: 6s; animation-delay: 1s; }
.mu-particles-left .particle-blue:nth-child(4) { left: 30%; width: 5px; height: 5px; animation-duration: 11s; animation-delay: 4s; }
.mu-particles-left .particle-blue:nth-child(5) { left: 25%; width: 5px; height: 5px; animation-duration: 8s; animation-delay: 1.5s; }
.mu-particles-left .particle-blue:nth-child(6) { left: 60%; width: 4px; height: 4px; animation-duration: 7.5s; animation-delay: 3s; }
.mu-particles-left .particle-blue:nth-child(7) { left: 85%; width: 6px; height: 6px; animation-duration: 10s; animation-delay: 2.2s; }
.mu-particles-left .particle-blue:nth-child(8) { left: 10%; width: 3px; height: 3px; animation-duration: 6.5s; animation-delay: 0.8s; }

/* Right side red particles */
.mu-particles-right .particle-red:nth-child(1) { left: 20%; width: 5px; height: 5px; animation-duration: 8s; animation-delay: 0.5s; }
.mu-particles-right .particle-red:nth-child(2) { left: 50%; width: 3px; height: 3px; animation-duration: 6s; animation-delay: 2.5s; }
.mu-particles-right .particle-red:nth-child(3) { left: 80%; width: 6px; height: 6px; animation-duration: 10s; animation-delay: 1.2s; }
.mu-particles-right .particle-red:nth-child(4) { left: 35%; width: 4px; height: 4px; animation-duration: 7s; animation-delay: 3.5s; }
.mu-particles-right .particle-red:nth-child(5) { left: 15%; width: 4px; height: 4px; animation-duration: 9.5s; animation-delay: 1.8s; }
.mu-particles-right .particle-red:nth-child(6) { left: 65%; width: 5px; height: 5px; animation-duration: 7s; animation-delay: 0.2s; }
.mu-particles-right .particle-red:nth-child(7) { left: 90%; width: 3px; height: 3px; animation-duration: 8.5s; animation-delay: 4.1s; }
.mu-particles-right .particle-red:nth-child(8) { left: 40%; width: 6px; height: 6px; animation-duration: 11s; animation-delay: 2.8s; }

.top-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  z-index: 1000;
}

.site-header {
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 195, 255, 0.2);
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-main { color: #fff; }
.brand-sub { color: var(--accent-cyan); text-shadow: 0 0 10px rgba(0, 195, 255, 0.5); }

.brand-logo-frame {
  display: block;
  width: 112px;
  height: 40px;
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: 112px;
  height: auto;
  transform: translateY(-15px);
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 8px;
  z-index: 2000;
  padding: 10px 14px;
  color: #030712;
  background: #fff;
  border-radius: 4px;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

nav {
  display: flex;
  gap: 22px;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: all 0.25s ease;
}

nav a:hover, nav a.active {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 195, 255, 0.8);
}

nav a:focus-visible,
.brand:focus-visible,
.full-button:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.full-button:disabled,
.full-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
  box-shadow: none;
}

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

.content-card {
  background: rgba(3, 7, 18, 0.72);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
}

.content-card-wide {
  grid-column: 1 / -1;
}

.content-card h2,
.content-card h3 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 8px;
}

.content-card p,
.content-card li {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.content-card ul,
.content-card ol {
  padding-left: 20px;
}

.content-card li + li {
  margin-top: 6px;
}

.content-note {
  margin-top: 14px;
  padding: 12px 14px;
  color: #c3d1e6;
  background: rgba(0, 195, 255, 0.08);
  border: 1px solid rgba(0, 195, 255, 0.3);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.55;
}

.content-note-warning {
  color: #f0d7a6;
  background: rgba(255, 153, 0, 0.08);
  border-color: rgba(255, 153, 0, 0.36);
}

.container {
  max-width: 1100px;
  margin: 30px auto; 
  padding: 0 15px;
  flex: 1;
  width: 100%;
  position: relative;
  z-index: 10;
}

.hero {
  background: radial-gradient(ellipse at center, rgba(0, 195, 255, 0.18) 0%, rgba(14, 20, 32, 0.95) 70%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 195, 255, 0.4);
  border-radius: 12px;
  padding: 45px 20px;
  margin-bottom: 25px;
  text-align: center;
  box-shadow: 0 0 45px rgba(0, 195, 255, 0.15), inset 0 0 25px rgba(0, 195, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.hero.hero-artwork {
  height: clamp(410px, 31vw, 560px);
  padding: 0;
  margin-bottom: 25px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
  isolation: isolate;
}

.hero-home-link {
  display: block;
  width: min(52%, 560px);
  height: 100%;
  margin: 0 auto;
  border-radius: 22px;
  cursor: pointer;
}

.hero-home-link:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 6px;
}

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

.hero:hover {
  border-color: rgba(0, 195, 255, 0.6);
}

.season {
  display: inline-block;
  background: rgba(0, 195, 255, 0.1);
  border: 1px solid rgba(0, 195, 255, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  color: #00c3ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(0, 195, 255, 0.8);
}

.hero-logo {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #fff;
  margin-bottom: 10px;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.4), 0 0 50px rgba(0, 195, 255, 0.3);
  animation: heroGlowPulse 4s ease-in-out infinite alternate;
}

.hero-logo span {
  color: var(--accent-cyan);
  text-shadow: 0 0 25px rgba(0, 195, 255, 0.9), 0 0 50px rgba(0, 195, 255, 0.5);
}

@keyframes heroGlowPulse {
  0% {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(0, 195, 255, 0.3);
  }
  100% {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 0 70px rgba(0, 195, 255, 0.7);
  }
}

.hero h1 {
  font-size: 13px;
  color: #e2e8f0;
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: 2.5px;
}

.hero p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 0;
  letter-spacing: 0.5px;
}

.layout {
  display: grid;
  grid-template-columns: 270px 1fr 270px;
  gap: 20px;
  align-items: start;
}

.left-column, .right-column, .center-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.85), inset 0 0 15px rgba(0, 195, 255, 0.03);
  border-radius: 8px;
  padding: 20px;
  position: relative;
  z-index: 12;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.panel:hover {
  border-color: rgba(0, 195, 255, 0.4);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 195, 255, 0.08);
}

.panel-title {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.panel-title span {
  color: var(--accent-cyan);
  letter-spacing: 1px;
  font-size: 10px;
}

.panel-title b {
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.server-row, .event, .player-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 8px 0;
  color: var(--text-muted);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.server-row b, .event b, .player-row span, .player-row em {
  color: #fff;
}

.sidebar-data-state {
  padding: 13px 6px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  letter-spacing: 0.45px;
  border: 1px dashed rgba(74, 117, 163, 0.35);
  border-radius: 4px;
}

.sidebar-development-notice {
  margin-bottom: 3px;
  padding: 6px 5px;
  color: #ffd700;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.35px;
  background: rgba(255, 215, 0, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 3px;
}

.sidebar-last-row {
  border-bottom: 0;
}

.server-row .sidebar-status-alive {
  color: #00ff66;
}

.server-row .sidebar-status-dead {
  color: #ff3333;
}

.sidebar-castle-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}

.sidebar-castle-owner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-castle-crest {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  font-size: 18px;
  background: rgba(0, 195, 255, 0.1);
  border: 1px dashed var(--accent-cyan);
  border-radius: 4px;
}

.sidebar-castle-label {
  color: var(--text-muted);
  font-size: 10px;
}

.sidebar-castle-value {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-castle-battle {
  text-align: right;
}

.sidebar-castle-next {
  color: #00ff66;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(0, 255, 102, 0.4);
}

.castle-siege-state {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle, rgba(0, 195, 255, 0.07), rgba(3, 7, 18, 0.7));
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.castle-siege-state strong {
  color: var(--accent-cyan);
  font-size: 13px;
  letter-spacing: 0.7px;
}

.castle-siege-state span {
  max-width: 440px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.castle-siege-development-notice {
  margin-bottom: 12px;
  padding: 8px 10px;
  color: #ffd700;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.5px;
  background: rgba(255, 215, 0, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 4px;
}

.castle-siege-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0, 195, 255, 0.05);
  border: 1px solid var(--accent-cyan);
  border-radius: 4px;
}

.castle-siege-summary-right {
  text-align: right;
}

.castle-siege-summary-label {
  color: var(--text-muted);
  font-size: 11px;
}

.castle-siege-summary-value {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 195, 255, 0.5);
}

.castle-siege-section-heading {
  margin-bottom: 10px;
  color: #fff;
  font-size: 13px;
}

.castle-siege-table-wrap {
  margin-bottom: 20px;
  overflow-x: auto;
}

.castle-siege-table {
  width: 100%;
  min-width: 560px;
  text-align: left;
  border-collapse: collapse;
  font-size: 12px;
}

.castle-siege-table thead tr {
  color: var(--accent-cyan);
  border-bottom: 1px solid var(--border-color);
}

.castle-siege-table th {
  padding: 8px 4px;
}

.castle-siege-table tbody tr {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.castle-siege-table td {
  padding: 10px 4px;
}

.castle-siege-rank {
  color: #fff;
  font-weight: 700;
}

.castle-siege-rank-first,
.castle-siege-type {
  color: #ffd700;
}

.castle-siege-guild-name,
.castle-siege-bid {
  color: #fff;
  font-weight: 700;
}

.castle-siege-guild-master {
  color: var(--text-muted);
}

.castle-siege-bid {
  color: var(--accent-cyan);
}

.castle-siege-table-right,
.castle-siege-type {
  text-align: right;
}

.castle-siege-type-ruling {
  color: #00ff66;
}

.castle-siege-registration {
  padding: 15px;
  background: rgba(3, 7, 18, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.castle-siege-input {
  width: 100%;
  margin-bottom: 10px;
}

.castle-siege-bid-input {
  margin-bottom: 15px;
}

@media (max-width: 640px) {
  .sidebar-castle-layout,
  .castle-siege-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .sidebar-castle-battle,
  .castle-siege-summary-right {
    text-align: left;
  }
}

.online-count {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  background: rgba(3, 7, 18, 0.6);
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 195, 255, 0.15);
}

label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

input {
  width: 100%;
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  color: #fff;
  font-size: 12px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 195, 255, 0.35);
}

.full-button {
  width: 100%;
  margin-top: 4px;
  background: linear-gradient(135deg, rgba(0, 195, 255, 0.2) 0%, rgba(0, 119, 255, 0.4) 100%);
  color: #fff;
  border: 1px solid var(--accent-cyan);
  padding: 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.25s ease;
  box-shadow: 0 0 10px rgba(0, 195, 255, 0.2);
}

.full-button:hover {
  background: var(--accent-cyan);
  color: #030712;
  box-shadow: 0 0 20px rgba(0, 195, 255, 0.8);
  transform: translateY(-1px);
}

/* Sidebar Dashboard Button Tone Down */
.right-column .full-button:nth-child(4) {
  background: rgba(0, 195, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 195, 255, 0.1);
}

.right-column .full-button:nth-child(4):hover {
  background: var(--accent-cyan);
  color: #030712;
  box-shadow: 0 0 20px rgba(0, 195, 255, 0.7);
}

.panel-links {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 11px;
}

.panel-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.panel-links a:hover {
  color: var(--accent-cyan);
}

/* --- DOWNLOADS & LAUNCHER CENTER --- */
.downloads-panel {
  overflow: hidden;
  /* Keep the long download/help page out of Chromium's oversized backdrop layer. */
  backdrop-filter: none;
  background: #0a101c;
  isolation: isolate;
}

.downloads-intro {
  max-width: 760px;
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.65;
}

.downloads-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.download-card,
.download-information-card {
  background: linear-gradient(145deg, rgba(8, 15, 27, 0.96), rgba(4, 8, 17, 0.94));
  border: 1px solid rgba(0, 195, 255, 0.2);
  border-radius: 7px;
  box-shadow: inset 0 0 18px rgba(0, 195, 255, 0.025);
}

.download-card {
  display: flex;
  min-width: 0;
  min-height: 300px;
  flex-direction: column;
  padding: 18px;
}

.download-card-eyebrow {
  color: var(--accent-cyan);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.download-card-title {
  margin: 7px 0 9px;
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
}

.download-card-description {
  min-height: 64px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.download-facts {
  margin: 16px 0;
}

.download-fact-row,
.download-requirement-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  font-size: 11px;
}

.download-fact-row dt,
.download-requirement-row dt {
  color: var(--text-muted);
}

.download-fact-row dd,
.download-requirement-row dd {
  margin: 0;
  color: #e8edf5;
  text-align: right;
}

.download-status-soon {
  color: #ffd166 !important;
  font-weight: 700;
}

.download-unavailable-button {
  margin-top: auto;
}

.download-unavailable-button:disabled,
.download-unavailable-button:disabled:hover {
  color: #6d7887;
  background: rgba(35, 45, 60, 0.48);
  border-color: rgba(138, 153, 173, 0.22);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.downloads-information-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  margin: 14px auto 0;
}

.download-information-card {
  padding: 18px;
}

.download-section-title {
  margin: 0 0 13px;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.35px;
}

.download-installation-list {
  display: grid;
  gap: 8px;
  padding-left: 22px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.download-installation-list li::marker {
  color: var(--accent-cyan);
  font-weight: 800;
}

.downloads-panel a,
.downloads-panel a:visited {
  color: var(--accent-cyan);
  font-size: 11px;
  text-decoration: none;
}

.downloads-panel a:hover {
  text-decoration: underline;
}

.download-estimate-note {
  margin: -4px 0 10px;
  color: #d0a957;
  font-size: 10px;
  line-height: 1.45;
}

.download-requirements-list {
  margin: 0;
}

/* --- POLISHED WEBSHOP MARKETPLACE GRID --- */
#webshop-items-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 4px;
}

.webshop-card {
  background: linear-gradient(145deg, rgba(10, 15, 26, 0.95) 30%, rgba(3, 7, 18, 0.98) 100%);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.webshop-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 6px 25px rgba(0, 195, 255, 0.25);
  transform: translateY(-2px);
}

.webshop-catalog-notice {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
  padding: 11px 13px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
  background: rgba(0, 195, 255, 0.06);
  border: 1px solid rgba(0, 195, 255, 0.22);
  border-radius: 5px;
}

.webshop-catalog-notice strong {
  color: var(--accent-cyan);
  letter-spacing: 0.6px;
}

.webshop-filter-panel {
  margin-bottom: 12px;
  padding: 2px 0 0;
}

.webshop-class-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(74, 117, 163, 0.28);
}

.webshop-class-filter {
  min-width: 42px;
  min-height: 27px;
  margin: 0;
  padding: 4px 10px;
  color: #8090a5;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.35px;
  background: rgba(0, 195, 255, 0.07);
  border: 1px solid rgba(0, 195, 255, 0.42);
  border-radius: 4px;
  cursor: pointer;
}

.webshop-class-filter-all {
  min-width: 56px;
}

.webshop-class-filter:hover,
.webshop-class-filter.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 195, 255, 0.28), rgba(0, 119, 255, 0.46));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 195, 255, 0.12);
}

.webshop-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.webshop-category-dropdown {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: #d8e4f2;
}

.webshop-category-dropdown:hover:not(.is-unavailable),
.webshop-category-dropdown.is-active {
  color: #fff;
}

.webshop-category-dropdown select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  margin: 0;
  padding: 7px 9px;
  color: #fff;
  font-size: 10px;
  line-height: 1.3;
  background: linear-gradient(180deg, rgba(14, 24, 41, 0.98), rgba(7, 13, 25, 0.98));
  border: 1px solid rgba(74, 117, 163, 0.68);
  border-radius: 4px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.webshop-category-dropdown select:focus {
  outline: 1px solid var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.webshop-category-dropdown small {
  color: #69778a;
  font-size: 7px;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

.webshop-category-dropdown.is-unavailable {
  color: #758399;
  cursor: not-allowed;
  opacity: 0.52;
}

.webshop-category-spears {
  grid-column: 2;
}

.webshop-category-dropdown.is-unavailable select {
  color: #6e7a8d;
  cursor: not-allowed;
}

.webshop-search-row {
  display: block;
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid rgba(74, 117, 163, 0.28);
}

.webshop-all-filter {
  min-width: 0;
  min-height: 38px;
  margin: 0;
  padding: 7px 9px;
  color: #d8e4f2;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25px;
  text-align: center;
  background: linear-gradient(180deg, rgba(15, 27, 46, 0.96), rgba(7, 13, 25, 0.96));
  border: 1px solid var(--border-color);
  border-radius: 3px;
  cursor: pointer;
}

.webshop-all-filter:hover,
.webshop-all-filter.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 195, 255, 0.16), rgba(0, 119, 255, 0.26));
  border-color: var(--accent-cyan);
}

.webshop-inert-filter-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px 10px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 9px 10px;
  overflow-x: auto;
  color: #7d8999;
  font-size: 10px;
  background: rgba(3, 7, 18, 0.32);
  border-top: 1px solid rgba(74, 117, 163, 0.24);
  border-bottom: 1px solid rgba(74, 117, 163, 0.24);
}

.webshop-inert-filter-row label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  cursor: not-allowed;
}

.webshop-inert-filter-row input {
  width: auto;
  margin: 0;
}

.webshop-inert-filter-row small {
  display: none;
}

.webshop-readonly-note {
  margin-top: 6px;
  color: #637186;
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0.2px;
}

.webshop-catalog-controls {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr);
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  background: rgba(3, 7, 18, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.webshop-catalog-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.webshop-catalog-field select,
.webshop-catalog-field input {
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 8px 10px;
  box-sizing: border-box;
  color: #fff;
  background: rgba(10, 16, 30, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
  text-transform: none;
}

.webshop-catalog-field select:focus,
.webshop-catalog-field input:focus {
  outline: 1px solid var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.webshop-catalog-count {
  margin-bottom: 12px;
  padding: 8px 10px;
  color: #ffd700;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  background: rgba(3, 7, 18, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.webshop-catalog-card {
  min-width: 0;
  padding: 13px;
  text-align: center;
  background: linear-gradient(145deg, rgba(10, 15, 26, 0.95) 30%, rgba(3, 7, 18, 0.98) 100%);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.webshop-catalog-card:hover {
  border-color: rgba(0, 195, 255, 0.65);
  box-shadow: 0 6px 22px rgba(0, 195, 255, 0.16);
}

.webshop-item-image-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 118px;
  margin-bottom: 11px;
  overflow: hidden;
  background: radial-gradient(circle, rgba(0, 195, 255, 0.07), rgba(0, 0, 0, 0.25));
  border: 1px solid rgba(74, 117, 163, 0.35);
  border-radius: 4px;
}

.webshop-item-image {
  max-width: 100px;
  max-height: 100px;
  object-fit: contain;
  image-rendering: auto;
}

.webshop-item-image-placeholder {
  max-width: 120px;
  color: #657389;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.9px;
  line-height: 1.35;
}

.webshop-catalog-category {
  min-height: 28px;
  color: var(--accent-cyan);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.35px;
  line-height: 1.35;
  text-transform: uppercase;
}

.webshop-catalog-name {
  min-height: 34px;
  margin: 6px 0;
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
}

.webshop-catalog-identity {
  margin-bottom: 11px;
  color: var(--text-muted);
  font-family: Consolas, 'Courier New', monospace;
  font-size: 9px;
}

.webshop-catalog-unavailable,
.webshop-page-button {
  width: 100%;
  padding: 8px 9px;
  color: #718096;
  background: rgba(71, 85, 105, 0.12);
  border: 1px solid rgba(113, 128, 150, 0.28);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.webshop-catalog-unavailable:disabled,
.webshop-page-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.webshop-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.webshop-page-button {
  width: auto;
  min-width: 92px;
  color: var(--accent-cyan);
  cursor: pointer;
}

.webshop-page-label {
  color: var(--text-muted);
  font-size: 11px;
}

.webshop-catalog-empty {
  grid-column: 1 / -1;
  padding: 28px 14px;
  color: var(--text-muted);
  text-align: center;
  background: rgba(3, 7, 18, 0.55);
  border: 1px dashed var(--border-color);
  border-radius: 5px;
}

/* --- CHARACTER RANKINGS READ-ONLY STATES --- */
.rankings-class-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.rankings-filter-button {
  width: auto;
  margin-top: 0;
  padding: 4px 6px;
  color: #8a99ad;
  font-size: 9px;
  white-space: nowrap;
  background: rgba(0, 195, 255, 0.1);
}

.rankings-filter-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 195, 255, 0.3), rgba(0, 119, 255, 0.5));
  box-shadow: 0 0 10px rgba(0, 195, 255, 0.6);
}

.rankings-state {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle, rgba(0, 195, 255, 0.07), rgba(3, 7, 18, 0.7));
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.rankings-state strong {
  color: var(--accent-cyan);
  font-size: 13px;
  letter-spacing: 0.7px;
}

.rankings-state span {
  max-width: 440px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.rankings-development-notice {
  margin-bottom: 12px;
  padding: 8px 10px;
  color: #ffd700;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.5px;
  background: rgba(255, 215, 0, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 4px;
}

.rankings-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.rankings-table {
  width: 100%;
  min-width: 520px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: left;
  border-collapse: collapse;
}

.rankings-table thead tr {
  color: var(--accent-cyan);
  border-bottom: 1px solid var(--border-color);
}

.rankings-table tbody tr {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.rankings-table th,
.rankings-table td {
  padding: 10px 4px;
}

.rankings-align-right {
  color: #fff;
  text-align: right;
}

.rankings-position {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.rankings-position-1 { color: #ffd700; }
.rankings-position-2 { color: #c0c0c0; }
.rankings-position-3 { color: #cd7f32; }
.rankings-character-name { color: #fff; font-weight: 700; }
.rankings-reset-count { color: var(--accent-cyan); font-weight: 700; }

.rankings-empty-row {
  padding: 18px 6px !important;
  color: var(--text-muted);
  text-align: center;
}

/* --- SERVER INFO / GAME GUIDE --- */
.guide-intro {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.guide-card {
  background: linear-gradient(145deg, rgba(10, 15, 26, 0.95) 30%, rgba(3, 7, 18, 0.98) 100%);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.guide-card-wide {
  grid-column: 1 / -1;
}

.guide-card-title {
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.7px;
  margin-bottom: 9px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border-color);
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
}

.guide-list {
  display: flex;
  flex-direction: column;
}

.guide-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.guide-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.guide-row b {
  color: #fff;
  font-weight: 700;
  text-align: right;
}

.guide-command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 8px;
}

.guide-command {
  display: block;
  color: var(--accent-cyan);
  background: rgba(0, 195, 255, 0.08);
  border: 1px solid rgba(0, 195, 255, 0.2);
  border-radius: 4px;
  padding: 8px 9px;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 11px;
  text-align: center;
  overflow-wrap: anywhere;
}

footer {
  background: rgba(3, 7, 18, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: auto;
  position: relative;
  z-index: 2;
}

footer div {
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0, 195, 255, 0.4);
}

@media (max-width: 1400px) {
  body::before, body::after, .mu-particles-left, .mu-particles-right {
    display: none;
  }
}

@media (max-width: 1024px) {
  .header-inner {
    gap: 16px;
  }

  nav {
    flex: 1 1 auto;
    min-width: 0;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 2px 6px;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

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

  .layout > * {
    min-width: 0;
  }

  .center-column,
  .guide-layout-active .center-column {
    order: -1;
  }

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

}

@media (max-width: 760px) {
  body {
    background-image: url('frozen-kundun-citadel-mobile.webp');
    background-position: center 104px;
    background-size: auto 1920px;
  }

  .hero.hero-artwork {
    height: 300px;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    min-width: 0;
  }

  .brand {
    align-self: center;
  }

  nav {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

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

  .webshop-category-spears {
    grid-column: auto;
  }

  .downloads-card-grid,
  .downloads-information-grid,
  .content-section-grid {
    grid-template-columns: 1fr;
  }

  .content-card-wide {
    grid-column: auto;
  }

  .download-card {
    min-height: 0;
  }

  .download-card-description {
    min-height: 0;
  }

  .download-unavailable-button {
    margin-top: 8px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 520px) {
  .server-row {
    align-items: flex-start;
    gap: 12px;
  }

  .server-row span,
  .server-row b {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .server-row b {
    text-align: right;
  }

  .downloads-panel,
  .download-card,
  .download-information-card {
    padding: 14px;
  }

  .download-fact-row,
  .download-requirement-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .download-fact-row dd,
  .download-requirement-row dd {
    text-align: left;
  }

  .webshop-category-grid {
    grid-template-columns: 1fr;
  }

  .webshop-search-row {
    grid-template-columns: 1fr;
  }

  #webshop-items-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .webshop-item-image-frame {
    height: 96px;
  }

  .webshop-item-image {
    max-width: 80px;
    max-height: 80px;
  }

  .webshop-pagination {
    gap: 8px;
  }

  .webshop-page-button {
    min-width: 78px;
  }

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

  .guide-row {
    flex-direction: column;
    gap: 3px;
  }

  .guide-row b {
    text-align: left;
  }

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