/* Skribbl IO — theme layout based on wordleunlimited2.io */
:root{
  --hd:#1f2a4d;          /* header */
  --hd-2:#16203d;
  --accent:#2f6fdf;      /* links, active page */
  --accent-dark:#1c4fb8;
  --play:#ff6a1a;        /* play button */
  --beige:#f4f4ef;       /* games section */
  --text:#333;
  --muted:#6b6f76;
  --line:#e3e3df;
  --radius:12px;
  --header-h:70px;
  --bar-h:52px;
  --content-w:830px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:"Catamaran",system-ui,-apple-system,"Segoe UI",sans-serif;font-size:16px;line-height:1.6;color:var(--text);background:#fff}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;display:block}
button{font-family:inherit;cursor:pointer}
.container{max-width:var(--content-w);margin:0 auto;padding:0 15px}

/* ---------- Header ---------- */
.header{position:sticky;top:0;z-index:50;background:var(--hd);height:var(--header-h);box-shadow:0 5px 6px rgba(0,0,0,.22);border-bottom:3px solid var(--accent)}
.header__inner{height:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 15px}
.logo img{height:48px;width:auto}
.header__right{display:flex;align-items:center;gap:10px}
.nav-pill{display:inline-flex;align-items:center;height:38px;padding:0 14px;border-radius:30px;background:#fff;color:#414141;font-weight:700;font-size:15px;white-space:nowrap;transition:.15s}
.nav-pill:hover,.nav-pill.active{background:var(--accent);color:#fff;text-decoration:none}
.search{position:relative}
.search input{width:190px;height:38px;border:0;border-radius:30px;padding:0 38px 0 14px;font:inherit;font-size:14px;outline:none}
.search input:focus{box-shadow:0 0 0 3px rgba(47,111,223,.45)}
.search__btn{position:absolute;right:4px;top:4px;width:30px;height:30px;border:0;background:none;color:#222}
.search__results{position:absolute;right:0;top:46px;width:300px;max-height:380px;overflow:auto;background:#fff;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.2);padding:6px;display:none;z-index:60}
.search__results.show{display:block}
.search__results a{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:8px;color:#222;font-weight:600}
.search__results a:hover{background:#f1f4fb;text-decoration:none}
.search__results img{width:40px;height:40px;border-radius:8px}
.search__results .empty{padding:10px;color:var(--muted);font-size:14px}
.icon-btn{width:38px;height:38px;border-radius:50%;border:0;background:#fff;color:#333;display:inline-flex;align-items:center;justify-content:center;position:relative}
.icon-btn:hover{background:#e9efff}
.fav-count{position:absolute;top:-4px;right:-4px;background:var(--play);color:#fff;font-size:11px;font-weight:700;min-width:18px;height:18px;border-radius:9px;display:none;align-items:center;justify-content:center;padding:0 4px}
.fav-wrap{position:relative}
.fav-panel{position:absolute;right:0;top:46px;width:300px;background:#fff;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.2);padding:10px;display:none;z-index:60}
.fav-panel.show{display:block}
.fav-panel h3{margin:0 0 6px;font-size:16px}
.fav-panel a{display:flex;align-items:center;gap:10px;padding:6px;border-radius:8px;color:#222;font-weight:600}
.fav-panel a:hover{background:#f1f4fb;text-decoration:none}
.fav-panel img{width:40px;height:40px;border-radius:8px}
.fav-panel p{margin:4px 0;color:var(--muted);font-size:14px}
.menu-toggle{display:none;background:none;border:0;color:#fff;width:40px;height:40px;padding:0}
.mobile-menu{display:none;background:var(--hd-2);padding:12px 15px 16px}
.mobile-menu.open{display:block}
.mobile-menu .search input{width:100%}
.mobile-menu .search__results{width:100%}
.mobile-menu ul{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:8px}
.mobile-menu li a{display:block;background:#fff;color:#333;font-weight:700;padding:10px 14px;border-radius:30px}

/* ---------- Game area ---------- */
.game-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;min-height:var(--bar-h)}
.game-bar__group{display:flex;gap:8px;flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 11px;border:1px solid #d6d6d2;border-radius:30px;background:#f5f5f2;color:#333;font-size:14px;font-weight:600;line-height:1}
.chip:hover{background:#ebebe6;text-decoration:none}
.chip.on{background:#ffe8ec;border-color:#ffb3c0;color:#d6336c}
.chip svg{flex:none}
.game-frame{position:relative;width:100%;height:clamp(540px,calc(100vh - var(--header-h) - 2*var(--bar-h) - 6px),900px);background:#16307e;overflow:hidden}
.game-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:block;background:#fff}
.game-cover{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;text-align:center;color:#fff;padding:20px}
.game-cover__bg{position:absolute;inset:-30px;background-size:cover;background-position:center;filter:blur(22px) brightness(.55);transform:scale(1.1)}
.game-cover>*:not(.game-cover__bg){position:relative}
.game-cover__thumb{width:150px;height:150px;border-radius:24px;box-shadow:0 10px 30px rgba(0,0,0,.4);border:4px solid #fff}
.game-cover__title{font-size:28px;font-weight:800;margin:0;text-shadow:0 2px 6px rgba(0,0,0,.4)}
.play-btn{border:0;background:var(--play);color:#fff;font-size:20px;font-weight:800;padding:12px 34px;border-radius:40px;box-shadow:0 6px 0 #c44a07,0 10px 20px rgba(0,0,0,.3);display:inline-flex;align-items:center;gap:10px;transition:transform .1s}
.play-btn:hover{transform:translateY(-2px)}
.play-btn:active{transform:translateY(3px);box-shadow:0 3px 0 #c44a07}
.game-cover__note{font-size:14px;opacity:.85;max-width:420px}
.stars{display:inline-flex;align-items:center;gap:2px;height:30px;padding:0 10px;border:1px solid #d6d6d2;border-radius:30px;background:#f5f5f2}
.stars button{border:0;background:none;padding:0 1px;color:#c9c9c4;line-height:1;font-size:19px}
.stars button.lit{color:#f5b301}
.stars span{font-size:13px;font-weight:600;margin-left:6px;color:#555}
/* theater mode */
body.theater .game-frame{height:calc(100vh - var(--header-h) - var(--bar-h) - 6px)}
body.theater .game-top{display:none}
body.theater .game-wrap{background:#111}
body.theater .game-bottom .chip,body.theater .stars{background:#2a2a2a;border-color:#444;color:#eee}
.game-wrap:fullscreen{background:#000;display:flex;flex-direction:column}
.game-wrap:fullscreen .game-frame{flex:1;height:auto}
.game-wrap:fullscreen .game-top{display:none}

/* ---------- Games section ---------- */
.games-section{background:var(--beige);padding:28px 0 34px}
.games-section+.games-section{padding-top:4px}
.sec-title{font-size:19px;font-weight:800;margin:0 0 14px;color:#222;display:flex;align-items:center;gap:6px}
.sec-title a{color:var(--accent)}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px 14px}
.card{display:block;text-align:center;color:#333;font-size:15px;font-weight:500}
.card:hover{text-decoration:none;color:var(--accent)}
.card__img{display:block;position:relative;aspect-ratio:1/1;border-radius:var(--radius);overflow:hidden;box-shadow:0 1px 3px rgba(149,151,149,1);background:#ddd;transition:transform .15s,box-shadow .15s}
.card:hover .card__img{transform:translateY(-3px);box-shadow:0 8px 16px rgba(0,0,0,.18)}
.card__img img{width:100%;height:100%;object-fit:cover}
.card__name{display:block;margin-top:6px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.badge{position:absolute;top:8px;left:8px;background:var(--play);color:#fff;font-size:11px;font-weight:800;padding:2px 8px;border-radius:20px;text-transform:uppercase}
.pager{display:flex;justify-content:center;gap:8px;margin-top:20px}
.pager button{min-width:34px;height:34px;border-radius:8px;border:1px solid #d6d6d2;background:#fff;font-weight:700;color:#444}
.pager button.active{background:var(--accent);border-color:var(--accent);color:#fff}

/* ---------- Content ---------- */
.content{padding:34px 0 40px}
.breadcrumb{font-size:14px;color:var(--muted);margin-bottom:8px}
.breadcrumb a{color:var(--muted)}
.breadcrumb span{margin:0 6px}
.content h1{font-size:32px;line-height:1.25;color:#535353;margin:0 0 14px}
.content h2{font-size:24px;color:#444;margin:28px 0 10px}
.content h3{font-size:19px;color:#444;margin:20px 0 8px}
.content p{margin:0 0 14px}
.note{color:#d9480f;font-style:italic;font-size:15px}
.cat-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:22px}
.cat-links a{background:#eef3ff;color:var(--accent-dark);font-weight:700;padding:6px 14px;border-radius:20px;font-size:14px}

/* ---------- Footer ---------- */
.footer{background:var(--hd);color:#c9d1e8;font-size:14px;padding:26px 0}
.footer .container{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.footer nav{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 18px}
.footer a{color:#fff;font-weight:600}
.footer p{margin:0}
.to-top{position:fixed;right:22px;bottom:22px;width:46px;height:46px;border-radius:50%;border:0;background:#2b2f32;color:#fff;display:none;align-items:center;justify-content:center;z-index:40;box-shadow:0 4px 10px rgba(0,0,0,.25)}
.to-top.show{display:flex}

/* ---------- Responsive ---------- */
@media (max-width:991px){
  .header__right .nav-pill,.header__right .search{display:none}
  .menu-toggle{display:inline-flex;align-items:center;justify-content:center}
  .header__inner{gap:8px}
  .logo{margin-right:auto}
}
@media (max-width:767px){
  :root{--header-h:60px}
  .logo img{height:40px}
  .grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px}
  .game-frame{height:calc(100svh - var(--header-h) - 2*var(--bar-h));min-height:480px}
  .chip .txt{display:none}
  .chip{padding:0 9px}
  .content h1{font-size:27px}
}
@media (max-width:479px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .game-cover__thumb{width:110px;height:110px}
  .game-cover__title{font-size:23px}
}
