/*
Theme Name: Portal Arcade
Description: A responsive game catalog theme with category browsing, search and click-to-load iframe game pages. Use with Portal Core.
Version: 0.4.15
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: portal-arcade
*/
:root{--bg:#121416;--panel:#1e2125;--text:#f5f5f2;--muted:#b6b9bf;--line:#383d43;--accent:#ff7a1a;--radius:18px}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.6 system-ui,-apple-system,Segoe UI,sans-serif}a{color:inherit;text-decoration:none}button,input{font:inherit}button,a,input{outline-offset:5px}a:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid var(--accent)}button{cursor:pointer}img{max-width:100%;height:auto}.shell{max-width:1480px;margin:auto;padding:0 36px}.site-header{border-bottom:1px solid var(--line);background:#191c20}.header-row{display:flex;align-items:center;gap:30px;min-height:94px}.brand{display:flex;align-items:center;gap:12px;font-size:23px;font-weight:850;letter-spacing:-.8px}.brand-symbol{display:grid;place-items:center;background:var(--accent);color:#241407;width:42px;height:42px;border-radius:13px;font-size:25px}.brand img{max-height:48px;width:auto}.search-form{display:flex;align-items:center;gap:8px;margin-left:auto;max-width:420px;width:100%}.search-form input[type=search]{color:var(--text);background:#24282d;border:1px solid #41474f;border-radius:12px;padding:12px 16px;min-width:0;width:100%}.search-form button{color:var(--text);background:transparent;border:1px solid #555c66;border-radius:10px;padding:10px 13px}.category-nav{display:flex;gap:10px;overflow:auto;padding:16px 0 18px;scrollbar-width:thin}.category-nav a{white-space:nowrap;background:#262a30;color:#d0d2d6;font-size:14px;border-radius:9px;padding:7px 16px}.category-nav a:hover,.category-nav a[aria-current]{background:var(--accent);color:#241407}.hero{padding:46px 0 30px;display:flex;align-items:flex-end;justify-content:space-between;gap:24px}.eyebrow{font-size:12px;font-weight:800;letter-spacing:2px;color:var(--accent);text-transform:uppercase}.hero h1{font-size:clamp(32px,4.2vw,60px);line-height:1.1;letter-spacing:-2px;margin:12px 0 14px;max-width:720px}.hero p{color:var(--muted);margin:0;max-width:620px}.hero-note{color:var(--muted);font-size:13px;text-align:right;padding-bottom:7px}.section{padding:24px 0}.section-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}.section h2{font-size:24px;letter-spacing:-.6px;margin:0}.section-head>a{font-size:14px;color:var(--accent)}.game-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:20px}.featured-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.game-card{display:block;min-width:0}.card-art{position:relative;aspect-ratio:4/3;overflow:hidden;border-radius:var(--radius);background:#392e70;transition:transform .2s,box-shadow .2s}.game-card:hover .card-art{transform:translateY(-4px);box-shadow:0 12px 35px #0005}.card-art>img{width:100%;height:100%;object-fit:cover;display:block}.featured-grid .card-art{aspect-ratio:16/9}.cover-fallback{height:100%;display:grid;place-items:center;background:radial-gradient(ellipse at 20% 10%,#fff3,transparent 55%),linear-gradient(140deg,#7661ce,#2c235a);position:relative;isolation:isolate}.cover-fallback:before,.cover-fallback:after{content:'';position:absolute;width:60%;height:65%;border:1px solid #fff3;border-radius:30px;transform:rotate(-30deg);z-index:-1}.cover-fallback:after{transform:rotate(25deg);width:40%;height:110%;background:#fff1}.cover-fallback span{font-weight:900;font-size:clamp(28px,4vw,65px);text-shadow:0 8px 0 #0003;letter-spacing:-4px}.accent-blue{background:linear-gradient(135deg,#306bd0,#12214e)}.accent-green{background:linear-gradient(140deg,#32b77b,#0b3c36)}.accent-orange{background:linear-gradient(140deg,#f6a546,#a33c36)}.accent-pink{background:linear-gradient(140deg,#dc5ca3,#6d2468)}.accent-cyan{background:linear-gradient(140deg,#28bcbf,#175778)}.badge{position:absolute;left:12px;top:12px;background:#181b20ee;backdrop-filter:blur(8px);font-size:10px;font-weight:850;letter-spacing:1px;padding:5px 9px;border-radius:6px}.card-title{font-size:15px;font-weight:700;line-height:1.4;margin:11px 0 3px}.card-meta{color:var(--muted);font-size:12px}.ad-slot{display:flex;justify-content:center;align-items:center;min-height:100px;margin:22px 0;background:#1b1e22;border:1px dashed #41474f;border-radius:14px;color:#b6b9bf;font-size:10px;letter-spacing:2px}.category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.category-tile{display:flex;align-items:center;justify-content:space-between;padding:20px 23px;border-radius:14px;background:#24282d;border:1px solid var(--line);font-weight:700}.category-tile small{font-weight:400;color:var(--muted)}.empty-state{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:36px;max-width:850px}.empty-state p{color:var(--muted)}.btn{display:inline-flex;align-items:center;justify-content:center;background:var(--accent);border:0;border-radius:11px;padding:12px 23px;color:#241407;font-weight:800}.btn-secondary{background:#30353c;color:white;border:1px solid #555c66}.breadcrumb{color:var(--muted);font-size:13px;padding:26px 0 17px}.game-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}.game-heading h1{margin:0;font-size:32px;letter-spacing:-1px}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:26px}.player-wrap{background:#0c0e10;border:1px solid var(--line);border-radius:18px;overflow:hidden}.player-stage{position:relative;aspect-ratio:16/9;min-height:280px;display:grid;place-items:center;text-align:center;overflow:hidden}.player-stage .cover-fallback{position:absolute;inset:0;opacity:.45}.player-launch{position:relative;z-index:1;padding:25px;max-width:85%}.player-launch h2{font-size:32px;line-height:1.2;margin:0 0 20px;text-shadow:0 2px 15px #000}.player-launch p{color:#e6e7e9;font-size:14px}.player-stage iframe{position:absolute;width:100%;height:100%;inset:0;border:0;background:#101215}.player-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;background:#24282d;padding:12px 18px;font-size:13px}.player-toolbar button{padding:8px 14px;border-radius:8px;border:1px solid #5b636e;background:#30353c;color:white}.player-toolbar a{color:#ff963f}.player-wrap:fullscreen{width:100%;height:100%;border:0;border-radius:0;display:flex;flex-direction:column}.player-wrap:fullscreen .player-stage{flex:1;aspect-ratio:auto}.info-panel{margin-top:25px;padding:26px;background:var(--panel);border-radius:16px;overflow-wrap:anywhere}.info-panel h2{margin:0 0 12px;font-size:22px}.info-panel p{color:#d0d2d6}.info-panel .instructions{white-space:pre-wrap}.side-title{font-size:16px;margin:0 0 14px}.sidebar .game-grid{grid-template-columns:1fr;gap:18px}.sidebar .game-card{display:grid;grid-template-columns:100px minmax(0,1fr);gap:12px;align-items:center}.sidebar .card-title{margin:0 0 5px;font-size:14px}.sidebar .card-art{border-radius:10px}.sidebar .badge{display:none}.sidebar .cover-fallback span{font-size:30px}.pagination{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:32px 0}.pagination .page-numbers{padding:7px 14px;background:var(--panel);border-radius:8px}.pagination .current{background:var(--accent);color:#241407}.site-footer{border-top:1px solid var(--line);padding:30px 0;margin-top:45px;color:var(--muted);font-size:13px}.footer-row{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}.site-footer nav{display:flex;gap:18px}.skip-link{position:absolute;left:-10000px}.skip-link:focus{left:20px;top:12px;z-index:99999;background:white;color:black;padding:10px}.notice{padding:16px;background:#352d18;border:1px solid #6e5c2a;border-radius:10px;margin-top:20px}.content-page{max-width:850px;margin:40px auto;min-height:50vh}.content-page a{color:var(--accent);text-decoration:underline}[hidden]{display:none!important}@media(min-width:1100px){.featured-grid .card-title{font-size:19px}}@media(max-width:1150px){.game-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.featured-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.hero-note{display:none}.game-layout{grid-template-columns:minmax(0,1fr) 230px}}@media(max-width:850px){.shell{padding:0 20px}.game-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.featured-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.game-layout{grid-template-columns:1fr}.sidebar .game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.header-row{gap:15px;flex-wrap:wrap;padding:20px 0}.search-form{max-width:none}.brand{font-size:21px}.hero{padding-top:30px}.hero h1{letter-spacing:-1px}}@media(max-width:520px){.game-grid,.featured-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.shell{padding:0 16px}.header-row{min-height:auto}.search-form{margin:0}.card-title{font-size:14px}.hero h1{font-size:36px}.section h2{font-size:22px}.category-tile{padding:15px;font-size:13px}.category-tile small{display:none}.player-stage{aspect-ratio:4/3;min-height:260px}.game-heading h1{font-size:27px}.sidebar .game-grid{grid-template-columns:1fr}.player-toolbar{padding:10px;font-size:11px}.info-panel{padding:20px}.player-launch h2{font-size:26px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.footer-menu{display:flex;gap:18px;list-style:none;margin:0;padding:0}
.footer-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px;padding:28px 0;border-bottom:1px solid var(--line);margin-bottom:24px}.footer-columns h2{font-size:16px;margin:0 0 12px;color:var(--text)}.link-list{list-style:none;padding:0;margin:0}.link-list li+li{margin-top:7px}.link-list a{color:var(--muted)}.link-list a:hover,.player-toolbar a:hover{color:var(--accent)}.game-category-link{font-size:13px;color:var(--accent);background:var(--panel);padding:6px 12px;border-radius:20px}.player-cover{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.5}.player-launch{background:#101215dd;border-radius:14px;backdrop-filter:blur(3px)}
@media(max-width:700px){.footer-columns{grid-template-columns:1fr 1fr;gap:22px}.footer-columns section:last-child{grid-column:1/-1}}

/* Compact catalog layout. Keep the game player and sidebar independent. */
.header-row{min-height:72px}
.category-nav{padding:10px 0 12px;gap:8px}
.category-nav a{padding:6px 12px;font-size:13px}
.hero{padding:22px 0 12px;gap:18px;align-items:center}
.hero h1{font-size:28px;letter-spacing:-.7px;margin:5px 0 7px;line-height:1.2}
.hero p{font-size:14px}
.hero>.btn{font-size:13px;padding:9px 15px;flex-shrink:0}
.section{padding:18px 0}
.section-head{margin-bottom:12px}
.section h2{font-size:20px}
.section>.game-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:22px 16px}
.section>.game-grid .card-art{aspect-ratio:4/3;border-radius:12px}
.section>.game-grid .card-title{font-size:14px;line-height:1.4;margin:7px 0 2px;overflow-wrap:anywhere}
.section>.game-grid .badge{left:6px;top:6px;font-size:8px;letter-spacing:.4px;padding:3px 5px}
.section>.game-grid .cover-fallback span{font-size:40px;letter-spacing:-2px}
@media(min-width:1400px){.section>.game-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:1100px){.section>.game-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:850px){.section>.game-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.header-row{padding:14px 0}.hero{padding-top:18px}}
@media(max-width:640px){.section>.game-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 10px}.hero{align-items:flex-start;flex-direction:column;gap:10px}.hero h1{font-size:25px}.section-head .eyebrow{display:none}}
@media(max-width:420px){.section>.game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.category-description{max-width:760px;color:var(--muted);font-size:14px;overflow-wrap:anywhere}.category-description p{margin:8px 0 0}.category-description a{text-decoration:underline;color:var(--accent)}

/* Homepage placements remain independent siblings of the game shelves. */
.home-ad-slot{display:flex;flex-direction:column;justify-content:flex-start;gap:10px;width:100%;min-width:0;min-height:0;margin:30px 0;padding:12px 0 0;background:transparent;border:0;border-radius:0;font-size:11px;letter-spacing:0}
.home-ad-label{color:var(--muted);font-size:10px;line-height:16px;letter-spacing:1.5px;text-transform:uppercase}
.home-ad-space{display:grid;place-items:center;width:100%;max-width:970px;height:250px;margin:0 auto;background:#1b1e22;border:1px dashed #555c66;border-radius:8px;color:#b6b9bf;text-align:center;padding:16px;overflow:hidden}
.home-about{border-top:1px solid var(--line);margin-top:18px;padding-top:28px}
.home-about p{color:var(--muted);font-size:14px;line-height:1.85;max-width:960px;white-space:pre-line;overflow-wrap:anywhere}
@media(max-width:640px){.home-ad-slot{margin:26px 0;gap:8px}.home-ad-space{max-width:336px;height:250px}.home-shelf .section-head{gap:12px}.home-shelf .section-head>a{white-space:nowrap;font-size:12px}}

/* An information block separates gameplay from the first page-owned ad slot.
   The border-box minimum alone provides 150px of non-ad content below the player;
   normal block margins add further space. No ad is part of the fullscreen player. */
.game-info-panel{min-height:150px;display:flow-root}
.game-ad-slot{clear:both;margin-top:36px;margin-bottom:36px;break-inside:avoid}
.game-ad-slot .home-ad-space{position:static}

.game-layout>*{min-width:0}
.game-heading{flex-wrap:wrap}
.game-heading h1,.player-help,.sidebar .card-title{overflow-wrap:anywhere}
.player-toolbar{flex-wrap:wrap}
@media(max-width:850px){.game-layout{grid-template-columns:minmax(0,1fr)}}

.content-page{max-width:900px;margin:36px auto;overflow-wrap:anywhere;line-height:1.75}.content-page h2{margin-top:1.8em;line-height:1.3}.content-page a{text-decoration:underline}.policy-links{display:flex;gap:12px;flex-wrap:wrap}.provider-notice{font-size:13px;line-height:1.6;color:var(--muted);margin:14px 0;max-width:80ch}.provider-notice a{text-decoration:underline}

/* 0.4.2 — Gamebol-style game page: left column, game, right column. */
.pa-game-frame{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"main" "left" "right";gap:26px;align-items:start}
.pa-game-main{grid-area:main;min-width:0}.pa-side-left{grid-area:left}.pa-side-right{grid-area:right}
.pa-side{min-width:0}.pa-side .side-title{font-size:14px;margin:0 0 12px}
.pa-side .game-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:14px 10px}
.pa-side .card-art{aspect-ratio:1;border-radius:10px}.pa-side .card-title{font-size:12px;line-height:1.35;margin:6px 0 0;font-weight:700}
.pa-side .card-meta,.pa-side .badge{display:none}.pa-side .cover-fallback span{font-size:24px}
.pa-side .game-ad-slot{display:none;margin:0 0 18px;padding:0;gap:6px;align-items:center}
.pa-side .home-ad-space{width:160px;max-width:160px;height:600px;padding:8px}
.game-ad-top{margin:18px 0 0;padding:0;gap:6px;align-items:center}
.game-ad-top .home-ad-space{max-width:728px;height:90px}
@media(max-width:850px){.pa-side .game-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.game-ad-top .home-ad-space{max-width:320px;height:100px}}

/* 0.4.4 — About / Privacy links in the header, as on Gamebol. */
.header-links{display:flex;gap:16px;flex-shrink:0;flex-wrap:wrap}.header-row>*{min-width:0}.header-links a{color:var(--muted);font-size:14px;white-space:nowrap}.header-links a:hover,.header-links a[aria-current]{color:var(--text)}
@media(max-width:850px){.header-links{order:3;width:100%;gap:14px}.header-links a{font-size:13px}}
@media(max-width:640px){.game-ad-top.desktop-only{display:none}}
/* 0.4.9 — top ad sits exactly 150px above the game, like the side columns. The title block
   fills that space (min-height) and is aligned to its bottom edge. Only when the ad is visible. */
.game-ad-top:not(.desktop-only)+.pa-game-head{min-height:var(--pa-ad-gap,150px);display:flex;flex-direction:column;justify-content:flex-end}
@media(min-width:641px){.game-ad-top.desktop-only+.pa-game-head{min-height:var(--pa-ad-gap,150px);display:flex;flex-direction:column;justify-content:flex-end}}

/* 0.4.13 — curated shelves: full rows for 16 selected games. */
#editors-choices>.game-grid,#popular-games>.game-grid{grid-template-columns:repeat(8,minmax(0,1fr));gap:20px 12px}
@media(max-width:1100px){#editors-choices>.game-grid,#popular-games>.game-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:640px){#editors-choices>.game-grid,#popular-games>.game-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}}

/* 0.4.13 — anthracite and orange finishing touches. */
:root{color-scheme:dark}
.brand,.custom-logo-link{flex-shrink:0;max-width:100%}
.brand>span:last-child{overflow-wrap:anywhere;line-height:1.25}
.custom-logo-link{display:flex;align-items:center;max-width:280px}
.custom-logo{display:block;width:auto;max-width:100%;max-height:48px;object-fit:contain}
.search-form button:hover,.player-toolbar button:hover,.btn-secondary:hover{background:#3a4048;border-color:var(--accent)}
.btn:hover{background:#ff963f}
.btn-secondary:hover{color:var(--text)}
.category-nav{scrollbar-color:#626970 transparent}
.game-card:focus-visible .card-art{box-shadow:0 0 0 3px var(--accent)}
.category-tile:hover{border-color:var(--accent)}
.card-title{color:var(--text)}
.info-panel a,.provider-notice a{color:#ff963f;text-decoration:underline;text-underline-offset:3px}
.site-footer nav,.footer-menu{flex-wrap:wrap}
.footer-columns>*{min-width:0;overflow-wrap:anywhere}
.section-head>h2{min-width:0;overflow-wrap:anywhere}
.section-head>a{flex-shrink:0}
.content-page table{display:block;max-width:100%;overflow-x:auto}
.content-page iframe,.content-page video{max-width:100%}
@media(max-width:520px){.brand{font-size:20px}.custom-logo-link{max-width:230px}.search-form button{min-height:44px}.category-nav a{min-height:38px;display:flex;align-items:center}.section-head{align-items:flex-start}.footer-row>*{min-width:0;overflow-wrap:anywhere}}
@media(prefers-reduced-motion:reduce){.game-card:hover .card-art{transform:none}}

/* 0.4.14 — editors 8+8; remaining catalog shelves 6+6. */
.section>.game-grid,#popular-games>.game-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:20px 14px}
#editors-choices>.game-grid{grid-template-columns:repeat(8,minmax(0,1fr));gap:20px 12px}
@media(max-width:1100px){.section>.game-grid,#popular-games>.game-grid,#editors-choices>.game-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:640px){.section>.game-grid,#popular-games>.game-grid,#editors-choices>.game-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}}
