/* ==========================================================================
   CSS dla ListaSerwerowMC - Dark Mode First, Modernistyczne UI
   ========================================================================== */

/* Zmienne (CSS Toggles / Tokens) */
:root {
  /* DARK THEME (Domyślny dla gry) */
  --bg-body: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #233045;
  --bg-header: rgba(15, 23, 42, 0.85);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-base: #3b82f6;
  --accent-hover: #2563eb;

  --border-color: #334155;

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --info: #0ea5e9;
  --info-bg: rgba(14, 165, 233, 0.1);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
  --shadow-accent: 0 0 15px rgba(59, 130, 246, 0.3);

  --radius-sm: 6px;
  --radius-base: 12px;
  --radius-lg: 16px;

  --font-base: 'Inter', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Jasny Motyw Opcjonalny */
[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-header: rgba(255, 255, 255, 0.9);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --border-color: #e2e8f0;

  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-accent: 0 0 15px rgba(59, 130, 246, 0.15);
}

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

body {
  font-family: var(--font-base);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition), color var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

img {
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

main {
  flex: 1;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: var(--text-primary);
}

/* Utilities */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--text-muted);
}

.text-sm {
  font-size: 0.875rem;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

/* Przestrzeń pod nagłówkiem (żeby fixed nie zasłaniał) */
body {
  padding-top: 70px;
}


/* ================= Header ================= */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: var(--bg-header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: background-color var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary) !important;
  letter-spacing: -0.5px;
}

.logo-icon {
  font-size: 1.8rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background-color: rgba(148, 163, 184, 0.1);
}

.nav-links a.btn-add-server {
  background-color: var(--accent-base);
  color: white;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.nav-links a.btn-add-server:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
}

.theme-toggle:hover {
  background-color: rgba(148, 163, 184, 0.1);
  color: var(--text-primary);
}

/* W przełączniku pokażemy słońce dla ciemnego, księżyc dla jasnego motywu */
[data-theme="dark"] .moon-icon {
  display: none;
}

[data-theme="light"] .sun-icon {
  display: none;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  content: '';
  display: block;
  background: var(--text-primary);
  height: 3px;
  border-radius: 2px;
  transition: var(--transition);
  position: absolute;
  width: 100%;
}

.hamburger {
  top: 10px;
}

.hamburger::before {
  top: -10px;
}

.hamburger::after {
  top: 10px;
}


/* ================= Hero / Strona główna ================= */
.hero {
  position: relative;
  min-height: 250px;
  padding-top: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="light"] .hero {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .hero h1 {
  background: linear-gradient(to right, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;

  [data-theme="dark"] & {
    color: #e2e8f0;
  }

  [data-theme="light"] & {
    color: #334155;
  }
}


/* ================= Przyciski ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  font-family: var(--font-base);
  font-size: 1rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--accent-base);
  color: white;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent-base);
  border-color: var(--accent-base);
}

.btn-outline:hover {
  background-color: var(--accent-base);
  color: white;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
  border-radius: var(--radius-base);
}

.btn-block {
  width: 100%;
}


/* ================= Ranking Server Lista ================= */
.section-header {
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.server-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.server-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-base);
  padding: 24px;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 30px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-base);
}

.server-rank {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-muted);
  width: 60px;
  text-align: center;
}

.server-card:nth-child(1) .server-rank {
  color: #f59e0b;
  /* Złoto */
}

.server-card:nth-child(2) .server-rank {
  color: #94a3b8;
  /* Srebro */
}

.server-card:nth-child(3) .server-rank {
  color: #b45309;
  /* Brąz */
}

.server-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-version {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--accent-base);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-category {
  background-color: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.server-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.server-info h3 {
  font-size: 1.5rem;
  margin: 0;
}

.server-info h3 a {
  color: var(--text-primary);
}

.server-info h3 a:hover {
  color: var(--accent-base);
}

.server-copy-ip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(148, 163, 184, 0.1);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: monospace;
  font-size: 1rem;
  cursor: pointer;
  width: fit-content;
  border: 1px solid transparent;
  transition: var(--transition);
}

.server-copy-ip:hover {
  border-color: var(--border-color);
  color: var(--text-primary);
}

.server-copy-ip.copied {
  background-color: var(--success-bg);
  color: var(--success);
  border-color: var(--success);
}

.server-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

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

.server-status.online {
  color: var(--success);
}

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

.server-status.offline {
  color: var(--error);
}

.server-status.unknown .status-dot {
  background-color: var(--text-muted);
}

.server-status.unknown {
  color: var(--text-muted);
}

.server-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 140px;
}

.votes-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-body);
  padding: 12px 20px;
  border-radius: var(--radius-base);
  border: 1px solid var(--border-color);
  width: 100%;
}

.votes-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-base);
  line-height: 1;
}

.votes-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}


/* ================= Pagination ================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 50px;
}

.page-numbers {
  display: flex;
  gap: 5px;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
}

.page-link:hover {
  background: var(--accent-base);
  color: white;
  border-color: var(--accent-base);
}

.page-link.active {
  background: var(--accent-base);
  color: white;
  border-color: var(--accent-base);
  cursor: default;
}

.page-dots {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 40px;
  padding: 0 5px;
  color: var(--text-muted);
}


/* ================= Empty State ================= */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-base);
  border: 1px dashed var(--border-color);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}


/* ================= Strona Serwera ================= */
.server-header {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-header);
}

.server-header.is-online {
  border-bottom-color: rgba(16, 185, 129, 0.3);
  box-shadow: inset 0 -20px 50px -20px rgba(16, 185, 129, 0.05);
}

.server-header.is-offline {
  border-bottom-color: rgba(239, 68, 68, 0.3);
  box-shadow: inset 0 -20px 50px -20px rgba(239, 68, 68, 0.05);
}

.server-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
}

.sh-left h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  word-break: break-word;
}

.sh-address {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: monospace;
  font-size: 1.4rem;
  color: var(--text-secondary);
  background: var(--bg-body);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  margin-bottom: 20px;
  transition: var(--transition);
}

.sh-address:hover {
  border-color: var(--accent-base);
  color: var(--text-primary);
}

.sh-address.copied {
  border-color: var(--success);
  color: var(--success);
  background-color: var(--success-bg);
}

.sh-badges {
  display: flex;
  gap: 10px;
}

.sh-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 250px;
}

.sh-status-card {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-base);
  padding: 20px;
  text-align: center;
}

.is-online .sh-status-card {
  border-color: var(--success);
}

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

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.is-online .status-indicator {
  color: var(--success);
}

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

.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.is-online .pulse-dot {
  background-color: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-online 2s infinite;
}

.is-offline .pulse-dot {
  background-color: var(--error);
}

@keyframes pulse-online {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.sh-players {
  margin-top: 10px;
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.sh-players .num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.server-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  padding: 40px 20px;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-base);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.motd-content code {
  display: block;
  background: #000;
  color: #fff;
  padding: 20px;
  border-radius: var(--radius-sm);
  font-family: 'Courier New', Courier, monospace;
  white-space: pre-wrap;
  line-height: 1.4;
  border-left: 4px solid var(--accent-base);
  text-shadow: 1px 1px 0 #000;
}

[data-theme="light"] .motd-content code {
  background: #1e293b;
}

.chart-container {
  height: 300px;
  width: 100%;
  position: relative;
}

.empty-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: var(--bg-body);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.info-list li {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-body);
}

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

.info-list .icon {
  width: 30px;
  font-size: 1.2rem;
}

.info-list .label {
  flex: 1;
  color: var(--text-secondary);
}

.info-list .val {
  font-weight: 600;
  text-align: right;
}

.info-list .highlight {
  color: var(--success);
  font-size: 1.2rem;
}

.vote-desc {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
}


/* ================= Forms ================= */
.form-card {
  max-width: 800px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  gap: 20px;
}

.half-width {
  flex: 1;
  min-width: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group label.required::after {
  content: '*';
  color: var(--error);
  margin-left: 4px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-base);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-base);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.textarea {
  resize: vertical;
  min-height: 120px;
}

.help-text {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

select.form-control {
  appearance: none;
  cursor: pointer;
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '▼';
  font-size: 0.8rem;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-secondary);
}

/* ================= Grid / Układ kafelkowy ================= */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.server-grid-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.server-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border-color: var(--primary-color);
  color: inherit;
  text-decoration: none;
}

.sgc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sgc-rank {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-color);
}

.sgc-domain {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
}

.sgc-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
  flex: 1;
}

.sgc-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.1);
}

.sgc-icon-placeholder {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.sgc-motd {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
  word-break: break-word;
}

.sgc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: auto;
}

.sgc-votes {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.sgc-players {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.status-dot.green {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.status-dot.red {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* ================= Koniec pliku CSS ================= */

.recaptcha-wrapper {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.alert {
  padding: 15px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  border-left: 4px solid;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success);
}

.alert-danger {
  background: var(--error-bg);
  color: var(--error);
  border-color: var(--error);
}

.alert-info {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info);
}

.error-list {
  margin-top: 10px;
  margin-left: 20px;
  list-style: disc;
}

/* ================= Legal Pages ================= */
.legal-card {
  max-width: 900px;
  margin: 0 auto;
}

.legal-content h2 {
  margin-top: 30px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  font-size: 1.5rem;
}

.legal-content p,
.legal-content ul {
  margin-bottom: 15px;
  color: var(--text-secondary);
}

.legal-content ul {
  margin-left: 20px;
  list-style: disc;
}

.legal-content strong {
  color: var(--text-primary);
}

/* ================= Footer ================= */
.main-footer {
  background-color: #0f172a;
  /* Zawsze ciemny */
  color: #94a3b8;
  border-top: 1px solid #1e293b;
  margin-top: 60px;
}

[data-theme="light"] .main-footer {
  background-color: var(--bg-card);
  border-top-color: var(--border-color);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  padding: 60px 20px;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-brand {
  max-width: 350px;
}

.logo-footer {
  color: #f8fafc !important;
}

[data-theme="light"] .logo-footer {
  color: var(--text-primary) !important;
}

.footer-desc {
  margin-top: 15px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-col h3 {
  color: #f8fafc;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

[data-theme="light"] .footer-col h3 {
  color: var(--text-primary);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: #94a3b8;
}

.footer-col a:hover {
  color: var(--accent-base);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
}

[data-theme="light"] .footer-bottom {
  border-top-color: var(--border-color);
}

.disclaimer {
  margin-top: 5px;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ================= API Documentation Page ================= */
.api-page {
  max-width: 900px;
  margin: 0 auto;
}

.api-page .card {
  margin-bottom: 30px;
}

.api-page h2 {
  font-size: 1.6rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.api-intro p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.api-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.api-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--bg-body);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.api-feature-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}

.api-feature strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.api-feature p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.api-section-desc {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Endpoint block */
.api-endpoint-block {
  margin-bottom: 24px;
}

.api-endpoint-header {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.3);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid #334155;
  overflow-x: auto;
}

[data-theme="light"] .api-endpoint-header {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--border-color);
}

.api-method-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.api-endpoint-url {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  color: #e2e8f0;
  background: none;
  white-space: nowrap;
}

[data-theme="light"] .api-endpoint-url {
  color: var(--text-primary);
}

.api-param-highlight {
  color: #f59e0b;
  font-style: italic;
}

/* Table */
.api-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.92rem;
}

.api-table th,
.api-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.api-table th {
  background: var(--bg-body);
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}

.api-table td code {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
}

.api-type {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-base);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Responses */
.api-responses {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.api-response-block {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid #334155;
}

[data-theme="light"] .api-response-block {
  border-color: var(--border-color);
}

.api-response-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.api-response-success {
  background: rgba(16, 185, 129, 0.08);
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.api-response-error {
  background: rgba(239, 68, 68, 0.08);
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

.api-status-code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 10px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 800;
  font-size: 0.82rem;
}

.api-response-success .api-status-code {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.api-response-error .api-status-code {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}

.api-code-block {
  margin: 0;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.35);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
}

[data-theme="light"] .api-code-block {
  background: #1e293b;
  color: #e2e8f0;
}

.api-code-block code {
  background: none;
  font-family: inherit;
  font-size: inherit;
}

.api-val-true {
  color: #10b981;
  font-weight: 600;
}

.api-val-false {
  color: #ef4444;
  font-weight: 600;
}

.api-val-string {
  color: #f59e0b;
}

.api-keyword {
  color: #c084fc;
}

.api-func {
  color: #60a5fa;
}

.api-comment {
  color: #64748b;
  font-style: italic;
}

/* Rate limits */
.api-limits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.api-limit-item {
  text-align: center;
  padding: 24px 16px;
  background: var(--bg-body);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.api-limit-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-base);
  margin-bottom: 6px;
}

/* Tabs */
.api-examples-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  border-bottom: 2px solid var(--border-color);
}

.api-tab {
  background: none;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-family: var(--font-base);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.api-tab:hover {
  color: var(--text-primary);
}

.api-tab.active {
  color: var(--accent-base);
  border-bottom-color: var(--accent-base);
}

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

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

@media (max-width: 768px) {
  .api-limits {
    grid-template-columns: 1fr;
  }

  .api-features {
    gap: 12px;
  }

  .api-endpoint-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .api-examples-tabs {
    flex-wrap: wrap;
  }
}


/* ================= Cookie Banner ================= */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-header);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  z-index: 9999;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.cookie-text h3 {
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.cookie-text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.cookie-actions {
  display: flex;
  gap: 15px;
  flex-shrink: 0;
}


/* ================= Animations ================= */
.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.bounce-in {
  animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}


/* ================= Responsive ================= */
@media (max-width: 992px) {
  .server-grid {
    grid-template-columns: 1fr;
  }

  .sh-right {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .sh-status-card {
    flex: 1;
    min-width: 200px;
  }

  .btn-vote-scroll {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-header);
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-150%);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
  }

  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 15px;
    border-radius: var(--radius-sm);
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .server-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 15px;
    padding: 20px;
  }

  .server-rank {
    display: none;
  }

  .server-badges {
    flex-direction: row;
    justify-content: center;
  }

  .server-info {
    align-items: center;
  }

  .server-actions {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }

  .votes-count {
    width: auto;
    flex: 1;
    padding: 10px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .server-header-content {
    flex-direction: column;
  }

  .sh-left h1 {
    font-size: 2rem;
  }
}