/* newsilver.pl — prosta, szybka, statyczna skórka (PL) */
:root {
  --bg: #0b0f14;
  --panel: #0f1620;
  --panel-2: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #e11d48; /* czerwony */
  --primary-2: #ef4444;
  --accent: #f87171;
  --shadow: 0 8px 24px rgba(0,0,0,.35);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  background: radial-gradient(1200px 800px at 10% -10%, rgba(225, 29, 72, .12), transparent),
              radial-gradient(1200px 800px at 90% 10%, rgba(239, 68, 68, .10), transparent),
              var(--bg);
  background-repeat: no-repeat, no-repeat, no-repeat;
  color: var(--text);
  line-height: 1.6;
  /* Layout: sticky footer */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { width: min(1100px, 100% - 32px); margin: 0 auto; }

/* Layout */
main { flex: 1 0 auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); background: rgba(11,15,20,.6); border-bottom: 1px solid rgba(255,255,255,.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.nav { display: flex; align-items: center; gap: 14px; }
.nav-link { color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 10px; opacity: .9; }
.nav-link:hover { background: rgba(255,255,255,.06); opacity: 1; }
.nav-link.active { background: rgba(225, 29, 72, .16); color: #fff; }

/* Buttons */
.button { appearance: none; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: var(--text); padding: 10px 14px; border-radius: 12px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; transition: .2s ease; }
.button:hover { transform: translateY(-1px); background: rgba(255,255,255,.08); }
.button-primary { background: linear-gradient(180deg, var(--primary), var(--primary-2)); border: none; color: white; box-shadow: 0 8px 18px rgba(225,29,72,.35); }
.button-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.button-ghost { background: transparent; border-color: rgba(255,255,255,.16); }

/* External links indicator */
a[target="_blank"]::after {
  content: '↗';
  display: inline-block;
  font-size: 1em;
  margin-left: 6px;
  line-height: 1;
  opacity: .85;
}

/* Hero */
.hero { padding: 40px 0 10px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 24px; }
.hero-inner.no-media { grid-template-columns: 1fr; }
.hero-text h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1.08; margin: 6px 0 10px; letter-spacing: .3px; }
.lead { color: var(--text); opacity: .9; font-size: 1.05rem; }
.hero-art img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: rgba(255,255,255,.03); }

.ip-card { margin: 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--panel); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); }
.ip-info { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text); opacity: .95; align-items: center; }
.ip-host strong, .ip-port strong { color: #fff; }

.status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 16px 0; }

/* Cards */
.card { background: var(--panel); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card.small { padding: 14px; }
.card h2 { margin: 0 0 10px; }
.card h3 { margin: 0 0 8px; }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.card-body { color: var(--text); opacity: .95; }

.dot { width: 10px; height: 10px; border-radius: 50%; background: #6b7280; display: inline-block; box-shadow: 0 0 0 3px rgba(255,255,255,.05) inset; }
.dot.online { background: #10b981; }
.dot.offline { background: #ef4444; }
.dot.maintenance { background: #f59e0b; }

.cta-row { display: flex; gap: 12px; margin-top: 6px; }

.features { padding: 30px 0 80px; }
.features h2 { margin: 0 0 10px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* Gallery (removed) */

/* Pages */
.page { padding: 32px 0 80px; }
.page .card { padding-top: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 24px; }
.page > .card + .card { margin-top: 24px; }
.page .card > :not(h2) { margin-left: 8px; }
.page .card > h2 { margin-left: 8px; }
.steps { margin: 0; padding-left: 18px; }
.checks { list-style: '✔  '; padding-left: 18px; }
.rules { list-style: '•  '; padding-left: 18px; }
.vote-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.vote-list a { text-decoration: none; color: var(--text); padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid rgba(255,255,255,.06); display: inline-block; }
.vote-list a:hover { background: rgba(255,255,255,.06); }

/* Footer */
.site-footer { border-top: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.02); }
.footer-inner { padding: 20px 0; color: var(--muted); font-size: .95rem; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--panel-2); border: 1px solid rgba(255,255,255,.12); color: var(--text); padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow); }

/* Utilities */
code { background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 8px; }
.muted { color: var(--muted); }

/* Links (content) */
main a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: .08em; transition: color .15s ease, text-underline-offset .15s ease, text-decoration-color .15s ease; }
main a:hover { color: #fff; text-underline-offset: 3px; text-decoration-thickness: .12em; text-decoration-color: rgba(248,113,113,.95); }
main a:focus-visible { outline: 2px solid rgba(248,113,113,.55); outline-offset: 2px; border-radius: 6px; text-decoration: none; }
main a:active { opacity: .9; }

/* Active nav based on body attribute */
body[data-page="home"] .nav [data-nav="home"],
body[data-page="join"] .nav [data-nav="join"],
body[data-page="rules"] .nav [data-nav="rules"],
body[data-page="vote"] .nav [data-nav="vote"],
body[data-page="store"] .nav [data-nav="store"] {
  background: rgba(225, 29, 72, .16); color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .status-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .header-inner { flex-direction: column; gap: 8px; }
  .nav { flex-wrap: wrap; justify-content: center; gap: 8px; }
}

/* Slideshow (hero right) */
.slideshow { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--panel-2); border: 1px solid rgba(255,255,255,.06); box-shadow: var(--shadow); }
.slides { position: relative; width: 100%; height: 100%; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(17,24,39,.65); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.slide-nav.prev { left: 10px; }
.slide-nav.next { right: 10px; }

/* Page transitions */
/* Hide content before JS marks page ready to avoid flash */
html.js-preload body { opacity: 0; }
/* Ensure transition is available during preload and with class */
html.js-preload body, body.page-transition { transition: opacity .25s ease; }
body.is-exiting { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  html.js-preload body { opacity: 1; }
  html.js-preload body, body.page-transition { transition: none !important; }
}
