
:root{--bg:#07111f;--panel:#0f1d30;--panel2:#14243a;--text:#f8fafc;--muted:#9fb0c5;--brand:#22c55e;--brand2:#16a34a;--border:rgba(255,255,255,.08)}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:Inter,Arial,sans-serif;background:radial-gradient(circle at top,#13243a 0,#07111f 42%,#050b14 100%);color:var(--text);min-height:100vh}
a{color:inherit;text-decoration:none}
.app{width:100%;max-width:1180px;margin:auto;min-height:100vh}
.header{position:sticky;top:0;z-index:100;background:rgba(7,17,31,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--border)}
.header-inner{max-width:1180px;margin:auto;padding:12px 16px;display:flex;align-items:center;gap:16px}
.logo{height:42px;width:auto;display:block}
.brand{font-weight:800;font-size:19px;letter-spacing:-.3px}
.brand small{display:block;font-size:10px;color:var(--muted);font-weight:500;letter-spacing:.6px}
.nav{margin-left:auto;display:flex;gap:8px;overflow:auto;scrollbar-width:none}
.nav::-webkit-scrollbar{display:none}
.nav a{padding:9px 12px;border:1px solid var(--border);border-radius:999px;color:#dbe7f4;white-space:nowrap;font-size:13px}
.nav a:hover,.nav a.active{background:var(--brand);border-color:var(--brand);color:#04100a}
.main{padding:18px 16px 44px}
.hero{padding:20px 0 8px}
.hero h1{font-size:clamp(27px,5vw,42px);line-height:1.05;margin-bottom:8px}
.hero p{color:var(--muted);max-width:720px;line-height:1.55}
.chips{display:flex;gap:8px;overflow:auto;padding:12px 0 18px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{border:1px solid var(--border);background:var(--panel);color:#dbe7f4;border-radius:999px;padding:9px 13px;font-size:13px;white-space:nowrap;cursor:pointer}
.chip.active,.chip:hover{background:var(--brand);color:#04100a;border-color:var(--brand)}
.ad-wrap{margin:10px 0 18px;min-height:90px;background:rgba(255,255,255,.025);border:1px solid var(--border);border-radius:14px;padding:8px;display:flex;justify-content:center;align-items:center;overflow:hidden}
.ad-label{display:block;text-align:center;color:#64748b;font-size:9px;letter-spacing:1px;margin-bottom:4px}
.games{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.card{background:linear-gradient(180deg,var(--panel2),var(--panel));border:1px solid var(--border);border-radius:18px;overflow:hidden;box-shadow:0 12px 30px rgba(0,0,0,.18);transition:transform .18s ease,border-color .18s ease}
.card:hover{transform:translateY(-3px);border-color:rgba(34,197,94,.45)}
.poster{width:100%;aspect-ratio:16/10;object-fit:cover;background:#0b1523;display:block}
.card-body{padding:12px}
.card h2{font-size:16px;line-height:1.25;margin-bottom:6px}
.meta{font-size:12px;color:var(--muted);margin-bottom:10px}
.play{display:block;text-align:center;width:100%;padding:11px;border-radius:11px;background:var(--brand);color:#04100a;font-weight:800;font-size:13px}
.play:hover{background:#34d399}
.section-title{font-size:22px;margin:30px 0 12px}
.info{color:#c5d2e0;line-height:1.7;background:rgba(15,29,48,.75);border:1px solid var(--border);border-radius:16px;padding:18px}
.footer{border-top:1px solid var(--border);padding:22px 16px;color:var(--muted);font-size:13px;display:flex;gap:14px;justify-content:space-between;flex-wrap:wrap}
.empty{padding:30px;text-align:center;color:var(--muted)}
.play-page .main{max-width:1000px;margin:auto}
.game-head{display:flex;gap:18px;align-items:center;margin:8px 0 18px}
.game-head img{width:150px;height:94px;object-fit:cover;border-radius:14px;border:1px solid var(--border)}
.game-head h1{font-size:clamp(23px,4vw,34px);margin-bottom:5px}
.game-head p{color:var(--muted)}
.game-frame-wrap{position:relative;background:#000;border-radius:16px;overflow:hidden;border:1px solid var(--border);box-shadow:0 20px 50px rgba(0,0,0,.3)}
.game-toolbar{position:absolute;top:14px;right:14px;z-index:20;display:flex;justify-content:flex-end;pointer-events:none}
.fullscreen-btn{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:142px;border:1px solid rgba(255,255,255,.28);background:rgba(7,27,53,.94);color:#fff;border-radius:12px;padding:12px 16px;font-weight:900;font-size:13px;letter-spacing:.2px;cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.45);backdrop-filter:blur(8px);transition:transform .15s ease,background .15s ease,box-shadow .15s ease}
.fullscreen-btn:hover{background:#1d4b72;transform:translateY(-1px);box-shadow:0 10px 28px rgba(0,0,0,.5)}
.fullscreen-btn:active{transform:scale(.97)}
.fullscreen-btn.is-active{background:#b42318}
.fs-icon{font-size:19px;line-height:1}
.game-frame-wrap:fullscreen,.game-frame-wrap:-webkit-full-screen{width:100vw;height:100vh;max-width:none;border:0;border-radius:0;background:#000}
.game-frame-wrap:fullscreen .game-frame,.game-frame-wrap:-webkit-full-screen .game-frame{width:100vw;height:100vh;min-height:100vh}
.game-frame{width:100%;height:min(72vh,680px);min-height:500px;border:0;display:block;background:#000}
.back{display:inline-block;margin:12px 0;color:#b7c8da;font-size:13px}
@media(max-width:900px){.games{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){
 .header-inner{padding:10px 12px}.brand{font-size:17px}.nav{display:none}
 .main{padding:14px 12px 36px}.hero{padding-top:12px}
 .games{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
 .card{border-radius:14px}.card-body{padding:10px}.card h2{font-size:14px}.poster{aspect-ratio:1.35/1}.play{padding:10px;font-size:12px}
 .game-head{align-items:flex-start}.game-head img{width:105px;height:70px}.game-frame{height:70vh;min-height:430px}.game-toolbar{top:10px;right:10px}.fullscreen-btn{min-width:128px;padding:11px 13px;font-size:12px}.fs-icon{font-size:18px}
 .footer{font-size:12px}
}
@media(max-width:380px){.games{gap:8px}.card h2{font-size:13px}}

/* Larger, clearly separated ad areas */
.ad-wrap{width:100%;margin:18px 0;padding:8px 0;box-sizing:border-box;text-align:center;overflow:hidden}
.ad-wrap .adsbygoogle{width:100%;max-width:100%}
.ad-large{min-height:280px}
.ad-medium{min-height:180px}
.ad-label{display:block;font-size:10px;letter-spacing:.08em;opacity:.55;margin-bottom:5px}
.home-top-ad{margin-top:12px}
.hero-ad-gap{height:4px}
.play-ad-note{text-align:center;font-size:12px;opacity:.65;margin:4px 0 10px}
@media (max-width:600px){
 .ad-large{min-height:250px}
 .ad-medium{min-height:160px}
 .ad-wrap{margin:12px 0}
}


/* Mobile fullscreen: native fullscreen where supported, fixed viewport fallback elsewhere. */
@media (max-width: 768px){
  .game-frame-wrap{
    border-radius:12px;
    min-height:0;
  }
  .game-toolbar{
    top:max(10px, env(safe-area-inset-top));
    right:max(10px, env(safe-area-inset-right));
  }
  .fullscreen-btn{
    min-width:0;
    width:48px;
    height:48px;
    padding:0;
    border-radius:14px;
    gap:0;
    background:rgba(7,27,53,.96);
    border:1px solid rgba(255,255,255,.38);
    box-shadow:0 6px 20px rgba(0,0,0,.55);
    -webkit-tap-highlight-color:transparent;
  }
  .fullscreen-btn .fs-icon{font-size:25px;font-weight:900;line-height:1}
  .fullscreen-btn .fs-label{display:none}
  .fullscreen-btn.is-active{background:rgba(180,35,24,.96)}
  .fullscreen-btn:focus-visible{outline:3px solid rgba(255,255,255,.85);outline-offset:2px}
  .game-frame{
    height:70vh;
    min-height:380px;
  }

  /* CSS fallback for iOS Safari and browsers that reject Element.requestFullscreen(). */
  body.mobile-game-active{
    overflow:hidden !important;
    position:fixed;
    width:100%;
    height:100%;
    inset:0;
    overscroll-behavior:none;
  }
  .game-frame-wrap.mobile-fullscreen{
    position:fixed !important;
    z-index:2147483000 !important;
    inset:0 !important;
    width:100vw !important;
    height:100dvh !important;
    min-height:100dvh !important;
    max-width:none !important;
    margin:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:#000 !important;
    box-shadow:none !important;
    overflow:hidden !important;
  }
  .game-frame-wrap.mobile-fullscreen .game-frame{
    display:block;
    width:100vw !important;
    height:100dvh !important;
    min-height:100dvh !important;
    border:0 !important;
  }
  .game-frame-wrap.mobile-fullscreen .game-toolbar{
    top:max(10px, env(safe-area-inset-top));
    right:max(10px, env(safe-area-inset-right));
  }
}

@supports not (height: 100dvh){
  @media (max-width:768px){
    .game-frame-wrap.mobile-fullscreen{height:100vh !important;min-height:100vh !important}
    .game-frame-wrap.mobile-fullscreen .game-frame{height:100vh !important;min-height:100vh !important}
  }
}

/* Mobile-first UI everywhere: keep the same compact phone layout on desktop too */
html,body{width:100%;overflow-x:hidden}
body{background:#07111f}
.app{width:100%;max-width:480px;margin:0 auto;min-height:100vh;box-shadow:0 0 40px rgba(0,0,0,.22)}
.header{position:sticky;top:0}
.header-inner{max-width:480px;padding:10px 12px;gap:10px}
.logo{height:38px}
.brand{font-size:17px}
.brand small{font-size:9px}
.nav{display:none}
.main{padding:12px 12px 34px}
.hero{padding:10px 0 6px}
.hero h1{font-size:28px}
.hero p{font-size:13px;line-height:1.5}
.chips{padding:10px 0 15px}
.chip{padding:8px 11px;font-size:12px}
.games{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.card{border-radius:14px}
.card-body{padding:9px}
.card h2{font-size:14px}
.meta{font-size:11px;margin-bottom:8px}
.poster{aspect-ratio:1.35/1}
.play{padding:10px;font-size:12px;border-radius:10px}
.ad-wrap{margin:12px 0;min-height:90px}
.ad-large{min-height:250px}
.ad-medium{min-height:160px}
.footer{max-width:480px;padding:18px 12px;font-size:12px;display:flex;flex-direction:column;gap:9px}
.play-page .main{max-width:480px;margin:auto;padding:12px}
.game-head{gap:10px;margin:6px 0 14px}
.game-head img{width:92px;height:62px;border-radius:12px}
.game-head h1{font-size:21px}
.game-head p{font-size:12px}
.game-frame-wrap{border-radius:12px}
.game-frame{height:70vh;min-height:430px}
.game-toolbar{top:8px;right:8px}
.fullscreen-btn{min-width:46px;width:46px;height:46px;padding:0;border-radius:50%;gap:0}
.fullscreen-btn .fs-label{display:none}
.fs-icon{font-size:22px}
.back{margin:8px 0;font-size:12px}

@media(max-width:360px){
 .app{max-width:100%}
 .main,.play-page .main{padding-left:9px;padding-right:9px}
 .games{gap:8px}
 .card h2{font-size:13px}
}

/* Mobile-first UI everywhere: keep the same compact phone layout on desktop too */
html,body{width:100%;overflow-x:hidden}
body{background:#07111f}
.app{width:100%;max-width:480px;margin:0 auto;min-height:100vh;box-shadow:0 0 40px rgba(0,0,0,.22)}
.header{position:sticky;top:0}
.header-inner{max-width:480px;padding:10px 12px;gap:10px}
.logo{height:38px}
.brand{font-size:17px}
.brand small{font-size:9px}
.nav{display:none}
.main{padding:12px 12px 34px}
.hero{padding:10px 0 6px}
.hero h1{font-size:28px}
.hero p{font-size:13px;line-height:1.5}
.chips{padding:10px 0 15px}
.chip{padding:8px 11px;font-size:12px}
.games{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.card{border-radius:14px}
.card-body{padding:9px}
.card h2{font-size:14px}
.meta{font-size:11px;margin-bottom:8px}
.poster{aspect-ratio:1.35/1}
.play{padding:10px;font-size:12px;border-radius:10px}
.ad-wrap{margin:12px 0;min-height:90px}
.ad-large{min-height:250px}
.ad-medium{min-height:160px}
.footer{max-width:480px;padding:18px 12px;font-size:12px;display:flex;flex-direction:column;gap:9px}
.play-page .main{max-width:480px;margin:auto;padding:12px}
.game-head{gap:10px;margin:6px 0 14px}
.game-head img{width:92px;height:62px;border-radius:12px}
.game-head h1{font-size:21px}
.game-head p{font-size:12px}
.game-frame-wrap{border-radius:12px}
.game-frame{height:70vh;min-height:430px}
.game-toolbar{top:8px;right:8px}
.fullscreen-btn{min-width:46px;width:46px;height:46px;padding:0;border-radius:50%;gap:0}
.fullscreen-btn .fs-label{display:none}
.fs-icon{font-size:22px}
.back{margin:8px 0;font-size:12px}

@media(max-width:360px){
 .app{max-width:100%}
 .main,.play-page .main{padding-left:9px;padding-right:9px}
 .games{gap:8px}
 .card h2{font-size:13px}
}
