/* ---- Base + theme ---- */

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

:root {
  --bg: #020617;
  --bg-elevated: rgba(15, 23, 42, 0.95);
  --bg-elevated-softer: rgba(15, 23, 42, 0.85);
  --border-subtle: rgba(148, 163, 184, 0.25);
  --accent: #22c55e;           /* emerald green */
  --accent-soft: rgba(34, 197, 94, 0.18);
  --accent-strong: #22c55e;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-soft: #6b7280;
  --danger: #fb7185;
  --danger-soft: rgba(248, 113, 113, 0.16);
  --radius-lg: 1.25rem;
  --radius-md: 0.8rem;
  --shadow-strong: 0 18px 60px rgba(0, 0, 0, 0.85);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.8);
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, #1e293b 0, transparent 55%),
    radial-gradient(circle at bottom right, #020617 0, transparent 60%),
    var(--bg);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* soft glowing background overlay */

.background-blur {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.2), transparent 55%),
    radial-gradient(circle at bottom left, rgba(129, 140, 248, 0.2), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.7;
  filter: blur(16px);
  z-index: 0;
}

/* ---- Layout shell ---- */

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

/* ---- Top bar ---- */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 0.9rem;
  background: radial-gradient(circle at 20% 0, #4ade80, #22c55e 40%, #16a34a 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: #022c22;
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.9),
    0 10px 25px rgba(34, 197, 94, 0.45);
}

.brand-text h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

.brand-text p {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* ---- Main layout: stacked, status first ---- */

.main-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ---- Cards ---- */

.card {
  border-radius: var(--radius-lg);
  background: linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.96),
      rgba(15, 23, 42, 0.92)
    );
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-strong);
  padding: 1.5rem 1.65rem;
  backdrop-filter: blur(14px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.card-subtitle {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* pill labels */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at top, rgba(148, 163, 184, 0.2), rgba(15, 23, 42, 0.8));
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.pill-soft {
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--accent);
}

/* ---- Overall status chip (header) ---- */

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-main);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px transparent;
  transition:
    background 0.15s ease-out,
    box-shadow 0.15s ease-out,
    transform 0.15s ease-out;
}

.status-dot.online {
  background: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
  transform: scale(1.1);
}

.status-dot.offline {
  background: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}

.status-players {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Status card: focal element ---- */

.status-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.98),
      rgba(15, 23, 42, 0.95)
    );
  border: 1px solid rgba(34, 197, 94, 0.65); /* accent border */
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.9),
    0 26px 70px rgba(0, 0, 0, 0.9);
  padding: 1.7rem 1.8rem;
  margin-bottom: 0.5rem;
}

/* subtle glow halo behind the status card */
.status-card::before {
  content: "";
  position: absolute;
  inset: -40px -40px auto -40px;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.32), transparent 60%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.2), transparent 60%);
  opacity: 0.65;
  filter: blur(22px);
  z-index: -1;
  pointer-events: none;
}

/* ---- Updates card: slightly softer ---- */

.updates-card {
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.9)
  );
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
}

/* ---- Server card inner layout ---- */

.server-addresses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0.85rem 1.1rem;
}

.address-block {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.address-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  margin-bottom: 0.25rem;
}

.address-block code {
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 0.4rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
}

/* thin line */

.divider {
  height: 1px;
  margin: 1rem 0;
  background: linear-gradient(
    to right,
    transparent,
    rgba(148, 163, 184, 0.6),
    transparent
  );
}

/* key/value list */

.status-details {
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(30, 64, 175, 0.75);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.88)
  );
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  font-size: 0.9rem;
}

.status-details li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.8rem;
}

.status-details li:nth-child(odd) {
  background: rgba(15, 23, 42, 0.92);
}

.status-details span {
  color: var(--text-soft);
}

.status-details strong {
  font-weight: 600;
}

/* ---- Updates card / posts ---- */

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 350px;
  overflow: auto;
  padding: 0.4rem 0.25rem 0.4rem 0;
}

.posts-list::-webkit-scrollbar {
  width: 6px;
}

.posts-list::-webkit-scrollbar-track {
  background: transparent;
}

.posts-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 999px;
}

.post-card {
  border-radius: 0.9rem;
  padding: 0.8rem 0.9rem;
  background: var(--bg-elevated-softer);
  border: 1px solid rgba(31, 41, 55, 0.9);
  transition:
    border 0.18s ease-out,
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    background 0.18s ease-out;
}

.post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), rgba(15, 23, 42, 0.95));
}

.post-title {
  margin: 0;
  font-size: 0.98rem;
}

.post-meta {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.post-summary {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* empty state text */

.posts-list.empty {
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* ---- Sidebar + content layout ---- */

.content-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.sidebar-nav {
  flex: 0 0 220px;
}

.content-column {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* nav card */

.nav-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(
    140deg,
    rgba(15, 23, 42, 0.97),
    rgba(15, 23, 42, 0.9)
  );
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 1.1rem 1.2rem;
}

.nav-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.65rem;
  border-radius: 0.7rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition:
    background 0.16s ease-out,
    color 0.16s ease-out,
    border-color 0.16s ease-out,
    transform 0.12s ease-out;
}

.nav-link span {
  flex: 1;
}

.nav-link:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--text-main);
  transform: translateY(-1px);
}

.nav-link-active {
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), rgba(15, 23, 42, 0.96));
  border-color: rgba(34, 197, 94, 0.6);
  color: var(--text-main);
}

/* Mods page layout */

.mods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem 1.4rem;
  margin-top: 0.5rem;
}

.mods-group h3 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
}

.mods-group ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.mods-footnote {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.mods-inline-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
}

/* Responsive: stack nav above content on narrow screens */

@media (max-width: 900px) {
  .content-layout {
    flex-direction: column;
  }

  .sidebar-nav {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* ---- Footer ---- */

.site-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* ---- Responsive ---- */

@media (max-width: 800px) {
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .app-shell {
    padding-inline: 1rem;
  }

  .card {
    padding-inline: 1.2rem;
  }

  .card-header-left {
    flex-wrap: wrap;
  }
}

/* ---- Markdown content styling ---- */

.md-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.md-body h1,
.md-body h2,
.md-body h3 {
  color: var(--text-main);
  margin-top: 1.1rem;
  margin-bottom: 0.4rem;
}

.md-body h1 {
  font-size: 1.3rem;
}

.md-body h2 {
  font-size: 1.1rem;
}

.md-body h3 {
  font-size: 1rem;
}

.md-body p {
  margin: 0.4rem 0;
}

.md-body ul,
.md-body ol {
  margin: 0.35rem 0 0.35rem 1.2rem;
}

.md-body li + li {
  margin-top: 0.15rem;
}

.md-body strong {
  color: var(--text-main);
}

.md-body hr {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  margin: 0.9rem 0;
}

.md-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
  padding: 0.1rem 0.25rem;
  border-radius: 0.25rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(51, 65, 85, 0.9);
}

.post-back-link {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-soft);
  text-decoration: none;
  margin-bottom: 0.15rem;
}

.post-back-link:hover {
  color: var(--accent);
}

.post-date-pill {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 5px; /* subtle rounding like Minecraft icons */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05); /* optional subtle background */
}

.brand-mark img.brand-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
