:root {
  --bg-main: #0b0d13;
  --bg-card: #121620;
  --bg-card-hover: #181d2a;
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --primary-hover: #4f46e5;
  --success: #10b981;
  --danger: #ef4444;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}

/* NAVBAR */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(18, 22, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--primary);
}

/* CONTAINER & HERO */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
  width: 100%;
}

.hero {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #fff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 1.5rem;
  font-size: 1.05rem;
}

/* TAGS FILTER */
.tags-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}

.tag-btn {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.tag-btn:hover, .tag-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* SERVER LIST CARDS */
.server-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.server-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  padding: 1.25rem;
  gap: 1.25rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.server-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: var(--bg-card-hover);
}

.rank-badge {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-muted);
  text-align: center;
}

.rank-1 { color: #fbbf24; }
.rank-2 { color: #94a3b8; }
.rank-3 { color: #d97706; }

.server-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.server-info h3 a {
  color: #fff;
}

.server-tags {
  display: flex;
  gap: 0.4rem;
  margin: 0.4rem 0;
  flex-wrap: wrap;
}

.tag-chip {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  color: var(--text-muted);
}

.server-ip-box {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.85rem;
  border: 1px dashed var(--border);
  cursor: pointer;
  gap: 0.5rem;
  color: #c7d2fe;
}

.server-ip-box:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.server-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  min-width: 140px;
}

.vote-count {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.online-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

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

/* FORMS */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 680px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  color: #fff;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

.help-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 3rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .server-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .server-actions {
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
  }
}
