@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #0f0f14;
  --bg-secondary: #16161e;
  --bg-card: #1a1a26;
  --bg-card-hover: #22223a;
  --text-primary: #e4e4ef;
  --text-secondary: #9393a8;
  --text-muted: #6b6b80;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --accent-2: #57f287;
  --accent-warn: #fee75c;
  --accent-danger: #ed4245;
  --border: rgba(255,255,255,0.05);
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 8px 30px rgba(0,0,0,.4);
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; flex: 1; }

/* ── Navbar ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(22, 22, 30, 0.75);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

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

.lang-switcher {
  display: flex;
  gap: 0.3rem;
  margin-left: 0.5rem;
}

.lang-btn {
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all .15s;
}

.lang-btn:hover { color: var(--text-primary); text-decoration: none; }
.lang-btn.active { color: var(--accent); background: rgba(88, 101, 242, 0.15); }

.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
  line-height: 1.4;
}

.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 0.8rem 2rem; font-size: 1.05rem; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }

.btn-accent { background: var(--accent-2); color: #1a1a26; }
.btn-accent:hover { opacity: .9; text-decoration: none; }

.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); text-decoration: none; }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); text-decoration: none; }

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

/* ── Inputs ── */
.input {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: border .15s;
}

.input:focus { border-color: var(--accent); }

.input-lg { padding: 0.8rem 1.2rem; font-size: 1rem; }

textarea.input { resize: vertical; }

select.input { cursor: pointer; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }
.hero p { color: var(--text-secondary); font-size: 1.1rem; }

/* ── Search ── */
.search-bar { max-width: 700px; margin: 0 auto 2.5rem; }

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form .input { flex: 1; }

/* ── Server grid ── */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
}

.server-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, rgba(34, 34, 58, 0.6), rgba(26, 26, 38, 0.8));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.server-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: skewX(-20deg);
  transition: all 0.7s ease;
  pointer-events: none;
}

.server-card:hover::before {
  left: 200%;
}

.server-card:hover {
  border-color: rgba(88, 101, 242, 0.5);
  background: linear-gradient(145deg, rgba(38, 38, 65, 0.8), rgba(28, 28, 42, 0.9));
  text-decoration: none;
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(88, 101, 242, 0.2), 0 0 15px rgba(88, 101, 242, 0.1) inset;
}

.server-card-header { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.8rem; }

.server-icon, .server-icon-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.server-icon-lg { width: 80px; height: 80px; }

.server-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
}

.server-card-info { min-width: 0; }

.server-name {
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-members {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.server-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  flex: 1;
}

.server-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.server-bump-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Tags ── */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-list-lg { margin-bottom: 1.5rem; }

.tag {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(88, 101, 242, 0.05));
  color: var(--accent);
  border: 1px solid rgba(88, 101, 242, 0.2);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.tag:hover {
  background: rgba(88, 101, 242, 0.3);
  transform: translateY(-1px);
}

.tag-lg { font-size: 0.9rem; padding: 0.3rem 0.8rem; }

/* ── Server detail ── */
.server-detail { max-width: 700px; margin: 0 auto; }

.server-detail-header {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.server-members-lg {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.server-description {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.server-actions {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.server-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.server-meta p { margin-bottom: 0.3rem; }

/* ── Alerts ── */
.alert {
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert-success { background: rgba(87, 242, 135, 0.12); color: var(--accent-2); border: 1px solid rgba(87, 242, 135, 0.3); }
.alert-warning { background: rgba(254, 231, 92, 0.12); color: var(--accent-warn); border: 1px solid rgba(254, 231, 92, 0.3); }
.alert-error { background: rgba(237, 66, 69, 0.12); color: var(--accent-danger); border: 1px solid rgba(237, 66, 69, 0.3); }

/* ── Forms ── */
.form-page { max-width: 600px; margin: 0 auto; }

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

.tag-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all .15s;
}

.tag-checkbox:has(input:checked) {
  border-color: var(--accent);
  background: rgba(88, 101, 242, 0.15);
}

.tag-checkbox input { display: none; }

.inline-form { display: flex; gap: 0.5rem; align-items: flex-start; }

/* ── Profile ── */
.profile-header {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.avatar-lg {
  width: 96px;
  height: 96px;
  border-radius: 50%;
}

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
}

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

.profile-servers { margin-top: 2.5rem; }
.profile-servers h2 { margin-bottom: 1rem; }

.server-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.server-badge.listed { background: rgba(87, 242, 135, 0.15); color: var(--accent-2); }
.server-badge.unlisted-badge { background: rgba(254, 231, 92, 0.15); color: var(--accent-warn); }

.server-card.unlisted {
  opacity: 0.7;
}

.server-card.unlisted:hover { opacity: 1; }

/* ── Admin ── */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.table th, .table td {
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

.table th { color: var(--text-secondary); font-size: 0.85rem; text-transform: uppercase; }
.table code { color: var(--accent); }

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.page-info { color: var(--text-muted); font-size: 0.9rem; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-secondary);
}

.empty-state h2 { margin-bottom: 0.5rem; color: var(--text-primary); }
.empty-state p { margin-bottom: 1.5rem; }

/* ── Message page ── */
.message-page {
  text-align: center;
  padding: 4rem 1rem;
}

.message-page h1 { margin-bottom: 0.5rem; }
.message-page p { margin-bottom: 1.5rem; color: var(--text-secondary); }

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ── Legal pages ── */
.legal-page { max-width: 750px; margin: 0 auto; }

.legal-page h1 { margin-bottom: 1.5rem; }

.legal-content h2 {
  font-size: 1.15rem;
  margin-top: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.legal-content p, .legal-content li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-content ul {
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content li { margin-bottom: 0.3rem; }

.legal-updated {
  margin-top: 2rem;
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .search-form { flex-direction: column; }
  .server-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.6rem; }
  .navbar { padding: 0.8rem 1rem; }
  .container { padding: 1.2rem 1rem; }
  .hero-title { font-size: 2rem; }
}

/* ── Disboard Style Hero ── */
.full-width-hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
}

.hero-content {
  width: 100%;
  max-width: 900px;
  padding: 2rem;
  text-align: center;
  position: relative;
  z-index: 2;
  margin-top: 2rem;
}

.hero-title {
  color: #fff;
  font-size: 3rem;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 2px 5px rgba(0,0,0,0.3);
  margin-bottom: 2rem;
  font-family: 'Arial Black', Impact, sans-serif;
  letter-spacing: 1px;
}

.hero-search-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.hero-search-form {
  display: flex;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 40px;
  padding: 0.5rem 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.hero-search-form:focus-within {
  border-color: #00d2b4;
  box-shadow: 0 8px 32px rgba(0, 210, 180, 0.3);
  transform: translateY(-2px);
  background: #ffffff;
}

.hero-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.8rem 1.2rem;
  font-size: 1.15rem;
  color: #222;
  outline: none;
  font-weight: 600;
}

.hero-search-btn {
  background: transparent;
  border: none;
  color: #333;
  cursor: pointer;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-search-btn:hover {
  color: var(--accent);
}

.hero-bottom-actions {
  position: absolute;
  bottom: 20px;
  right: max(20px, calc((100vw - 1200px) / 2 + 20px));
}

.btn-dashboard {
  background: linear-gradient(135deg, #00ebd4, #00d2b4);
  color: #111;
  font-weight: 900;
  text-transform: uppercase;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 210, 180, 0.4), inset 0 -2px 0 rgba(0,0,0,0.1);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-block;
  letter-spacing: 1px;
}

.btn-dashboard:hover {
  background: linear-gradient(135deg, #00fced, #00e0c2);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 210, 180, 0.6), inset 0 -2px 0 rgba(0,0,0,0.1);
  text-decoration: none;
  color: #111;
}

/* ── Disboard Tags ── */
.home-tags-section {
  background: var(--bg-primary);
  width: 100%;
}

.disboard-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1.2rem;
}

.disboard-tag {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
}

.disboard-tag:hover, .disboard-tag.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.disboard-tag-name {
  text-transform: uppercase;
}
