:root {
  --pal-blue: #3b82f6;
  --pal-blue-dark: #1d4ed8;
  --pal-blue-light: #60a5fa;
  --pal-blue-lighter: #93c5fd;
  --pal-blue-glow: rgba(96, 165, 250, 0.45);
  --pal-cyan: #06b6d4;
  --pal-cyan-glow: rgba(6, 182, 212, 0.4);
  --pal-orange: #f59e0b;
  --pal-orange-dark: #d97706;
  --pal-orange-glow: rgba(245, 158, 11, 0.5);
  --pal-dark: #0a0f1e;
  --pal-darker: #050810;
  --pal-text: #e2e8f0;
  --pal-text-light: #94a3b8;
  --pal-glass: rgba(255, 255, 255, 0.06);
  --pal-glass-border: rgba(255, 255, 255, 0.12);
  --pal-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

body {
  background: #050810;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(59, 130, 246, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(6, 182, 212, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 100% 80% at 50% 50%, rgba(29, 78, 216, 0.12) 0%, transparent 70%);
  background-attachment: fixed;
  color: var(--pal-text);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle 2px at 20% 30%, rgba(96,165,250,0.15), transparent),
    radial-gradient(circle 1px at 60% 70%, rgba(6,182,212,0.1), transparent),
    radial-gradient(circle 1.5px at 80% 20%, rgba(147,197,253,0.1), transparent),
    radial-gradient(circle 1px at 40% 80%, rgba(96,165,250,0.08), transparent);
  background-size: 300px 300px, 250px 250px, 200px 200px, 350px 350px;
  pointer-events: none;
  z-index: 0;
  animation: starfield 60s linear infinite;
}

@keyframes starfield {
  0% { background-position: 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: 300px 300px, -250px 250px, 200px -200px, -350px -350px; }
}

body::after {
  content: '';
  position: fixed;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(59,130,246,0.03) 60deg, transparent 120deg, rgba(6,182,212,0.03) 180deg, transparent 240deg, rgba(96,165,250,0.02) 300deg, transparent 360deg);
  pointer-events: none;
  z-index: 0;
  animation: rotate-bg 40s linear infinite;
}

@keyframes rotate-bg {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

main { flex: 1; position: relative; z-index: 1; }

/* NAVBAR */
.navbar-palworld {
  background: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid rgba(96, 165, 250, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.navbar-palworld .navbar-brand {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px;
  animation: brandGlow 3s ease-in-out infinite;
}

@keyframes brandGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}

.palworld-logo {
  background: linear-gradient(135deg, var(--pal-blue-light) 0%, var(--pal-cyan) 50%, var(--pal-blue-light) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(96, 165, 250, 0.5));
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.navbar-palworld .nav-link {
  color: rgba(226, 232, 240, 0.75) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500; border-radius: 10px;
  padding: 0.5rem 0.85rem !important;
  position: relative;
}

.navbar-palworld .nav-link::after {
  content: '';
  position: absolute; bottom: 2px; left: 50%;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--pal-blue-light), var(--pal-cyan));
  border-radius: 2px;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-palworld .nav-link:hover {
  color: #fff !important;
  background: rgba(59, 130, 246, 0.12);
  text-shadow: 0 0 12px var(--pal-blue-glow);
}

.navbar-palworld .nav-link:hover::after { width: 60%; }
.navbar-palworld .nav-link.active { color: #fff !important; background: rgba(59, 130, 246, 0.1); }
.navbar-palworld .nav-link.active::after { width: 60%; }
.lang-flag { font-size: 1.1rem; }

.dropdown-menu {
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  animation: dropdownIn 0.25s ease-out;
}

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

.dropdown-menu .dropdown-item { color: rgba(226, 232, 240, 0.8); border-radius: 10px; margin: 3px; transition: all 0.2s; }
.dropdown-menu .dropdown-item:hover { background: rgba(59, 130, 246, 0.2); color: #fff; }

/* HERO */
.hero-section { padding: clamp(1.5rem, 5vw, 3.5rem) 1rem clamp(1rem, 3vw, 2.5rem); text-align: center; position: relative; animation: heroIn 0.8s ease-out; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-section::after {
  content: '';
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 50%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--pal-blue-light), var(--pal-cyan), var(--pal-blue-light), transparent);
  animation: linePulse 3s ease-in-out infinite;
}

@keyframes linePulse {
  0%, 100% { opacity: 0.5; width: 40%; }
  50% { opacity: 1; width: 60%; }
}

.hero-title {
  font-size: clamp(1.6rem, 5vw, 3rem); font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, var(--pal-blue-lighter) 25%, var(--pal-cyan) 50%, var(--pal-blue-light) 75%, #fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: -1.5px;
  animation: gradientShift 5s ease-in-out infinite;
}

.hero-subtitle {
  font-size: clamp(0.85rem, 2.5vw, 1.2rem); color: rgba(148, 163, 184, 0.8);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* CENTERED CONTENT WRAPPER */
.content-wrapper {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* GLASS PANELS */
.filter-bar {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.filter-label {
  font-size: 0.68rem; font-weight: 700;
  color: rgba(96, 165, 250, 0.6);
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 0.3rem;
}

.form-select, .form-control {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(96, 165, 250, 0.12);
  color: #fff; border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-select option { background: #0a0f1e; color: #fff; }

.form-select:focus, .form-control:focus {
  background: rgba(59, 130, 246, 0.08);
  border-color: var(--pal-blue-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 0 24px rgba(96, 165, 250, 0.2);
  color: #fff;
}

.form-control::placeholder { color: rgba(148, 163, 184, 0.4); }

/* SERVER ROWS (compact centered layout) */
@keyframes premiumPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(245,158,11,0.12), 0 0 20px rgba(245,158,11,0.06), inset 0 1px 0 rgba(255,255,255,0.05); }
  50% { box-shadow: 0 4px 20px rgba(245,158,11,0.22), 0 0 40px rgba(245,158,11,0.12), inset 0 1px 0 rgba(255,255,255,0.05); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%); }
  100% { transform: translateX(100%) translateY(100%); }
}

.server-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.server-row {
  width: 100%;
  margin-bottom: 0.5rem !important;
}

.server-row-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(96, 165, 250, 0.1);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.server-row-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(96, 165, 250, 0.3);
}

.server-row-card.premium-row {
  border: 2px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12), 0 0 20px rgba(245, 158, 11, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: premiumPulse 3s ease-in-out infinite;
}

.server-row-card.premium-row:hover {
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.25), 0 0 40px rgba(245, 158, 11, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(245, 158, 11, 0.6);
}

.premium-badge {
  position: absolute; top: 0; right: 0;
  background: linear-gradient(135deg, var(--pal-orange) 0%, #fbbf24 50%, var(--pal-orange-dark) 100%);
  background-size: 200% auto;
  color: #fff; padding: 0.2rem 0.6rem;
  font-size: 0.6rem; font-weight: 800;
  border-radius: 0 0 0 10px; z-index: 3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  letter-spacing: 1px;
  animation: gradientShift 3s ease-in-out infinite;
}

.server-row-banner {
  display: block;
  width: 200px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.3);
  position: relative;
}

.server-row-banner img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.server-row-card:hover .server-row-banner img {
  transform: scale(1.03);
}

.server-row-banner-placeholder {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0f1e 0%, #1e3a5f 50%, #0a0f1e 100%);
  color: rgba(96, 165, 250, 0.3);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  position: relative;
  overflow: hidden;
}

.server-row-banner-placeholder::after {
  content: '';
  position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(96,165,250,0.08) 50%, transparent 60%);
  animation: shimmer 4s infinite;
}

.server-row-body {
  padding: clamp(0.6rem, 2vw, 0.9rem) clamp(0.7rem, 2vw, 1rem);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

.server-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.server-row-title {
  margin: 0;
  font-size: clamp(0.85rem, 2.2vw, 1.05rem);
  font-weight: 700;
  line-height: 1.3;
}

.server-row-title a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.server-row-title a:hover {
  color: var(--pal-blue-light);
  text-shadow: 0 0 16px var(--pal-blue-glow);
}

.server-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center;
}

.server-row-meta .badge {
  font-size: clamp(0.55rem, 1.5vw, 0.65rem);
  border-radius: 5px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.server-row-meta .badge:hover { transform: scale(1.08); }

.server-row-actions-compact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.server-row-actions-compact .vote-count {
  font-weight: 700; color: var(--pal-orange);
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
  margin-right: 0.3rem;
}

.badge.bg-success { background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important; }
.badge.bg-danger { background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important; }
.badge.bg-warning { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important; color: #fff !important; }
.badge.bg-secondary { background: linear-gradient(135deg, #475569 0%, #64748b 100%) !important; }
.badge.bg-info { background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%) !important; color: #fff !important; }
.badge.bg-light { background: rgba(255, 255, 255, 0.9) !important; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); color: #0a0f1e !important; }

.btn-xs {
  padding: clamp(0.35rem, 1.2vw, 0.45rem) clamp(0.45rem, 1.5vw, 0.6rem);
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  border-radius: 8px;
  line-height: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .server-row-card {
    flex-direction: column;
  }
  .server-row-banner {
    width: 100%;
  }
  .server-row-banner img {
    height: auto;
  }
  .server-row-banner-placeholder {
    height: clamp(80px, 25vw, 140px);
  }
  .server-row-body {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .server-row-info {
    width: 100%;
  }
  .server-row-actions-compact {
    width: 100%;
    justify-content: space-between;
  }
  .filter-bar .row > div {
    margin-bottom: 0.4rem;
  }
  .discord-banner-inner {
    flex-direction: column;
    text-align: center;
    padding: 0.8rem;
  }
  .discord-banner-content {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  .discord-banner-icon {
    font-size: 2rem;
  }
  .discord-banner-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .server-row-meta .badge {
    font-size: 0.55rem;
  }
  .hero-section {
    padding: 1rem 0.5rem 1.5rem;
  }
}

/* BUTTONS */
.btn-palworld {
  background: linear-gradient(135deg, var(--pal-blue) 0%, var(--pal-blue-dark) 100%);
  color: #fff; border: 1px solid rgba(96, 165, 250, 0.3);
  font-weight: 600; border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-palworld::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.6s;
}

.btn-palworld:hover::before { left: 100%; }

.btn-palworld:hover {
  background: linear-gradient(135deg, var(--pal-blue-light) 0%, var(--pal-blue) 100%);
  color: #fff; transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4), 0 0 24px rgba(96, 165, 250, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-vote {
  background: linear-gradient(135deg, var(--pal-orange) 0%, var(--pal-orange-dark) 100%);
  color: #fff; border: 1px solid rgba(245, 158, 11, 0.4);
  font-weight: 700; border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-vote::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}

.btn-vote:hover::before { left: 100%; }

.btn-vote:hover {
  background: linear-gradient(135deg, #fbbf24 0%, var(--pal-orange) 100%);
  color: #fff; transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4), 0 0 36px rgba(245, 158, 11, 0.3);
}

.btn-premium {
  background: linear-gradient(135deg, #fbbf24 0%, var(--pal-orange) 100%);
  color: #0a0f1e; border: none;
  font-weight: 700; font-size: 0.72rem; border-radius: 10px;
  box-shadow: 0 2px 12px rgba(251, 191, 36, 0.3);
  transition: all 0.3s;
}

.btn-premium:hover {
  background: linear-gradient(135deg, #fde047 0%, #fbbf24 100%);
  color: #0a0f1e; transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(251, 191, 36, 0.5);
}

.btn-outline-light {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px); transition: all 0.3s;
  border-radius: 12px;
}

.btn-outline-light:hover { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.4); }

.btn-outline-secondary {
  border: 1px solid rgba(96, 165, 250, 0.15);
  color: rgba(148, 163, 184, 0.8);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px; transition: all 0.3s;
}

.btn-outline-secondary:hover { background: rgba(59, 130, 246, 0.12); color: #fff; border-color: rgba(96, 165, 250, 0.3); }

.btn-outline-danger {
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: rgba(248, 113, 113, 0.9);
  background: rgba(239, 68, 68, 0.08);
  border-radius: 12px; transition: all 0.3s;
}

.btn-outline-danger:hover { background: rgba(239, 68, 68, 0.25); color: #fff; }

/* AUTH CARDS */
.auth-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative; overflow: hidden;
  animation: cardIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cardIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--pal-blue-light), var(--pal-cyan), var(--pal-blue-light), transparent);
  background-size: 200% auto;
  animation: gradientShift 4s ease-in-out infinite;
}

.palworld-heading {
  background: linear-gradient(135deg, #fff 0%, var(--pal-blue-lighter) 50%, var(--pal-cyan) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  font-weight: 800;
}

.palworld-link { color: var(--pal-blue-light); text-decoration: none; transition: all 0.3s; }
.palworld-link:hover { color: var(--pal-cyan); text-shadow: 0 0 12px var(--pal-cyan-glow); }

/* DASHBOARD */
.stat-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(96, 165, 250, 0.1);
  border-radius: 18px;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative; overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(180deg, rgba(96,165,250,0.05) 0%, transparent 100%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 20px 48px rgba(59, 130, 246, 0.15), 0 0 36px rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.25);
}

.stat-icon {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--pal-blue-light) 0%, var(--pal-cyan) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  filter: drop-shadow(0 4px 12px rgba(96, 165, 250, 0.4));
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.stat-card h3 {
  font-weight: 900; color: #fff; margin: 0.5rem 0;
  font-size: 2.2rem; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.stat-card p {
  color: rgba(148, 163, 184, 0.5); margin: 0;
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.8px;
}

.api-key-display {
  font-size: 0.7rem; word-break: break-all;
  background: rgba(0, 0, 0, 0.4);
  color: var(--pal-blue-light);
  padding: 0.35rem 0.6rem; border-radius: 8px;
  border: 1px solid rgba(96, 165, 250, 0.15);
}

/* GENERIC CARDS */
.card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(96, 165, 250, 0.1);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: rgba(226, 232, 240, 0.85);
}

.card-title { color: #fff; font-weight: 700; }

/* SERVER DETAIL PAGE */
.server-detail-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.server-detail-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.server-detail-banner {
  width: 100%;
  height: auto;
  display: block;
}

.server-detail-banner-placeholder {
  width: 100%;
  height: clamp(120px, 20vw, 250px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0f1e 0%, #1e3a5f 50%, #0a0f1e 100%);
  color: rgba(96, 165, 250, 0.3);
  font-size: clamp(2rem, 6vw, 4rem);
}

.server-detail-hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  padding: clamp(1rem, 3vw, 2rem);
}

.server-detail-title {
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.server-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.server-detail-badges .badge {
  font-size: clamp(0.65rem, 1.8vw, 0.8rem);
  border-radius: 6px;
  font-weight: 600;
}

.server-detail-body {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  align-items: flex-start;
}

.server-detail-main {
  flex: 1;
  min-width: 0;
}

.server-detail-sidebar {
  flex-shrink: 0;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.server-detail-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.server-detail-tabs {
  border-bottom: 1px solid rgba(96, 165, 250, 0.15);
  padding: 0.5rem 1rem 0;
}
.server-detail-tabs .nav-link {
  color: #94a3b8;
  border: none;
  border-radius: 8px 8px 0 0;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.server-detail-tabs .nav-link:hover {
  color: #fff;
  background: rgba(78, 142, 255, 0.1);
}
.server-detail-tabs .nav-link.active {
  color: #fff;
  background: rgba(78, 142, 255, 0.2);
  border-bottom: 2px solid #4e8eff;
}

.server-detail-section {
  padding: clamp(1rem, 3vw, 1.5rem);
  border-bottom: 1px solid rgba(96, 165, 250, 0.08);
}

.server-detail-section:last-child {
  border-bottom: none;
}

.server-detail-section-title {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-weight: 700;
  color: var(--pal-blue-light);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.server-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.06);
}

.server-info-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(96, 165, 250, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.server-info-value {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.9);
  word-break: break-word;
}

.server-info-value.vote-highlight {
  color: var(--pal-orange);
  font-weight: 700;
  font-size: 1.1rem;
}

.server-detail-footer {
  padding: 0.8rem 1.5rem;
  text-align: right;
}

.vote-card-body {
  padding: 1.5rem;
  text-align: center;
}

.vote-label {
  color: rgba(148, 163, 184, 0.6);
  margin: 0.3rem 0 1rem 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.manage-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(96, 165, 250, 0.1);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.manage-card h5 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

@media (max-width: 900px) {
  .server-detail-body {
    flex-direction: column;
  }
  .server-detail-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .vote-card, .manage-card {
    flex: 1;
    min-width: 250px;
  }
}

@media (max-width: 600px) {
  .server-detail-sidebar {
    flex-direction: column;
  }
  .server-info-grid {
    grid-template-columns: 1fr;
  }
}

.server-description { line-height: 1.8; color: rgba(226, 232, 240, 0.8); }
.server-description h1, .server-description h2, .server-description h3 { color: var(--pal-blue-light); text-shadow: 0 2px 12px rgba(96, 165, 250, 0.2); }
.server-description a { color: var(--pal-cyan); text-decoration: none; transition: all 0.3s; }
.server-description a:hover { text-shadow: 0 0 12px var(--pal-cyan-glow); }
.server-description img { max-width: 100%; border-radius: 14px; margin: 1rem 0; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3); }
.server-description code { background: rgba(0, 0, 0, 0.4); color: var(--pal-blue-light); padding: 0.15rem 0.4rem; border-radius: 6px; font-size: 0.9rem; }
.server-description pre { background: rgba(0, 0, 0, 0.5); color: #e0e0e0; padding: 1rem; border-radius: 14px; overflow-x: auto; border: 1px solid rgba(96, 165, 250, 0.1); }
.server-description blockquote { border-left: 3px solid var(--pal-blue-light); padding-left: 1rem; margin: 1rem 0; color: rgba(148, 163, 184, 0.6); font-style: italic; }

.vote-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(6, 182, 212, 0.08) 100%);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(96, 165, 250, 0.15);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.vote-count-big {
  font-size: clamp(2.5rem, 6vw, 3.5rem); font-weight: 900;
  background: linear-gradient(135deg, var(--pal-orange) 0%, #fbbf24 50%, var(--pal-orange) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  filter: drop-shadow(0 4px 16px rgba(245, 158, 11, 0.4));
  animation: gradientShift 3s ease-in-out infinite;
  line-height: 1;
}

/* FOOTER */
.footer-palworld {
  background: rgba(5, 8, 16, 0.8);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-top: 1px solid rgba(96, 165, 250, 0.15);
  color: rgba(148, 163, 184, 0.6);
  margin-top: auto;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  position: relative; z-index: 1;
}

.footer-heading {
  color: var(--pal-blue-light); font-weight: 700;
  margin-bottom: 1rem; font-size: 0.88rem;
  text-transform: uppercase; letter-spacing: 1.2px;
  text-shadow: 0 0 12px rgba(96, 165, 250, 0.2);
}

.footer-text { font-size: 0.85rem; margin-bottom: 1rem; color: rgba(148, 163, 184, 0.4); }
.footer-links li { margin-bottom: 0.4rem; }
.footer-link { color: rgba(148, 163, 184, 0.5); text-decoration: none; font-size: 0.85rem; transition: all 0.3s; }
.footer-link:hover { color: var(--pal-cyan); text-shadow: 0 0 12px var(--pal-cyan-glow); }
.footer-divider { border-color: rgba(96, 165, 250, 0.08); margin: 1.5rem 0 1rem 0; }
.footer-copy { font-size: 0.8rem; color: rgba(148, 163, 184, 0.3); }

/* PAGINATION */
.pagination-wrapper { padding: 1rem 0; }
.pagination .page-link {
  background: rgba(255, 255, 255, 0.04);
  color: var(--pal-blue-light);
  border: 1px solid rgba(96, 165, 250, 0.1);
  border-radius: 10px !important; margin: 0 3px;
  transition: all 0.3s; backdrop-filter: blur(10px);
}
.pagination .page-link:hover { background: rgba(59, 130, 246, 0.15); color: #fff; border-color: rgba(96, 165, 250, 0.3); transform: translateY(-2px); }
.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, var(--pal-blue) 0%, var(--pal-blue-dark) 100%);
  color: #fff; border-color: var(--pal-blue);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}
.pagination .page-item.disabled .page-link { color: rgba(148, 163, 184, 0.2); background: rgba(255, 255, 255, 0.02); }

/* TABLES */
.table { color: rgba(226, 232, 240, 0.8); --bs-table-bg: transparent; }
.table > :not(caption) > * > * { background-color: transparent; color: rgba(226, 232, 240, 0.8); border-color: rgba(96, 165, 250, 0.06); }
.table thead th { color: rgba(96, 165, 250, 0.5); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; border-bottom: 2px solid rgba(96, 165, 250, 0.15); }
.table-hover > tbody > tr { transition: all 0.2s; }
.table-hover > tbody > tr:hover > * { background-color: rgba(59, 130, 246, 0.08); color: #fff; }
.table-responsive { border-radius: 14px; }

/* ALERTS */
.alert { border-radius: 14px; backdrop-filter: blur(12px); }
.alert-danger { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.25); color: #fca5a5; }

/* TABS */
.nav-tabs { border-bottom: 1px solid rgba(96, 165, 250, 0.1); }
.nav-tabs .nav-link { color: rgba(148, 163, 184, 0.5); border: none; border-radius: 12px 12px 0 0; transition: all 0.3s; font-weight: 600; }
.nav-tabs .nav-link:hover { color: rgba(226, 232, 240, 0.8); background: rgba(255, 255, 255, 0.03); }
.nav-tabs .nav-link.active { color: #fff; background: rgba(59, 130, 246, 0.1); border-bottom: 2px solid var(--pal-blue-light); }
.tab-content { padding-top: 1rem; }

/* MISC */
hr { border-color: rgba(96, 165, 250, 0.08); }
.text-muted { color: rgba(148, 163, 184, 0.4) !important; }
.text-warning { color: var(--pal-orange) !important; }
.text-success { color: #10b981 !important; }
.text-info { color: var(--pal-cyan) !important; }
.text-danger { color: #f87171 !important; }
.text-light { color: rgba(255, 255, 255, 0.85) !important; }
.text-dark { color: #0a0f1e !important; }
a { color: var(--pal-blue-light); }
pre { background: rgba(0, 0, 0, 0.5) !important; border: 1px solid rgba(96, 165, 250, 0.1); border-radius: 14px; padding: 1rem; overflow-x: auto; }
code { color: var(--pal-blue-light); }
.input-group .btn-outline-secondary { border: 1px solid rgba(96, 165, 250, 0.15); }

/* ANIMATIONS */
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-25px); } }
@keyframes glow-pulse { 0%, 100% { box-shadow: 0 0 20px rgba(96,165,250,0.2); } 50% { box-shadow: 0 0 40px rgba(96,165,250,0.4); } }

/* SCROLLBAR */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); }
::-webkit-scrollbar-thumb { background: linear-gradient(135deg, var(--pal-blue) 0%, var(--pal-blue-dark) 100%); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(135deg, var(--pal-blue-light) 0%, var(--pal-blue) 100%); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-title { font-size: 1.8rem; }
  .filter-bar .row > div { margin-bottom: 0.5rem; }
  .stat-card h3 { font-size: 1.8rem; }
  .vote-count-big { font-size: 2.5rem; }
  .server-card:hover { transform: translateY(-4px) scale(1.01); }
}

/* LIGHT THEME */
[data-theme="light"] {
  --pal-text: #1e293b;
  --pal-text-light: #64748b;
}

[data-theme="light"] body {
  background: #f0f4ff;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(6, 182, 212, 0.08) 0%, transparent 60%);
  color: #1e293b;
}

[data-theme="light"] body::before { opacity: 0.3; }
[data-theme="light"] body::after { opacity: 0.3; }

[data-theme="light"] .navbar-palworld {
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .navbar-palworld .nav-link {
  color: rgba(30, 41, 59, 0.7) !important;
}

[data-theme="light"] .navbar-palworld .nav-link:hover {
  color: #1e293b !important;
  background: rgba(59, 130, 246, 0.08);
}

[data-theme="light"] .navbar-palworld .nav-link.active {
  color: #1e293b !important;
}

[data-theme="light"] .palworld-logo {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #3b82f6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

[data-theme="light"] .dropdown-menu {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .dropdown-menu .dropdown-item { color: rgba(30, 41, 59, 0.8); }
[data-theme="light"] .dropdown-menu .dropdown-item:hover { background: rgba(59, 130, 246, 0.1); color: #1e293b; }

[data-theme="light"] .hero-title {
  background: linear-gradient(135deg, #1e293b 0%, #3b82f6 50%, #06b6d4 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

[data-theme="light"] .hero-subtitle { color: rgba(100, 116, 139, 0.8); }

[data-theme="light"] .filter-bar,
[data-theme="light"] .server-card,
[data-theme="light"] .auth-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .card,
[data-theme="light"] .server-detail-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(59, 130, 246, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #1e293b;
}

[data-theme="light"] .server-card:hover {
  box-shadow: 0 20px 48px rgba(59, 130, 246, 0.12), 0 0 32px rgba(96, 165, 250, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
}

[data-theme="light"] .server-name-link { color: #1e293b; text-shadow: none; }
[data-theme="light"] .server-name-link:hover { color: #3b82f6; }

[data-theme="light"] .server-excerpt { color: rgba(100, 116, 139, 0.7); }

[data-theme="light"] .form-select,
[data-theme="light"] .form-control {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(59, 130, 246, 0.15);
  color: #1e293b;
}

[data-theme="light"] .form-select option { background: #fff; color: #1e293b; }

[data-theme="light"] .form-select:focus,
[data-theme="light"] .form-control:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: #3b82f6;
  color: #1e293b;
}

[data-theme="light"] .form-control::placeholder { color: rgba(100, 116, 139, 0.5); }

[data-theme="light"] .palworld-heading {
  background: linear-gradient(135deg, #1e293b 0%, #3b82f6 50%, #06b6d4 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

[data-theme="light"] .palworld-link { color: #3b82f6; }
[data-theme="light"] .palworld-link:hover { color: #06b6d4; }

[data-theme="light"] .vote-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(6, 182, 212, 0.04) 100%);
  border-color: rgba(59, 130, 246, 0.1);
}

[data-theme="light"] .footer-palworld {
  background: rgba(255, 255, 255, 0.8);
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  color: rgba(100, 116, 139, 0.7);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .footer-link { color: rgba(100, 116, 139, 0.6); }
[data-theme="light"] .footer-link:hover { color: #3b82f6; }

[data-theme="light"] .text-muted { color: rgba(100, 116, 139, 0.5) !important; }

[data-theme="light"] .table { color: #1e293b; }
[data-theme="light"] .table > :not(caption) > * > * { color: #1e293b; border-color: rgba(59, 130, 246, 0.08); }
[data-theme="light"] .table-hover > tbody > tr:hover > * { background-color: rgba(59, 130, 246, 0.05); color: #1e293b; }

[data-theme="light"] .server-description { color: #334155; }
[data-theme="light"] .server-description h1, [data-theme="light"] .server-description h2, [data-theme="light"] .server-description h3 { color: #3b82f6; }
[data-theme="light"] .server-description code { background: rgba(59, 130, 246, 0.08); color: #3b82f6; }
[data-theme="light"] .server-description pre { background: rgba(241, 245, 249, 0.8); color: #334155; }

[data-theme="light"] .api-key-display { background: rgba(241, 245, 249, 0.8); color: #3b82f6; }

[data-theme="light"] .stat-card h3 { color: #1e293b; }
[data-theme="light"] .card-title { color: #1e293b; }

[data-theme="light"] .btn-outline-light { color: #1e293b; border-color: rgba(59, 130, 246, 0.2); }
[data-theme="light"] .btn-outline-light:hover { background: rgba(59, 130, 246, 0.08); color: #1e293b; }

[data-theme="light"] .theme-toggle { color: #1e293b; border-color: rgba(59, 130, 246, 0.2); }

[data-theme="light"] hr { border-color: rgba(59, 130, 246, 0.08); }

[data-theme="light"] pre { background: rgba(241, 245, 249, 0.8) !important; color: #334155; }
[data-theme="light"] code { color: #3b82f6; }

[data-theme="light"] ::-webkit-scrollbar-track { background: rgba(241, 245, 249, 0.5); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #93c5fd, #60a5fa); }

.btn-discord {
  background: #5865F2;
  color: #fff;
  border: none;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-discord:hover {
  background: #4752C4;
  color: #fff;
}

.discord-banner {
  background: linear-gradient(135deg, #5865F2, #4752C4);
  border-radius: 12px;
  overflow: hidden;
}
.discord-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.discord-banner-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.discord-banner-icon {
  font-size: 2.5rem;
  color: #fff;
}
.discord-banner-title {
  color: #fff;
  margin: 0;
  font-weight: 700;
}
.discord-banner-text {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-size: 0.9rem;
}
.discord-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.discord-banner .btn-discord {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.discord-banner .btn-discord:hover {
  background: rgba(255, 255, 255, 0.25);
}
.discord-banner .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.discord-banner .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Server description markdown rendering */
.server-description h1, .server-description h2, .server-description h3,
.server-description h4, .server-description h5, .server-description h6 {
  margin-top: 1.2em;
  margin-bottom: 0.6em;
  color: var(--pal-primary, #4e8eff);
}
.server-description h1 { font-size: 1.8rem; }
.server-description h2 { font-size: 1.5rem; }
.server-description h3 { font-size: 1.25rem; }
.server-description p { margin-bottom: 0.8em; line-height: 1.7; }
.server-description ul, .server-description ol { margin-bottom: 0.8em; padding-left: 1.5em; }
.server-description li { margin-bottom: 0.3em; }
.server-description blockquote {
  border-left: 4px solid var(--pal-primary, #4e8eff);
  padding: 0.5em 1em;
  margin: 0.8em 0;
  background: rgba(78, 142, 255, 0.08);
  border-radius: 0 4px 4px 0;
}
.server-description blockquote p { margin-bottom: 0; }
.server-description code {
  background: rgba(0, 0, 0, 0.15);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}
.server-description pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1em;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0.8em 0;
}
.server-description pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.server-description table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8em 0;
}
.server-description th, .server-description td {
  border: 1px solid rgba(128, 128, 128, 0.3);
  padding: 0.5em 0.8em;
  text-align: left;
}
.server-description th {
  background: rgba(78, 142, 255, 0.15);
  font-weight: 600;
}
.server-description img {
  max-width: 100%;
  border-radius: 6px;
  margin: 0.5em 0;
}
.server-description a {
  color: var(--pal-primary, #4e8eff);
  text-decoration: underline;
}
.server-description hr {
  border: none;
  border-top: 1px solid rgba(128, 128, 128, 0.3);
  margin: 1em 0;
}

/* EasyMDE dark theme overrides */
.EasyMDEContainer .editor-toolbar {
  border: 1px solid rgba(128, 128, 128, 0.3);
  background: rgba(30, 30, 46, 0.5);
}
.EasyMDEContainer .editor-toolbar button {
  color: #cdd6f4;
}
.EasyMDEContainer .editor-toolbar button:hover {
  background: rgba(78, 142, 255, 0.2);
}
.EasyMDEContainer .CodeMirror {
  background: #1e1e2e;
  color: #cdd6f4;
  border: 1px solid rgba(128, 128, 128, 0.3);
}
.EasyMDEContainer .editor-preview {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1em;
}
.EasyMDEContainer .editor-preview pre {
  background: #181825;
}
.EasyMDEContainer .editor-preview code {
  background: rgba(0, 0, 0, 0.3);
}
.EasyMDEContainer .editor-statusbar {
  color: #6c7086;
}

/* Banners page */
.banner-card .card-body {
  padding: 1.5rem;
}
.banner-card {
  background: rgba(20, 25, 40, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(78, 142, 255, 0.15);
}
.banner-style-group {
  padding: 1rem;
  background: rgba(15, 20, 35, 0.5);
  border: 1px solid rgba(78, 142, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}
.banner-style-group:hover {
  border-color: rgba(78, 142, 255, 0.3);
}
.banner-style-group .form-label {
  color: var(--pal-primary, #4e8eff);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.banner-preview-wrapper {
  margin-bottom: 0.75rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.banner-img-preview {
  display: block;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.code-block {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  background: rgba(10, 15, 30, 0.8) !important;
  color: #8ec5ff !important;
  border: 1px solid rgba(78, 142, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  resize: none;
}
.code-block:focus {
  border-color: var(--pal-primary, #4e8eff);
  box-shadow: 0 0 0 0.15rem rgba(78, 142, 255, 0.15);
}

/* Vote button banner */
.vote-btn-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #4e8eff, #3b6fd4);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 30px;
  font-family: sans-serif;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(78, 142, 255, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.vote-btn-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(78, 142, 255, 0.5);
  color: #fff !important;
}
.vote-btn-icon {
  font-size: 18px;
}

/* Online players section */
.online-players-section {
  margin-top: 1.5rem;
}
.players-table {
  background: rgba(30, 30, 46, 0.4);
  border-radius: 8px;
  overflow: hidden;
}
.players-table thead th {
  background: rgba(78, 142, 255, 0.15);
  color: var(--pal-primary, #4e8eff);
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.players-table tbody tr {
  border-bottom: 1px solid rgba(128, 128, 128, 0.1);
  transition: background 0.15s;
}
.players-table tbody tr:hover {
  background: rgba(78, 142, 255, 0.08);
}
.players-table td {
  vertical-align: middle;
  padding: 0.6rem 0.5rem;
  font-size: 0.9rem;
}
.player-name {
  font-weight: 500;
}
.player-name i {
  color: var(--pal-primary, #4e8eff);
  margin-right: 4px;
}

/* Platform badges */
.platform-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.platform-steam { background: #1b2838; color: #66c0f4; }
.platform-ps5 { background: #003791; color: #fff; }
.platform-xbox { background: #107c10; color: #fff; }
.platform-pc { background: #4a4a4a; color: #fff; }

/* Ping badges */
.ping-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.ping-good { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.ping-ok { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.ping-bad { background: rgba(248, 113, 113, 0.2); color: #f87171; }

/* ============================================
   GLOBAL RESPONSIVE IMPROVEMENTS
   ============================================ */

/* Page headings */
.palworld-heading {
  font-size: clamp(1.3rem, 3.5vw, 2rem);
}

/* Navbar responsive */
.navbar-palworld .navbar-brand {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
}
.navbar-palworld .nav-link {
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  padding: 0.4rem 0.7rem !important;
}
.navbar-palworld .btn-sm {
  font-size: 0.8rem;
}

@media (max-width: 991px) {
  .navbar-palworld .navbar-collapse {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .navbar-palworld .navbar-nav {
    gap: 0.2rem;
  }
  .navbar-palworld .nav-link::after {
    display: none;
  }
}

/* Footer responsive */
.footer-palworld .row > div {
  margin-bottom: 1.5rem;
}
.footer-palworld .lang-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.footer-palworld .lang-switcher .btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}
.footer-heading {
  font-size: clamp(0.8rem, 2vw, 0.88rem);
}

@media (max-width: 768px) {
  .footer-palworld {
    padding: 1.5rem 0;
  }
  .footer-palworld .row > div {
    margin-bottom: 1rem;
  }
}

/* Cards */
.card {
  border-radius: clamp(12px, 2vw, 18px);
}
.card-body {
  padding: clamp(0.8rem, 2.5vw, 1.5rem);
}

/* Tables responsive */
.table {
  font-size: clamp(0.75rem, 2vw, 0.9rem);
}
.table th {
  font-size: clamp(0.7rem, 1.8vw, 0.85rem);
  white-space: nowrap;
}
.table td {
  white-space: nowrap;
}
@media (max-width: 768px) {
  .table {
    font-size: 0.8rem;
  }
  .table td, .table th {
    padding: 0.4rem 0.3rem;
  }
}

/* Forms */
.form-label {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}
.form-select, .form-control {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  padding: 0.5rem 0.75rem;
}

/* Buttons */
.btn {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}
.btn-lg {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}

/* Stat cards */
.stat-card h3 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}
.stat-icon {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

/* Nav tabs */
.nav-tabs .nav-link {
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  padding: 0.4rem 0.8rem;
}
@media (max-width: 768px) {
  .nav-tabs {
    flex-wrap: wrap;
    gap: 0.2rem;
  }
  .nav-tabs .nav-link {
    padding: 0.3rem 0.6rem;
  }
}

/* API docs code blocks */
pre {
  font-size: clamp(0.7rem, 1.8vw, 0.85rem);
  overflow-x: auto;
}
pre code {
  white-space: pre-wrap;
  word-break: break-all;
}

/* Dashboard table */
@media (max-width: 768px) {
  .api-key-display {
    font-size: 0.6rem;
  }
}

/* Admin settings tabs */
@media (max-width: 768px) {
  .admin-settings .nav-tabs {
    border-bottom: none;
  }
  .admin-settings .nav-tabs .nav-link {
    border: 1px solid rgba(96, 165, 250, 0.1);
    border-radius: 8px !important;
    margin-bottom: 0.3rem;
  }
}

/* Banner page */
.banner-preview-wrapper {
  overflow-x: auto;
}
@media (max-width: 768px) {
  .banner-preview-wrapper {
    justify-content: flex-start;
  }
}

/* Auth pages */
.auth-card {
  border-radius: clamp(14px, 3vw, 24px);
}
.auth-card .card-body {
  padding: clamp(1rem, 3vw, 2rem);
}

/* Discord banner responsive */
.discord-banner-inner {
  flex-wrap: wrap;
  gap: 1rem;
}
.discord-banner-content {
  flex-wrap: wrap;
}

/* Server detail responsive */
@media (max-width: 768px) {
  .server-detail-hero-overlay {
    position: static;
    background: rgba(0, 0, 0, 0.7);
  }
}

/* Code blocks in API docs */
.api-docs pre, .card pre {
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(96, 165, 250, 0.1);
  border-radius: 10px;
  padding: clamp(0.6rem, 2vw, 1rem);
}

/* Alert responsive */
.alert {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  border-radius: 10px;
}

/* Modal responsive */
.modal-body {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
}

/* Dashboard table */
.server-name-cell {
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .server-name-cell {
    max-width: 120px;
  }
}

/* Ticket pages */
.ticket-messages .card {
  border-radius: 12px;
}
.ticket-msg-content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}
.ticket-messages .border-primary {
  border-color: rgba(59, 130, 246, 0.4) !important;
  background: rgba(59, 130, 246, 0.05);
}

/* Contact modal */
#contactModal .modal-content {
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgba(96, 165, 250, 0.15);
  border-radius: 20px;
}
#contactModal .modal-header {
  padding: 1rem 1.5rem 0;
}
#contactModal .modal-body {
  padding: 1rem 1.5rem 1.5rem;
}
[data-theme="light"] #contactModal .modal-content {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(96, 165, 250, 0.2);
}
