/* DiscordHub — Main Stylesheet
   Design: Deep space navy + electric indigo + crisp white
   Typography: Space Grotesk (display) + Inter (body)
   Signature: Glowing tag pills + floating card hover lift
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg: #0d0f1a;
  --bg2: #13162a;
  --bg3: #1a1e35;
  --border: #252940;
  --border-bright: #363b5e;
  --text: #e8eaf0;
  --text-muted: #7b82a8;
  --text-faint: #454b6e;
  --accent: #5865f2;        /* Discord blue */
  --accent-glow: rgba(88,101,242,0.25);
  --indigo: #7c3aed;
  --indigo-glow: rgba(124,58,237,0.2);
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #f59e0b;
  --gold: #eab308;
  --card-bg: #14172b;
  --card-hover: #191d33;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-accent: 0 0 24px rgba(88,101,242,0.15);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  font-size: 15px;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

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

code, .mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: #a5b4fc;
}

pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
}

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }
.container-xs { max-width: 560px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,15,26,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-logo .logo-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--accent), var(--indigo));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}
.navbar-link {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
}
.navbar-link:hover, .navbar-link.active { background: var(--bg3); color: var(--text); text-decoration: none; }
.navbar-right { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.nav-credits {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
}
.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--border);
  object-fit: cover;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #4752c4; transform: translateY(-1px); box-shadow: var(--shadow-accent); color: #fff; text-decoration: none; }
.btn-indigo { background: var(--indigo); color: #fff; }
.btn-indigo:hover { background: #6d28d9; transform: translateY(-1px); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border-bright); }
.btn-outline:hover { background: var(--bg3); border-color: var(--accent); color: var(--text); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.82rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #16a34a; color: #fff; text-decoration: none; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #dc2626; color: #fff; text-decoration: none; }

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  transition: all 0.2s;
}
.card:hover { border-color: var(--border-bright); background: var(--card-hover); }
.card-elevated { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ── Server Card ── */
.server-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
}
.server-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow), 0 0 0 1px var(--accent);
  text-decoration: none;
  color: var(--text);
}
.server-card-banner {
  height: 72px;
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.server-card-body { padding: 1rem 1.1rem 1.2rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.server-card-header { display: flex; align-items: flex-start; gap: 0.75rem; }
.server-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg3);
  border: 3px solid var(--bg);
  flex-shrink: 0;
  object-fit: cover;
  margin-top: -32px;
  position: relative;
}
.server-icon-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--indigo));
  border: 3px solid var(--bg);
  flex-shrink: 0;
  margin-top: -32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  position: relative;
}
.server-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem; line-height: 1.2; }
.server-desc { font-size: 0.84rem; color: var(--text-muted); line-height: 1.5; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.server-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; }
.server-meta { display: flex; align-items: center; gap: 0.85rem; font-size: 0.8rem; color: var(--text-muted); }
.server-meta span { display: flex; align-items: center; gap: 0.3rem; }
.online-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; display: inline-block; }

/* ── Tags & Badges ── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
  text-decoration: none;
}
.tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); text-decoration: none; }
.tag-accent { background: var(--accent-glow); border-color: var(--accent); color: #a5b4fc; }
.tag-indigo { background: var(--indigo-glow); border-color: var(--indigo); color: #c4b5fd; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-verified { background: rgba(34,197,94,0.15); color: var(--green); border: 1px solid rgba(34,197,94,0.3); }
.badge-featured { background: rgba(234,179,8,0.15); color: var(--gold); border: 1px solid rgba(234,179,8,0.3); }
.badge-nsfw { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.badge-new { background: var(--accent-glow); color: #a5b4fc; border: 1px solid var(--accent); }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 0.45rem; }
.form-label { font-size: 0.88rem; font-weight: 600; color: var(--text-muted); }
.form-control {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.65rem 0.95rem;
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s;
  width: 100%;
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-control::placeholder { color: var(--text-faint); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237b82a8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; padding-right: 2.5rem; }
.form-hint { font-size: 0.8rem; color: var(--text-faint); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Alerts ── */
.alert { padding: 0.85rem 1.1rem; border-radius: var(--radius); font-size: 0.9rem; display: flex; align-items: flex-start; gap: 0.65rem; }
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-info { background: var(--accent-glow); border: 1px solid var(--accent); color: #a5b4fc; }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }

/* ── Flash messages ── */
.flash { position: fixed; top: 70px; right: 1.5rem; z-index: 999; display: flex; flex-direction: column; gap: 0.5rem; max-width: 360px; }
.flash-item { padding: 0.85rem 1.1rem; border-radius: var(--radius); font-size: 0.9rem; animation: slideIn 0.25s ease; }
.flash-success { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.4); color: #86efac; }
.flash-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ── Page sections ── */
.page-hero { padding: 4rem 0 3rem; }
.section { padding: 3rem 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; }
.section-title { font-size: 1.35rem; }
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }

/* ── Grids ── */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* ── Tool card ── */
.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text);
}
.tool-card:hover { border-color: var(--indigo); background: var(--card-hover); transform: translateY(-2px); text-decoration: none; color: var(--text); }
.tool-icon { font-size: 2rem; line-height: 1; }
.tool-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem; }
.tool-desc { font-size: 0.84rem; color: var(--text-muted); line-height: 1.5; }
.tool-badge { margin-top: auto; }

/* ── Stats ── */
.stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem; text-align: center; }
.stat-number { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ── Category pills ── */
.category-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
}
.category-pill:hover, .category-pill.active { background: var(--accent-glow); border-color: var(--accent); color: #a5b4fc; text-decoration: none; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 2rem 0; }

/* ── Rating stars ── */
.stars { color: var(--gold); letter-spacing: 0.05em; }
.star-input label { cursor: pointer; font-size: 1.5rem; color: var(--border-bright); transition: color 0.1s; }
.star-input input[type=radio]:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--gold); }
.star-input { display: flex; flex-direction: row-reverse; gap: 0.15rem; }
.star-input input[type=radio] { display: none; }

/* ── AI Result box ── */
.result-box {
  background: var(--bg2);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  white-space: pre-wrap;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text);
  position: relative;
}
.result-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

/* ── Provider toggle ── */
.provider-toggle { display: flex; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.provider-toggle input { display: none; }
.provider-toggle label { padding: 0.45rem 1rem; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all 0.15s; }
.provider-toggle input:checked + label { background: var(--accent); color: #fff; }

/* ── Table ── */
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; padding: 0.65rem 1rem; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:hover td { background: var(--bg3); }
.table tr:last-child td { border-bottom: none; }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 2rem 0; }
.page-btn { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--bg3); border: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem; font-weight: 500; text-decoration: none; transition: all 0.15s; }
.page-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-brand { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-tagline { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; max-width: 260px; }
.footer-heading { font-family: 'Space Grotesk', sans-serif; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.85rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-links a { font-size: 0.88rem; color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; color: var(--text-faint); }

/* ── Hero gradient text ── */
.gradient-text {
  background: linear-gradient(135deg, #a5b4fc 0%, var(--accent) 40%, var(--indigo) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Checkbox / toggle ── */
.check-group { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.check-group input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ── Tabs ── */
.tabs { display: flex; border-bottom: 1px solid var(--border); gap: 0; margin-bottom: 1.5rem; }
.tab { padding: 0.65rem 1.2rem; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); border-bottom: 2px solid transparent; cursor: pointer; text-decoration: none; transition: all 0.15s; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Breadcrumbs ── */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.84rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { color: var(--text-faint); }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { margin-bottom: 0.5rem; color: var(--text); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .navbar-links { display: none; }
  .server-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .server-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.78rem; }
.fw-700 { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.hidden { display: none; }
