:root {
  color-scheme: dark;

  /* Core Colors */
  --bg-body: #050505;
  --bg-surface: #0a0a0a;
  --bg-glass: rgba(20, 20, 20, 0.6);
  --bg-glass-hover: rgba(30, 30, 30, 0.7);

  /* Accents */
  --primary: #6366f1;
  /* Indigo 500 */
  --primary-glow: rgba(99, 102, 241, 0.5);
  --secondary: #ec4899;
  /* Pink 500 */
  --secondary-glow: rgba(236, 72, 153, 0.5);
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);

  /* Text */
  --text-main: #ffffff;
  --text-muted: #e2e8f0;
  --text-dark: #000000;

  /* Borders & Effects */
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);

  /* Typography */
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Global Reset & Base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.text-muted {
  color: var(--text-muted) !important;
}

/* Background Effects */
.bg-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.08), transparent 25%);
  pointer-events: none;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navbar */
.public-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  transition: all 0.3s ease;
}

.public-navbar .navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main) !important;
}

.public-navbar .nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link.active {
  color: var(--text-main) !important;
  background: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn-primary {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
}

/* Cards & Glassmorphism */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-glass-hover);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.hero-section {
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #818cf8;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* Features Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 24px;
  border: 1px solid var(--border-glass);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 4rem 0 2rem;
  background: #020202;
  border-top: 1px solid var(--border-glass);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Server List Specifics */
.server-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
}

.server-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 40px -10px rgba(99, 102, 241, 0.3);
  background: var(--bg-glass-hover);
}

.server-card img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
}

.server-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.server-meta h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.server-meta .badge {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.server-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.server-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Server List Page Components */
.serverlist-hero {
  text-align: center;
  padding: 8rem 0 2rem;
}

.serverlist-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.serverlist-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.search-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 1rem;
  margin: 2rem auto;
  max-width: 700px;
}

.search-panel form {
  display: flex;
  gap: 1rem;
}

.search-panel input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-family: inherit;
}

.search-panel input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-panel button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.category-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-chip:hover,
.category-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.category-chip span {
  background: rgba(0, 0, 0, 0.2);
  padding: 0.1rem 0.5rem;
  border-radius: 100px;
  font-size: 0.75rem;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 4rem;
  list-style: none;
  padding: 0;
}

.pagination a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  transition: all 0.2s;
}

.pagination a:hover,
.pagination a.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .search-panel form {
    flex-direction: column;
  }

  .search-panel button {
    padding: 0.75rem;
  }
}

/* Custom Dropdown Styles (Dark Theme) */
.dropdown-menu {
  background-color: var(--bg-surface) !important;
  border: 1px solid var(--border-glass) !important;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.dropdown-item {
  color: var(--text-muted) !important;
  transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-main) !important;
}

.dropdown-divider {
  border-top: 1px solid var(--border-glass) !important;
}