/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif; line-height: 1.5; color: var(--fg); background: var(--bg); }
:root {
  --bg:#0b0f14; --panel:#11161d; --fg:#e6edf3; --muted:#9aa4af;
  --accent:#7dd3fc; --border:#1f2937; --ring:#3b82f6; --shadow:rgba(0,0,0,.35);
}
@media (prefers-color-scheme: light) {
  :root { --bg:#f8fafc; --panel:#fff; --fg:#0f172a; --muted:#475569; --border:#e5e7eb; --shadow:rgba(0,0,0,.1); }
}
a { color: var(--accent); text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 8px; }

/* Layout */
.container { width: min(1100px, 100% - 2rem); margin-inline: auto; }
.header { position: sticky; top: 0; background: rgba(17,22,29,.8); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .85rem 0; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; letter-spacing: .2px; color: var(--fg); }
.brand img { width: 28px; height: 28px; }
nav ul { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
nav a { color: var(--fg); opacity: .9; }
nav a:hover { opacity: 1; }

/* Hero (cinematic) */
.hero { position: relative; padding: 4rem 0 2rem; overflow: clip; }
/* add layering */
.hero-bg { position: absolute; inset: 0; background-position: center; background-size: cover; transform: scale(1.03);
  filter: saturate(1.05) contrast(1.05) brightness(.9); z-index: 0; }   /* 👈 */
.hero::after { content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.45) 40%, rgba(11,15,20,1) 100%);
  pointer-events:none; z-index: 1; }                                     /* 👈 */
.hero-inner { position: relative; padding: min(14vh,8rem) 0 3rem; z-index: 2; }  /* 👈 */
.hero-title { color:#fff; text-shadow: 0 6px 22px rgba(0,0,0,.55); }            /* extra clarity */
.hero-sub   { color:#e5e7eb; }              
.hero-actions { margin-top: 1rem; display:flex; gap:.6rem; flex-wrap:wrap; }

/* Section */
.section { padding: 1.5rem 0; }
.section h2 { font-size: 1.35rem; margin: 0 0 .75rem; }

/* Server list (overview + home) */
.servers { display: grid; gap: .6rem; }
.server-row {
  --row-accent: var(--accent);
  display: grid; grid-template-columns: 2.5rem 1fr auto auto; align-items: center; gap: .75rem;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: .7rem .8rem; position: relative;
}
.server-row::before {
  content:""; position:absolute; left:0; top:0; bottom:0; width:4px; border-radius: 14px 0 0 14px; background: var(--row-accent);
  filter: drop-shadow(0 0 10px color-mix(in oklab, var(--row-accent) 40%, transparent));
}
.server-thumb { width: 2rem; height: 2rem; border-radius: 10px; background:#0a0a0a; overflow:hidden; display:grid; place-items:center; }
.server-thumb img { width:100%; height:100%; object-fit:cover; }
.server-name { font-weight: 800; color: var(--fg); }
.server-desc { color: var(--muted); font-size: .95rem; }
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .5rem; border: 1px solid var(--border); border-radius: 999px; font-size: .8rem; color: var(--muted); }
.status-dot { width: .8rem; height: .8rem; border-radius: 999px; background: #64748b; box-shadow: 0 0 0 3px color-mix(in oklab, var(--row-accent) 25%, transparent); }
.status-up { background: #22c55e; }
.status-down { background: #ef4444; }
.row-actions { display: inline-flex; gap: .5rem; }
.btn { display: inline-flex; align-items:center; gap:.4rem; border: 1px solid var(--border); padding:.5rem .8rem; border-radius: 12px; color: var(--fg); background: linear-gradient(180deg, color-mix(in oklab, var(--row-accent) 20%, transparent), transparent); }
.btn.secondary { background: none; }
.btn.small { font-size:.9rem; padding:.35rem .6rem; }
.badge .status-dot {
  display:inline-block;
  margin-right: .3rem;
  vertical-align: middle;
}


/* Content blocks */
.panel { background: color-mix(in oklab, var(--panel) 90%, transparent); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.list { margin:.25rem 0 0 1rem; }
.list li { margin:.25rem 0; }

/* Footer */
.footer { color: var(--muted); border-top: 1px solid var(--border); padding: 1.2rem 0; margin-top: 2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Per-game accents (used by data-theme on rows/pages) */
[data-theme="minecraft"] { --row-accent:#10b981; }
[data-theme="factorio"]  { --row-accent:#f59e0b; }
[data-theme="7d2d"]      { --row-accent:#ef4444; }
[data-theme="starmade"]  { --row-accent:#22d3ee; }
[data-theme="starbound"] { --row-accent:#a855f7; }
[data-theme="space-engineers"] { --row-accent:#60a5fa; }
