/* hirrdirr.se — GitHub-ish theme (single-file site.css)
   Replace your existing /assets/site.css with this file.
*/

:root{
  --bg: #0d1117;
  --panel: #0f1723;
  --panel2: #111a27;
  --text: #c9d1d9;
  --muted: #8b949e;
  --border: rgba(255,255,255,0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --accent: #58a6ff;
  --accent2: #a371f7;
  --good: #3fb950;
  --warn: #d29922;
  --bad: #f85149;
}

body.light{
  --bg: #f6f8fa;
  --panel: #ffffff;
  --panel2: #f2f4f7;
  --text: #1f2328;
  --muted: #57606a;
  --border: rgba(31,35,40,0.14);
  --shadow: 0 10px 30px rgba(27,31,36,0.12);
  --accent: #0969da;
  --accent2: #8250df;
}

*{ box-sizing: border-box; }
html,body{ height: 100%; }
body{
  margin: 0;
  background: radial-gradient(1200px 700px at 20% -10%, rgba(88,166,255,0.16), transparent 55%),
              radial-gradient(1200px 700px at 80% -10%, rgba(163,113,247,0.12), transparent 55%),
              var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* Links */
a{ color: var(--accent); text-decoration: none; }
a:hover{ text-decoration: underline; }
code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

/* =========================
   LUCIDE ICONS (global fix)
   ========================= */

/* <i> is italic by default — can cause baseline/spacing weirdness before Lucide swaps to <svg> */
i[data-lucide]{ font-style: normal; }

/* Lucide generates: <svg class="lucide"> ... */
.lucide,
svg.lucide{
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em; /* nicer baseline in text/buttons */
  flex: 0 0 auto;          /* prevent flex containers from squishing icons */
  color: inherit;
}

/* Optional helper class when you want a consistent icon size */
.icon,
.icon > svg,
svg.icon{
  width: 18px;
  height: 18px;
}

/* Slightly bolder strokes where icons are tiny (buttons/topbar etc.) */
.iconbtn .lucide,
.btn .lucide,
.gicon .lucide{
  stroke-width: 2.25;
}


/* Extra polish for game cards (small icons need a touch more weight + consistent sizing) */
.game .gicon .lucide,
.game .gicon svg.lucide{
  width: 22px;
  height: 22px;
  display: block;
  stroke-width: 2.25;
}

/* Layout container */
main{ padding: 24px 16px 48px; }
.container{
  max-width: 1100px;
  margin: 0 auto;
}

/* --- Topbar --- */
.gh-topbar{
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(13,17,23,0.72);
  backdrop-filter: blur(10px);
}
body.light .gh-topbar{
  background: rgba(246,248,250,0.80);
}

.gh-left{ display: flex; align-items: center; gap: 12px; min-width: 0; }
.gh-brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--text);
}
.gh-brand:hover{ text-decoration: none; background: rgba(255,255,255,0.06); }
body.light .gh-brand:hover{ background: rgba(31,35,40,0.06); }

.gh-dot{
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(88,166,255,0.18);
}
body.light .gh-dot{ box-shadow: 0 0 0 4px rgba(9,105,218,0.16); }

.gh-crumbs{
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gh-crumbs .sep{ opacity: 0.6; }
.gh-crumbs .current{ color: var(--text); opacity: 0.9; }

.gh-right{ display: flex; align-items: center; gap: 10px; }
.gh-iconrow{ display: flex; align-items: center; gap: 10px; }

.iconbtn{
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
}
.iconbtn:hover{ background: rgba(255,255,255,0.08); text-decoration: none; }
body.light .iconbtn{ background: rgba(31,35,40,0.03); }
body.light .iconbtn:hover{ background: rgba(31,35,40,0.06); }

.iconbtn svg{ width: 18px; height: 18px; }

/* --- Cards / Hero --- */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
body.light .card{
  background: linear-gradient(180deg, rgba(31,35,40,0.02), rgba(31,35,40,0.01));
}

.hero{
  padding: 20px 20px 18px;
  margin-bottom: 16px;
}
.hero h1{
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.3px;
}
.hero p{
  margin: 0;
  color: var(--muted);
}

/* Buttons */
.actions{ display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-weight: 700;
}
.btn:hover{ text-decoration: none; background: rgba(255,255,255,0.08); }
body.light .btn{ background: rgba(31,35,40,0.03); }
body.light .btn:hover{ background: rgba(31,35,40,0.06); }
.btn svg{ width: 18px; height: 18px; }

/* --- Grid of cards (games/videos) --- */
.grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 460px){
  .grid{ grid-template-columns: 1fr; }
}

/* Base card style used by both <a class="game"> and <div class="game"> */
.game{
  position: relative;
  display: block;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  color: var(--text);
  overflow: hidden;
  transform: translateY(0);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.game:hover{
  text-decoration: none;
  transform: translateY(-2px);
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.16);
}
body.light .game{
  background: rgba(31,35,40,0.02);
  box-shadow: 0 8px 20px rgba(27,31,36,0.08);
}
body.light .game:hover{
  background: rgba(31,35,40,0.04);
  border-color: rgba(31,35,40,0.18);
}

.game .row{
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.gicon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.gicon svg{ width: 22px; height: 22px; }

.game h3{
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: -0.2px;
}
.game p{
  margin: 0;
  color: var(--muted);
}

/* Generic badge (top-right) */
.badge{
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(88,166,255,0.18);
  border: 1px solid rgba(88,166,255,0.35);
}
body.light .badge{
  background: rgba(9,105,218,0.12);
  border-color: rgba(9,105,218,0.26);
}

/* --- Footer --- */
.footer{
  margin-top: 22px;
  padding: 14px 10px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* =========================================================
   VIDEO CARDS (inline players) + responsive per-card + badge in card bottom-right
   ========================================================= */

.video-card{
  position: relative;
  padding-bottom: 44px; /* space for bottom-right badge */
  cursor: default;
  container-type: inline-size;
}
.video-card:hover{ transform: none; }

/* Default layout: player + meta */
.video-card .row{
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(220px, 1fr);
  gap: 14px;
  align-items: start;
}

/* Inline YouTube player */
.video-embed{
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  aspect-ratio: 16 / 9;
}
.video-embed iframe{
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

/* When the card itself becomes narrow: stack */
@container (max-width: 520px){
  .video-card .row{ grid-template-columns: 1fr; }
}

/* Link styling under meta */
.video-links{
  margin-top: 10px;
  font-size: 13px;
}
.video-links a{
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(88,166,255,0.45);
}
body.light .video-links a{
  border-bottom-color: rgba(9,105,218,0.35);
}
.video-links a:hover{ border-bottom-style: solid; }

/* Badge pinned to the whole card (bottom-right) */
.card-badge{
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  pointer-events: none;
  z-index: 3;
}
body.light .card-badge{
  background: rgba(255,255,255,0.65);
}


/* =========================
   THEME BUTTON ICON STACK (Fix #1)
   ========================= */

/* Stack sun + moon on top of each other so the hidden one doesn't affect layout */
#themeBtn .themeicon{
  position: relative;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

#themeBtn .themeicon > .lucide,
#themeBtn .themeicon > svg.lucide{
  position: absolute;
  inset: 0;
  margin: auto;
}

/* Ensure icon buttons center their contents consistently */
.iconbtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

