/* FriendHyve Games — publieke stijl (aansluitend op het FriendHyve Nova-thema) */
:root {
  --bg: #f2f7fc;
  --bg-soft: #f7fbff;
  --topbar-1: #eaf4fe;
  --topbar-2: #dcecfb;
  --card: #ffffff;
  --border: #e1ebf5;
  --border-strong: #cfdeee;
  --navy: #0e2445;
  --text: #33465e;
  --muted: #74859a;
  --primary: #1a6fe0;
  --primary-hover: #1460c6;
  --primary-soft: #e8f2fe;
  --star: #f6ae16;
  --fire: #f25a24;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 60, 110, .06), 0 4px 14px rgba(20, 60, 110, .06);
  --shadow-hover: 0 4px 10px rgba(20, 60, 110, .10), 0 12px 28px rgba(20, 60, 110, .10);
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .5rem; }
p { margin: 0 0 1rem; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid rgba(26, 111, 224, .45); outline-offset: 2px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.center { text-align: center; margin-top: 1.5rem; }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon-sm { width: 1em; height: 1em; }
.icon-xs { width: .8em; height: .8em; vertical-align: -0.05em; }

/* Bovenbalk */
.admin-banner { background: #fff4d6; color: #6b4b00; text-align: center; padding: 6px 12px; font-size: .9rem; }
.topbar {
  background: linear-gradient(180deg, var(--topbar-1), var(--topbar-2));
  border-bottom: 1px solid #d3e5f7;
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner { display: flex; align-items: center; gap: 28px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 44px; height: 32px; }
.brand-logo { max-height: 40px; width: auto; }
.brand-text { font-size: 1.55rem; letter-spacing: -.02em; white-space: nowrap; }
.brand-text strong { font-weight: 800; color: var(--navy); }
.brand-text span { font-weight: 500; color: var(--primary); }
.mainnav { display: flex; gap: 6px; }
.mainnav-link { color: var(--navy); font-weight: 600; font-size: .95rem; padding: 22px 10px 20px; border-bottom: 3px solid transparent; }
.mainnav-link:hover { text-decoration: none; color: var(--primary); }
.mainnav-link.is-active { border-bottom-color: var(--primary); }
.topbar-search { margin-left: auto; width: 280px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--navy); padding: 8px; border-radius: 8px; cursor: pointer; }

.searchbox { display: flex; align-items: center; background: #fff; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; }
.searchbox input { flex: 1; min-width: 0; border: 0; padding: 9px 12px; background: transparent; color: var(--navy); outline: none; }
.searchbox input::placeholder { color: #94a3b5; }
.searchbox button { border: 0; background: transparent; color: var(--navy); padding: 8px 12px; cursor: pointer; display: flex; }
.searchbox:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 111, 224, .15); }

.page { padding: 28px 0 48px; }

/* Knoppen */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 10px 18px; font-weight: 700; font-size: .95rem; border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(26, 111, 224, .25); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-light { background: var(--primary-soft); color: var(--primary); }
.btn-light:hover { background: #dbeafd; }
.btn-outline { background: #fff; color: var(--primary); border-color: #b9d3f3; }
.btn-outline:hover { background: var(--primary-soft); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 36px 40px; margin-bottom: 36px;
  border-radius: 18px; border: 1px solid #cfe3f8;
  background: radial-gradient(circle at 85% 40%, #ffffff 0, rgba(255,255,255,0) 45%), linear-gradient(120deg, #e7f2fe 0%, #d6e9fc 55%, #c5e0fb 100%);
  box-shadow: var(--shadow);
}
.hero-text { max-width: 470px; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; }
.hero p { font-size: 1.08rem; color: #3c4f68; margin-bottom: 1.4rem; }
.hero-art { width: min(44%, 420px); height: auto; }

/* Secties */
.section { margin-bottom: 36px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; font-weight: 800; margin: 0; }
.section-icon { display: inline-flex; }
.section-icon .icon { width: 28px; height: 28px; }
.section-icon--star { color: var(--star); }
.section-icon--fire { color: var(--fire); }
.section-icon--clock { color: var(--primary); }
.section-icon--gamepad { color: var(--primary); }
.section-more { font-weight: 600; font-size: .95rem; display: inline-flex; align-items: center; gap: 6px; }

/* Spelkaarten: 4 per rij op desktop */
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.game-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.game-card-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.game-card-link:hover { text-decoration: none; }
.game-card-thumb { display: block; position: relative; aspect-ratio: 3 / 2; background: #e6eef7; }
.game-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge-ext { position: absolute; top: 8px; right: 8px; background: rgba(14, 36, 69, .78); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.game-card-body { display: block; padding: 12px 14px 14px; }
.game-card-title { display: block; color: var(--navy); font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card-meta { display: block; color: var(--muted); font-size: .86rem; margin-top: 2px; }
.game-grid--compact { gap: 16px; }

/* Panelen */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 28px; margin-bottom: 32px; }
.all-games-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.all-games-head p { margin: 4px 0 0; font-size: .92rem; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; }
.filters .searchbox { width: 260px; }
.select { appearance: none; border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 36px 9px 14px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230e2445' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--navy); cursor: pointer; min-width: 170px; }
.page-title { font-size: 1.8rem; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.empty-state { text-align: center; padding: 40px 16px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 28px; }

.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb .icon { color: #9fb0c3; }

/* Categorieën */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.category-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); color: var(--text); }
.category-card:hover { text-decoration: none; border-color: #b9d3f3; background: #fff; box-shadow: var(--shadow); }
.category-card strong { display: block; color: var(--navy); font-size: 1.05rem; }
.category-card .muted { display: block; font-size: .88rem; }
.category-desc { display: block; font-size: .88rem; margin-top: 4px; }
.category-icon { display: flex; width: 42px; height: 42px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); align-items: center; justify-content: center; flex: none; }

/* Gamepagina */
.game-panel { padding: 24px 28px 28px; }
.game-header { margin-bottom: 18px; }
.game-title { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-soft); color: #2a5a96; border: 1px solid #d3e5f9; border-radius: 999px; padding: 3px 12px; font-size: .84rem; font-weight: 600; }
.pill:hover { text-decoration: none; background: #dbeafd; }
.pill--ext { background: #fff7e8; color: #7a4f00; border-color: #f5e0b5; }

.player { --rw: 16; --rh: 9; width: min(100%, calc((100vh - 170px) * var(--rw) / var(--rh))); margin: 0 auto; }
.ratio-16-9 { --rw: 16; --rh: 9; }
.ratio-4-3 { --rw: 4; --rh: 3; }
.ratio-3-2 { --rw: 3; --rh: 2; }
.ratio-1-1 { --rw: 1; --rh: 1; }
.ratio-3-4 { --rw: 3; --rh: 4; }
.ratio-9-16 { --rw: 9; --rh: 16; }
.player-frame { position: relative; aspect-ratio: var(--rw) / var(--rh); border-radius: 16px; overflow: hidden; background: #0e2445; box-shadow: var(--shadow); }
.player-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; background: radial-gradient(circle at center, rgba(8, 24, 50, .25), rgba(8, 24, 50, .55)); text-align: center; }
.player-overlay--static { background: #18355f; }
.btn-play { display: inline-flex; align-items: center; gap: 14px; padding: 16px 44px; border-radius: 16px; background: linear-gradient(180deg, #2d86f3, #1665d6); color: #fff; font-size: 1.6rem; font-weight: 800; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 10px 30px rgba(0, 40, 100, .45); cursor: pointer; }
.btn-play:hover { text-decoration: none; background: linear-gradient(180deg, #3a8ff5, #1259c2); transform: translateY(-1px); }
.icon-play { width: 30px; height: 30px; }
.player-note { color: #fff; font-size: .9rem; margin: 0; text-shadow: 0 1px 3px rgba(0,0,0,.6); max-width: 520px; }
.player-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player-actions { display: flex; gap: 12px; justify-content: flex-start; margin: 16px auto 0; width: min(100%, calc((100vh - 170px) * var(--rw, 16) / var(--rh, 9))); }
.fs-close { display: none; }

/* Pseudo-volledig scherm voor browsers zonder Fullscreen API (bijv. iPhone) */
.player.is-pseudo-fs { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; background: #000; margin: 0; display: flex; align-items: center; justify-content: center; }
.player.is-pseudo-fs .player-frame { width: min(100vw, calc(100dvh * var(--rw) / var(--rh))); border-radius: 0; }
.player.is-pseudo-fs .fs-close, .player:fullscreen .fs-close { display: flex; position: absolute; top: 10px; right: 10px; z-index: 5; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 999px; padding: 8px; cursor: pointer; }
.player:fullscreen { background: #000; display: flex; align-items: center; justify-content: center; width: 100%; }
.player:fullscreen .player-frame { width: min(100vw, calc(100vh * var(--rw) / var(--rh))); border-radius: 0; }
body.no-scroll { overflow: hidden; }

.notice { background: #fff8eb; border: 1px solid #f3dfb6; color: #5d4612; border-radius: 12px; padding: 12px 16px; font-size: .92rem; margin: 18px 0 0; }
.game-about { margin-top: 28px; }
.game-about h2 { font-size: 1.4rem; font-weight: 800; }
.instructions { background: #eef5fd; border: 1px solid #d6e7f9; border-radius: 14px; padding: 18px 22px; margin-top: 18px; }
.instructions h3 { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; margin-bottom: 8px; }
.instructions-icon { color: var(--primary); display: inline-flex; }
.instructions ol { margin: 0; padding-left: 22px; }
.instructions li { margin: 3px 0; font-size: .95rem; }

.prose { max-width: 820px; margin-left: auto; margin-right: auto; }
.prose .page-title { margin-bottom: 1rem; }

/* Footer */
.footer { background: #fff; border-top: 1px solid var(--border); padding: 36px 0 18px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-brand .brand-text { font-size: 1.3rem; }
.footer-tagline { color: var(--muted); font-size: .9rem; margin-top: 8px; }
.footer-col h2 { font-size: .95rem; font-weight: 700; margin-bottom: 8px; }
.footer-col a { display: block; color: var(--muted); font-size: .9rem; padding: 2px 0; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { color: #9aa9ba; font-size: .82rem; margin-top: 24px; }

/* Eenvoudige pagina's (fout, onderhoud) */
.simple-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: linear-gradient(160deg, #eaf4fe, #f6fafe); }
.simple-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--border); padding: 36px; max-width: 480px; text-align: center; }
.simple-card img { margin: 0 auto 14px; }
.simple-code { font-size: .9rem; color: var(--muted); font-weight: 700; margin: 0; }

/* Embedweergave (voor FriendHyve.com / Sngine) */
.embed-body { margin: 0; background: #000; height: 100vh; height: 100dvh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.embed-body .player { width: min(100vw, calc(100dvh * var(--rw) / var(--rh))); }
.embed-body .player-frame { border-radius: 0; box-shadow: none; }
.embed-body .btn-play { font-size: 1.3rem; padding: 12px 32px; }
.embed-fs { position: fixed; right: 8px; bottom: 8px; z-index: 10; background: rgba(0,0,0,.55); color: #fff; border: 0; border-radius: 8px; padding: 6px 8px; cursor: pointer; display: flex; }
.embed-fs[hidden] { display: none; }

/* Responsive */
@media (max-width: 1080px) {
  .topbar-search { width: 220px; }
  .brand-text { font-size: 1.35rem; }
}
@media (max-width: 960px) {
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .topbar-inner { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .nav-toggle { display: flex; }
  .mainnav { display: none; width: 100%; flex-direction: column; order: 3; gap: 0; }
  .mainnav.is-open { display: flex; }
  .no-js .mainnav { display: flex; flex-direction: row; }
  .mainnav-link { padding: 10px 4px; border-bottom: 1px solid #d3e5f7; }
  .mainnav-link.is-active { border-bottom-color: #d3e5f7; color: var(--primary); }
  .topbar-search { order: 4; width: 100%; margin: 0 0 4px; }
  .hero { padding: 28px 24px; }
  .hero-art { width: 38%; }
}
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .game-grid, .game-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hero { flex-direction: column-reverse; align-items: flex-start; padding: 24px 20px; }
  .hero-art { width: 70%; align-self: center; }
  .panel, .game-panel { padding: 18px; border-radius: 14px; }
  .filters, .filters .searchbox, .select { width: 100%; }
  .btn-play { font-size: 1.25rem; padding: 12px 28px; }
  .icon-play { width: 22px; height: 22px; }
  .player { width: 100%; }
  .player-actions { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }
  .game-card-body { padding: 10px 12px 12px; }
  .section-title { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
