 :root {
      --bg: #0b0c10;
      --card: #111218;
      --text: #e6e7ea;
      --muted: #aeb3bd;
      --accent: #3ba1ff;
      --accent-2: #6cf0a6;
      --ring: #2b7fff44;
      --shadow: 0 10px 30px rgba(0,0,0,.35);
    }
    :root.light {
      --bg: #f7f8fb;
      --card: #ffffff;
      --text: #1b1d23;
      --muted: #5e6673;
      --accent: #0b57d0;
      --accent-2: #06a77d;
      --ring: #0b57d022;
      --shadow: 0 8px 24px rgba(0,0,0,.08);
    }
   :root.racing {
  --bg: #06090f;
  --card: #0a0f16;
  --text: #e9f7ff;
  --muted: #9db2c3;
  --accent: #00d2ff;   /* tweak to your exact racing color if you want */
  --accent-2: #00ffa3;
  --ring: #00d2ff33;
  --shadow: 0 10px 30px rgba(0,210,255,.12);
}
:root.kokscity {
  --bg: #0a57a6;
  --card: #228b22;
  --text: #f7f7fb;
  --muted: #fff;
  --accent: #ff7a00;    /* <- tweak this to your exact KoksCity color */
  --accent-2: #ffd166;
  --ring: #ff7a0033;
  --shadow: 0 10px 30px rgba(255,122,0,.15);
}

:root.ember {
  --bg: #0e0e11;        /* charcoal sky */
  --card: #151519;      /* soot / burnt soil */
  --text: #eee9e3;      /* warm ash */
  --muted: #b8b1a9;     /* smoke */
  --accent: #ff6a00;    /* glowing ember */
  --accent-2: #ffb703;  /* sparks */
  --ring: #ff6a0033;    /* ember glow outline */
  --shadow: 0 10px 30px rgba(255, 106, 0, .12);
}

/* === Ember: Napalm background + glows (between blocks) === */
/* Layered background that only shows in the gaps */
:root.ember body {
  background:
    /* hot spots */
    radial-gradient(900px 520px at 18% 14%, rgba(255, 61, 0, calc(var(--ember-intensity) + .02)), transparent 60%),
    radial-gradient(820px 480px at 82% 28%, rgba(255,138, 0, var(--ember-intensity)), transparent 62%),
    radial-gradient(680px 420px at 42% 82%, rgba(255, 61, 0, calc(var(--ember-intensity) - .02)), transparent 60%),
    /* smoke wash */
    radial-gradient(1400px 900px at 50% 20%, var(--ember-smoke), transparent 70%),
    /* base charcoal */
    linear-gradient(180deg, #0f0f13 0%, #0c0c10 100%);
}

/* subtle ember divider before each section title */
:root.ember section h2::before {
  content:"";
  display:block;
  height:2px;
  margin:10px 0 10px;
  background: linear-gradient(90deg, transparent, rgba(255,61,0,.35), rgba(255,138,0,.25), transparent);
  filter: blur(.2px);
  border-radius: 999px;
}

/* make the cards bloom slightly with ember glow */
:root.ember .card {
  position: relative;
  box-shadow:
    var(--shadow),                            /* your existing shadow */
    0 10px 28px rgba(255, 106, 0, var(--ember-card-glow));  /* warm bloom */
  border-color: #ffffff12;
}

/* a very soft top-edge heat glow on cards */
:root.ember .card::after {
  content:"";
  position:absolute; inset:-1px -1px auto -1px; height:22px;
  pointer-events:none; border-radius:16px 16px 8px 8px;
  background:
    radial-gradient(60% 100% at 20% 0%, rgba(255,61,0,.18), transparent 70%),
    radial-gradient(60% 100% at 80% 0%, rgba(255,138,0,.15), transparent 70%);
  mix-blend-mode: screen; opacity:.7;
}

/* pressed states & focus rings adopt hotter hue */
:root.ember .theme[aria-pressed="true"],
:root.ember .btn[aria-pressed="true"],
:root.ember .search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* optional: make chevrons and badges slightly warmer */
:root.ember .badge { background: #ffffff10; border-color:#ffffff22 }
:root.ember .update-card[open] { border-color: var(--accent); }
/* add under your :root.ember block */
@keyframes ember-flicker {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.04); }
}
:root.ember body {
  animation: ember-flicker 18s ease-in-out infinite;
}

:root.sint{
  --bg:#2b0b0b;         /* deep burgundy */
  --card:#3a1111;       /* warm mahogany */
  --text:#fff4e6;       /* parchment */
  --muted:#e3c8a6;      /* caramel */
  --accent:#d41f2a;     /* mitre red */
  --accent-2:#f6c21a;   /* gold cross */
  --ring:#f6c21a33;
  --shadow:0 10px 30px rgba(214, 31, 42, .14);
}
/* subtle gold trim on cards */
:root.sint .card{border-color:#ffffff22; box-shadow: var(--shadow), 0 8px 22px rgba(246,194,26,.10);}
:root.sint .badge{background:#f6c21a22; border-color:#f6c21a44; color:#fff4e6;}

/* Snow overlay (hidden by default) */
.snow-layer{
  position: fixed; inset: 0; z-index: 9000;
  pointer-events: none;
  opacity: .5;                 /* subtle */
  mix-blend-mode: screen;      /* gentle on dark backgrounds */
  display: none;
}

/* Show snow only in Sinterklaas theme */
:root.sint .snow-layer{ display: block; }

/* If you want snow in ALL themes, delete the rule above and use: */
/* .snow-layer{ display:block; } */

.ambient-layer{
  position: fixed; inset: 0; z-index: 9000;
  pointer-events: none;
  opacity: .55;                 /* subtle overall */
  display: block;               /* we’ll decide what to draw in JS */
}

/* optional: a bit brighter on light theme only */
:root.light .ambient-layer{ opacity: .65; }
:root.light .ambient-layer { opacity: .62; } /* tweak to taste */
:root.kokscity .ambient-layer { opacity: .68; } /* e.g., from .55 */
:root.ember .ambient-layer { opacity: .50; }  /* was .55 */



/* keep your image lightbox above this (if any), else raise z-index there */

.theme-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* highlight the active button */
.theme[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 6px var(--ring);
}

/* “pressed” look for active theme buttons */
.theme[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 6px var(--ring);
}
    html, body { height: 100%; }
    body {
      margin: 0;
      font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
      background: var(--bg);
      color: var(--text);
      transition: background .2s ease, color .2s ease;
    }
    .wrap { max-width: 1050px; margin: 0 auto; padding: 28px 18px 60px; }
    header { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
    .title { display:flex; align-items: baseline; gap: 10px; }
    h1 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: .2px; }
    .updated { color: var(--muted); font-size: .95rem; }

    .controls { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 18px; align-items: center; }
    .search { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); border: 1px solid transparent; }
    .search:focus-within { border-color: var(--ring); box-shadow: 0 0 0 6px var(--ring); }
    .search input { flex: 1; background: transparent; border: 0; color: var(--text); font-size: 1rem; outline: none; }
    .search svg { width: 20px; height: 20px; opacity: .7; }

    .filter { display:flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
    .chip { border: 1px solid #ffffff1a; background: var(--card); color: var(--text); padding: 8px 12px; border-radius: 999px; font-size: .95rem; cursor: pointer; box-shadow: var(--shadow); }
    .chip[aria-pressed="true"] { border-color: var(--accent); background: linear-gradient(0deg, #ffffff08, #ffffff00); }

    .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 20px; }
    .card { display:block; text-decoration: none; color: inherit; background: var(--card); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); border: 1px solid #ffffff12; transition: transform .12s ease, border-color .12s ease; }
    .card:hover { transform: translateY(-2px); border-color: var(--accent); }
    .card h3 { margin: 0 0 6px; font-size: 1.05rem; }
    .card .url { color: var(--muted); font-size: .9rem; word-break: break-all; }
    .badge { display:inline-block; font-size: .75rem; padding: 3px 8px; border-radius: 999px; border: 1px solid #ffffff1a; background: #ffffff08; margin-bottom: 10px; }

    section { margin-top: 28px; }
    section h2 { font-size: 1.15rem; font-weight: 700; margin: 4px 0 12px; color: var(--muted); }

    .row { display:flex; gap: 14px; align-items:center; justify-content: space-between; margin-top: 24px; }
    .theme { border-radius: 12px; background: var(--card); border: 1px solid #ffffff1a; padding: 8px 12px; cursor: pointer; }
    .kicker { color: var(--muted); font-size: .95rem; }
    footer { margin-top: 40px; color: var(--muted); font-size: .9rem; text-align: center; }

    @media (max-width: 640px) {
      .controls { grid-template-columns: 1fr; }
      .filter { justify-content: flex-start; }
    }
  
    /* --- Extras: featured row, icons, status, link checker --- */
    .featured { margin-top: 24px; }
    .featured-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 4px; }
    .featured-grid .card { min-width: 260px; border-color: #ffffff22; }
    .card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
    .icon { width: 28px; height: 28px; border-radius: 8px; border: 1px solid #ffffff22; object-fit: cover; background: #ffffff08; flex: 0 0 28px; }
    .icon-fallback { width: 28px; height: 28px; border-radius: 8px; border: 1px solid #ffffff22; background: #ffffff10; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
    .meta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
    .status-dot { width: 10px; height: 10px; border-radius: 999px; border: 1px solid #00000055; display: inline-block; }
    .status-online { background: #1db954; }
    .status-slow { background: #f0ad4e; }
    .status-down { background: #dc3545; }
    .status-unknown { background: #6c757d; }
    .latency { color: var(--muted); font-size: .85rem; }

    .tools { display:flex; gap: 10px; flex-wrap: wrap; }
    .btn { border: 1px solid #ffffff1a; background: var(--card); color: var(--text); padding: 8px 12px; border-radius: 10px; cursor: pointer; box-shadow: var(--shadow); font-size: .95rem; }
    .btn:disabled { opacity: .6; cursor: not-allowed; }

    .check-output { margin-top: 10px; background: var(--card); border: 1px solid #ffffff1a; border-radius: 12px; padding: 10px; max-height: 280px; overflow: auto; }
    .check-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
    .check-table th, .check-table td { padding: 6px 8px; border-bottom: 1px solid #ffffff12; text-align: left; }
    .check-table tr:last-child td { border-bottom: 0; }

    details.seo { margin-top: 20px; background: var(--card); border: 1px solid #ffffff1a; border-radius: 12px; padding: 12px 14px; }
    details.seo summary { cursor: pointer; font-weight: 700; }
    .codebox { width: 100%; min-height: 140px; border-radius: 8px; border: 1px solid #ffffff22; background: #0f1117; color: #c9d1d9; padding: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
    .seo-actions { display:flex; gap: 8px; margin: 6px 0 12px; }
    .note { color: var(--muted); font-size: .9rem; }

    /* Collapsible update cards */
.update-card { padding: 0; }                 /* override .card padding */
.update-card summary {
  display: flex; align-items: center; gap: 10px;
  list-style: none; cursor: pointer; padding: 16px;
}
.update-card summary::-webkit-details-marker { display: none; }
.update-card summary:focus { outline: none; }
.update-card[open] { border-color: var(--accent); }

.update-card .summary-title { font-size: 1.05rem; margin: 0; }
.update-card .summary-meta { margin-left: auto; color: var(--muted); font-size: .9rem; }

/* tiny chevron */
.update-card summary::after {
  content: ""; width: 8px; height: 8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); margin-left: 8px; transition: transform .15s ease;
  opacity: .7;
}
.update-card[open] summary::after { transform: rotate(45deg); }

.update-card .update-body {
  padding: 0 16px 16px;
  border-top: 1px solid #ffffff12; margin-top: 6px; color: var(--muted);
}

#updatesLatestGrid,
#updatesAllGrid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: visible;        /* no sideways scroll */
  grid-auto-flow: initial;  /* neutralize inherited grid settings */
  grid-auto-columns: initial;
}

/* Undo the min-width from .featured-grid .card */
#updatesLatestGrid .card,
#updatesAllGrid .card {
  min-width: 0;
}

/* updates with media */
.update-card { padding: 0; }
.update-card .update-body { padding: 0 16px 16px; border-top: 1px solid #ffffff12; margin-top: 6px; }
.update-media { margin: 10px 0; }
.update-media img { max-width: 100%; height: auto; display: block; border-radius: 10px; }
.update-media figcaption { text-align: center; font-size: .85rem; color: var(--muted); margin-top: 6px; }


.update-media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px;margin-top:10px}
.update-media-grid a{display:block;border:1px solid #2a2c34;border-radius:10px;overflow:hidden;background:#0f1117}
.update-media-grid img{width:100%;height:100px;object-fit:cover;display:block}
.lightbox{position:fixed;inset:0;background:rgba(0,0,0,.9);display:flex;align-items:center;justify-content:center;z-index:9999}
.lightbox[hidden]{display:none}
.lightbox img{max-width:95vw;max-height:95vh;border-radius:12px;box-shadow:0 10px 40px rgba(0,0,0,.6)}
.lightbox .lb-close{position:absolute;top:14px;right:16px;font-size:28px;line-height:1;border:0;border-radius:10px;padding:6px 10px;cursor:pointer;background:#ffffff22;color:#fff}



/* Force readable button text in all themes (incl. Safari) */
.theme,
.btn {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text); /* Safari */
  background: var(--card);
  border: 1px solid #ffffff1a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1.1;
}

/* Keep pressed highlight but don't change text color */
.theme[aria-pressed="true"],
.btn[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 6px var(--ring);
}

/* Optional: clearer hover in light mode */
:root.light .theme:hover,
:root.light .btn:hover {
  border-color: var(--accent);
}

/* If an OS focus ring obscures text, use our own */
.theme:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--ring);
}

