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

:root {
  --bg: #0d0f17;
  --surface: #141826;
  --card: #1b2030;
  --text: #e9edf7;
  --muted: #a8b0c2;
  --accent: #7ff5c9;
  --accent-2: #6ac8ff;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --card: #f0f2f7;
  --text: #111320;
  --muted: #4e5568;
  --accent: #1fb389;
  --accent-2: #1476d3;
  --border: rgba(0, 0, 0, 0.07);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

html {
  overflow-y: scroll; /* reserve scrollbar space to stop horizontal jumps */
  scrollbar-gutter: stable;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.max-wrap,
main,
.navbar,
.hero,
.grid,
.discord {
  width: min(1200px, calc(100% - 32px));
  max-width: 1200px;
  margin: 0 auto;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
}

.navbar {
  width: min(1200px, calc(100% - 32px));
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand .brand-icon {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: contain;
}

.nav-actions { display: flex; align-items: center; gap: 10px; }

button, .btn {
  border: 1px solid var(--border);
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 30%, var(--card)), color-mix(in srgb, var(--accent-2) 30%, var(--card)));
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
button:hover, .btn:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
button:active, .btn:active { transform: translateY(0); }

.hero {
  max-width: 1200px;
  margin: 30px auto 12px;
  padding: 12px 16px 0px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.hero h1 { margin: 0 0 12px; font-size: clamp(2rem, 4vw + 0.4rem, 3rem); letter-spacing: -0.5px; }
.hero p { margin: 0 0 16px; color: var(--muted); line-height: 1.6; }

.badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge { padding: 8px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); color: var(--muted); }

.hero-news-panel {
  background: linear-gradient(145deg, color-mix(in srgb, var(--card) 90%, #1f2844), color-mix(in srgb, var(--card) 88%, #131c31));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  height: 260px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-news-panel h2 {
  align-self: center;
  margin: 0 0 12px;
  font-size: clamp(1.05rem, 1.2vw + 0.8rem, 1.35rem);
  text-align: center;
}

.hero-news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hero-news-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.hero-news-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  padding: 10px 12px;
}

.hero-news-item h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.35;
}

.hero-news-item time {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.hero-news-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.hero-news-empty {
  margin: 0;
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}

.grid {
  max-width: 1200px;
  margin: 12px auto 12px;
  padding: 12px 16px 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  min-height: 250px;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 180ms ease;
}
.card img { width: 100%; height: 180px; object-fit: cover; }
.card-content { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.status-pill { padding: 6px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; background: #353c4e; color: var(--text); }
.status-online { background: rgba(51, 214, 159, 0.18); color: #65f0c4; }
.status-offline { background: rgba(239, 83, 80, 0.18); color: #ff9a9a; }
.status-unknown { background: rgba(255, 214, 102, 0.18); color: #ffd666; }

.meta { color: var(--muted); font-size: 0.93rem; }

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 70px rgba(0,0,0,0.45);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.navbar a,
.btn,
button {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, color 160ms ease;
}
.navbar a:hover,
.btn:hover,
button:hover {
  transform: translateY(-2px);
}

.discord {
  max-width: 1200px;
  margin: 0 auto 46px;
  padding: 0 16px;
}
.discord-box {
  background: linear-gradient(135deg, color-mix(in srgb, var(--card) 70%, #4a5edb), color-mix(in srgb, var(--card) 80%, #31395f));
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
}
.discord h2 { margin: 0 0 10px; }
.discord p { margin: 0 0 12px; color: var(--muted); }
.discord-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.stat { background: rgba(0,0,0,0.18); padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); }

.footer { border-top: 1px solid var(--border); padding: 18px; text-align: center; color: var(--muted); font-size: 0.95rem; }
.footer a { color: var(--accent-2); font-weight: 600; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-news-panel { height: 260px; }
  .discord-box { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .navbar { padding: 12px; }
  .hero { padding-inline: 12px; gap: 18px; }
  .card img { height: 160px; }
  .discord { padding-inline: 12px; }
  .discord-box { padding: 16px; }
}
