/*
Theme Name: Enymall Studio
Theme URI: https://enymall.com/
Author: Enymall Studio
Author URI: https://enymall.com/
Description: Game studio theme for Enymall Studio. Adds a "Games" section to the admin: upload a browser game as a .zip and it becomes playable on its own page, with a play button, full screen, and a games showcase on the home page. Comes with Touch Mommy installed.
Version: 1.0.24
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: enymall-studio
Tags: games, dark, one-column, custom-logo, custom-menu, featured-images, threaded-comments
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #0e0b1f;
  --bg-2: #151030;
  --card: #1c163d;
  --card-2: #241c4d;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f0fb;
  --muted: #b9b0cf;
  --accent: #ff5c8a;
  --accent-2: #ffb35c;
  --grad: linear-gradient(135deg, #ff5c8a 0%, #ff8a6b 55%, #ffb35c 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
  --wrap: 1200px;
  --font: "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(255, 92, 138, 0.16), transparent 60%),
    radial-gradient(700px 500px at -10% 20%, rgba(120, 90, 255, 0.14), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.6 var(--font);
  overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: #ff8fb0; text-decoration: none; }
a:hover { color: #ffd0de; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 900; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; left: 12px; top: 12px; z-index: 1000;
  width: auto; height: auto; clip: auto;
  padding: 10px 16px; background: #fff; color: #000; border-radius: 8px;
}
:focus-visible { outline: 3px solid rgba(255, 179, 92, 0.8); outline-offset: 3px; border-radius: 6px; }

/* ==========================================================================
   Buttons, chips
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px;
  font: 800 1rem/1 var(--font);
  cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--grad); color: #2a0b18; box-shadow: 0 8px 22px rgba(255, 92, 138, 0.35); }
.btn-primary:hover { color: #2a0b18; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 92, 138, 0.45); }
.btn-ghost { background: rgba(255, 255, 255, 0.08); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.14); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }
.chip {
  display: inline-block; padding: 3px 10px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line);
  color: var(--muted); font-size: 0.8rem; font-weight: 700;
}
.chip-hot { background: rgba(255, 92, 138, 0.16); border-color: rgba(255, 92, 138, 0.35); color: #ffc1d3; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 11, 31, 0.78);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 900; font-size: 1.2rem; }
.brand:hover { color: var(--text); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name small { display: block; font-size: 0.7rem; letter-spacing: 0.18em; color: var(--muted); font-weight: 800; text-transform: uppercase; }
.custom-logo { max-height: 46px; width: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a { display: block; padding: 10px 14px; border-radius: 999px; color: var(--muted); font-weight: 800; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.nav-toggle {
  display: none;
  width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--text);
  font-size: 22px; cursor: pointer;
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: rgba(14, 11, 31, 0.97); border-bottom: 1px solid var(--line);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px 16px 16px; }
  .main-nav a { padding: 14px; }
}

/* ==========================================================================
   Hero (home)
   ========================================================================== */
.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(20px, 4vw, 48px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
.kicker { display: inline-block; font-weight: 900; letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.78rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 12px; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-text { color: var(--muted); font-size: 1.1rem; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-stats { display: flex; gap: 22px; margin-top: 26px; color: var(--muted); font-size: 0.9rem; }
.hero-stats b { display: block; color: var(--text); font-size: 1.25rem; }

.feature-card {
  position: relative; display: block;
  border-radius: 26px; overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
  color: var(--text);
  transform: rotate(-1.2deg);
  transition: transform 0.25s ease;
}
.feature-card:hover { transform: rotate(0deg) translateY(-4px); color: var(--text); }
.feature-card .cover { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; }
.feature-card .cover-fallback { aspect-ratio: 16 / 10; background: var(--grad); }
.feature-card .fc-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px;
  background: linear-gradient(to top, rgba(14, 11, 31, 0.95), rgba(14, 11, 31, 0));
}
.feature-card .fc-body h2 { margin: 6px 0 4px; font-size: clamp(1.4rem, 3vw, 2rem); }
.feature-card .fc-body p { margin: 0; color: #e6ddf5; }
.fc-play {
  position: absolute; right: 18px; top: 18px;
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: #2a0b18; font-size: 26px;
  box-shadow: 0 8px 24px rgba(255, 92, 138, 0.5);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.08); } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .feature-card { transform: none; order: -1; }
}

/* ==========================================================================
   Sections + game grid
   ========================================================================== */
.section { padding: clamp(28px, 5vw, 56px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head p { color: var(--muted); margin: 0; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.game-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.game-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(255, 92, 138, 0.45), var(--shadow); color: var(--text); }
.game-card .thumb { position: relative; aspect-ratio: 16 / 10; background: var(--card-2); overflow: hidden; }
.game-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.game-card:hover .thumb img { transform: scale(1.05); }
.game-card .thumb .play-dot {
  position: absolute; right: 12px; bottom: 12px;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: #2a0b18; font-size: 18px;
  opacity: 0; transform: translateY(6px); transition: all 0.2s ease;
}
.game-card:hover .play-dot, .game-card:focus-visible .play-dot { opacity: 1; transform: none; }
.game-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-card h3 { margin: 0; font-size: 1.15rem; }
.game-card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.game-card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.game-card.soon { box-shadow: 0 0 0 1px var(--line) inset; background: transparent; border: 2px dashed rgba(255, 255, 255, 0.1); }
.game-card.soon .thumb { display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.03); font-size: 42px; color: rgba(255, 255, 255, 0.25); }
.game-card.soon:hover { transform: none; box-shadow: none; }

.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.perk { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: 0 0 0 1px var(--line); }
.perk .ico { font-size: 28px; margin-bottom: 8px; }
.perk p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .perks { grid-template-columns: 1fr; } }

.about-box {
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center;
  background: linear-gradient(135deg, rgba(255, 92, 138, 0.14), rgba(120, 90, 255, 0.12));
  border-radius: 26px; padding: clamp(22px, 4vw, 40px);
  box-shadow: 0 0 0 1px var(--line);
}
.about-box .brand-mark { width: 84px; height: 84px; }
.about-box p { color: #e3daf2; margin: 0; }
@media (max-width: 600px) { .about-box { grid-template-columns: 1fr; } }

/* ==========================================================================
   Game page + player
   ========================================================================== */
.crumbs { font-size: 0.88rem; color: var(--muted); padding: 18px 0 10px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: calc(100vh - 150px - var(--eg-top-ad-h, 0px));
  border-radius: 22px; overflow: hidden;
  background: #000;
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
}
.player.portrait { aspect-ratio: 10 / 16; max-width: 520px; margin-inline: auto; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.player-cover {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background-size: cover; background-position: center;
  text-align: center; padding: 20px;
}
.player-cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(14, 11, 31, 0.25), rgba(14, 11, 31, 0.85)); }
.player-cover > * { position: relative; }
.player-cover .btn { min-height: 60px; padding: 0 34px; font-size: 1.2rem; }
.player-cover .note { color: #eadff7; font-size: 0.92rem; margin: 0; }
.player-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 6px; }
.player-bar h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.player-bar .tagline { color: var(--muted); margin: 2px 0 0; }
.player-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.player:fullscreen { border-radius: 0; max-height: none; aspect-ratio: auto; }
.player:-webkit-full-screen { border-radius: 0; max-height: none; }

.game-info { display: grid; grid-template-columns: 1fr 340px; gap: 22px; margin-top: 18px; }
.game-info .content { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: 0 0 0 1px var(--line); }
.details { background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 0 0 1px var(--line); align-self: start; }
.details dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 0.93rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 700; }
@media (max-width: 860px) {
  .game-info { grid-template-columns: 1fr; }
  .player, .player.portrait { aspect-ratio: 4 / 5; max-width: none; }
}

/* ==========================================================================
   Content (pages, posts)
   ========================================================================== */
.entry { background: var(--card); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); box-shadow: 0 0 0 1px var(--line); margin: 24px 0; }
.entry-content > * { max-width: 72ch; }
.entry-content img { border-radius: 12px; }
.entry-content a { text-decoration: underline; }
.entry-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; }
.post-list { display: grid; gap: 16px; margin: 24px 0; }
.post-item { background: var(--card); border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 0 0 1px var(--line); }
.post-item h2 { font-size: 1.4rem; margin-bottom: 6px; }
.post-item h2 a { color: var(--text); }
.pagination { display: flex; gap: 8px; justify-content: center; margin: 20px 0 40px; }
.pagination .page-numbers { padding: 8px 14px; border-radius: 10px; background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.pagination .current { background: var(--grad); color: #2a0b18; }
.alignwide { max-width: 100%; }
.wp-block-image { margin: 1.2em 0; }
.wp-caption-text, figcaption { color: var(--muted); font-size: 0.85rem; }
blockquote { border-left: 4px solid var(--accent); margin: 1.2em 0; padding: 0.2em 0 0.2em 1em; color: #e3daf2; }
.comments-area { margin: 24px 0 48px; }

.search-form { display: flex; gap: 8px; }
.search-form input[type=search], input[type=text], input[type=email], textarea {
  flex: 1; min-height: 46px; padding: 0 14px;
  background: rgba(255, 255, 255, 0.06); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; font: inherit;
}
textarea { padding: 12px 14px; min-height: 120px; width: 100%; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 64px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.18); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 0; color: var(--muted); font-size: 0.92rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Lists, filters, comments
   ========================================================================== */
.list-head { padding-top: 24px; flex-wrap: wrap; }
.genre-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.genre-filter .chip { padding: 7px 14px; font-size: 0.9rem; }
.genre-filter .chip:hover { color: var(--text); }
.genre-filter .chip.on { background: var(--grad); border-color: transparent; color: #2a0b18; }
.entry-cover { border-radius: 14px; margin-bottom: 18px; width: 100%; }
.post-navigation { margin: 0 0 24px; }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 16px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 14px 0; border-top: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-left: 22px; }
.comment-list .avatar { border-radius: 50%; float: left; margin-right: 10px; }
.comment-form label { display: block; font-weight: 700; margin-bottom: 4px; }
.comment-form input[type=submit] {
  min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--grad); color: #2a0b18; font: 800 1rem var(--font); cursor: pointer;
}
.player.playing .player-cover { display: none; }

/* Play button sits low on the cover so it never hides the game's art. */
.player-cover { justify-content: flex-end; padding-bottom: clamp(24px, 7%, 60px); }
.player-cover::before { background: linear-gradient(to top, rgba(14, 11, 31, 0.88) 0%, rgba(14, 11, 31, 0.15) 55%, rgba(14, 11, 31, 0.05) 100%); }
/* Page fills the screen so the footer never floats mid-page. */
.site-content { min-height: calc(100vh - 170px); }
/* "Coming soon" placeholders stay small on phones. */
@media (max-width: 600px) {
  .game-card.soon { flex-direction: row; align-items: center; }
  .game-card.soon .thumb { aspect-ratio: auto; width: 70px; height: 70px; flex: none; font-size: 28px; margin: 12px 0 12px 12px; border-radius: 12px; }
}
.game-card .thumb-letter {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255, 92, 138, 0.35), rgba(120, 90, 255, 0.35));
  font-size: 64px; font-weight: 900; color: rgba(255, 255, 255, 0.85); text-transform: uppercase;
}

/* ==========================================================================
   Featured games slider (home page)
   ========================================================================== */
.feature-slider { position: relative; min-width: 0; }
.fs-frame {
  position: relative; border-radius: 26px; overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
  transform: rotate(-1.2deg);
}
.fs-track { display: flex; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.feature-slider .feature-card { flex: 0 0 100%; min-width: 0; transform: none; border-radius: 0; box-shadow: none; }
.feature-slider .feature-card:hover { transform: none; }
.feature-card .cover-fallback { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #7a2d6b, #3b2a8a); }
.feature-card .cover-fallback span { font-size: 120px; font-weight: 900; color: rgba(255, 255, 255, 0.8); text-transform: uppercase; }
.fs-arrow {
  position: absolute; top: 45%; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(14, 11, 31, 0.6); color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity 0.2s ease;
}
.fs-prev { left: 12px; }
.fs-next { right: 12px; }
.fs-frame:hover .fs-arrow, .fs-arrow:focus-visible { opacity: 1; }
@media (hover: none) { .fs-arrow { display: none; } }
.fs-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.fs-dots button {
  width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.25); transition: width 0.3s ease, background 0.3s ease;
}
.fs-dots button.on { width: 28px; background: var(--grad); }
@media (max-width: 860px) {
  .feature-slider { order: -1; }
  .fs-frame { transform: none; }
}

/* ==========================================================================
   Game page ads (appear only after the player launches the game)
   Each space exists once per device; only the one for the current screen is ever shown.
   ========================================================================== */
.eg-ad[hidden] { display: none !important; }
@media (max-width: 599px) { .eg-ad:not([data-device="phone"]) { display: none !important; } }
@media (min-width: 600px) and (max-width: 1024px) { .eg-ad:not([data-device="tablet"]) { display: none !important; } }
@media (min-width: 1025px) { .eg-ad:not([data-device="pc"]) { display: none !important; } }
.eg-ad { text-align: center; }
.eg-ad-label { display: block; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
/* Fixed sizes get their exact width/height inline (e.g. 300 x 250); never wider than the screen. */
.eg-ad-box { max-width: 100%; margin: 0 auto; overflow: hidden; }
.eg-ad[data-size="responsive"] .eg-ad-box { width: 100%; min-height: 100px; }
.eg-ad-under { max-width: 970px; margin: 18px auto 4px; }
.eg-ad-side { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

/* Customizer preview only: draw each space's exact shape so the owner can see it. */
.eg-ad-preview .eg-ad-box { outline: 2px dashed rgba(255, 179, 92, 0.85); outline-offset: 2px; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 10px, rgba(255, 255, 255, 0.08) 10px 20px); }
.eg-ad-empty { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 50px; padding: 6px; font-size: 0.8rem; font-weight: 700; color: #ffd9a8; line-height: 1.3; }
.eg-ad-caption { display: block; margin-top: 6px; font-size: 0.75rem; font-weight: 800; color: #ffb35c; }

/* Featured slider hover (PC): the tilted card straightens and lifts, the picture zooms a little. */
.fs-frame { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.feature-slider .feature-card .cover { transition: transform 0.5s ease; }
@media (hover: hover) and (min-width: 861px) {
  .feature-slider:hover .fs-frame { transform: rotate(0deg) translateY(-6px); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 92, 138, 0.45); }
  .feature-slider .feature-card:hover .cover { transform: scale(1.05); }
}

/* Picture ads: the picture fills the ad box exactly (cropped to the box's shape if needed). */
.eg-ad-pic { display: block; width: 100%; height: 100%; }
.eg-ad-img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.eg-ad[data-size="responsive"] .eg-ad-pic, .eg-ad[data-size="responsive"] .eg-ad-img { height: auto; }
a.eg-ad-pic:hover .eg-ad-img { filter: brightness(1.06); }

/* Phones: once Play is pressed the game plays right here on the page, in a player almost as tall
   as the screen (the site's ads sit below it). scroll-margin keeps it clear of the sticky header. */
.player { scroll-margin-top: 76px; }
@media (max-width: 860px) {
  .player.playing, .player.portrait.playing {
    aspect-ratio: auto;
    height: calc(100vh - 84px - var(--eg-top-ad-h, 0px));
    height: calc(100svh - 84px - var(--eg-top-ad-h, 0px));
    min-height: 440px;
    max-height: none;
  }
}

/* Ad above the game: a slim strip right under the page header, clear of the game. */
.eg-ad-top { max-width: 970px; margin: 0 auto 14px; scroll-margin-top: 76px; }

/* Video ad break: covers the game player (also in full screen) until it ends or is skipped. */
.eg-vb { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: #000; }
.eg-vb-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(14, 11, 31, 0.95); color: var(--muted); font-size: 0.8rem; }
.eg-vb-label { text-transform: uppercase; letter-spacing: 0.14em; font-weight: 800; }
.eg-vb-count { margin-left: auto; }
.eg-vb-skip, .eg-vb-sound { border: 0; border-radius: 999px; padding: 7px 14px; font: 800 0.85rem var(--font); cursor: pointer; }
.eg-vb-skip { margin-left: auto; background: var(--grad); color: #2a0b18; }
.eg-vb-sound { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.eg-vb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.eg-vb-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
/* Customize preview only: notes about the video ad break, shown on top of the game player. */
.eg-vb-note { position: absolute; left: 12px; top: 12px; z-index: 4; max-width: calc(100% - 24px); padding: 8px 12px; border-radius: 10px; background: rgba(255, 179, 92, 0.95); color: #2a0b18; font: 800 0.85rem/1.35 var(--font); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
