/* ==========================================================
   UGPlay "Play Online" area, featured games, ad spots, logos.
   ========================================================== */
:root { --ug-ink: #181818; --ug-muted: #555d66; --ug-orange: #ff7a00; --ug-grad: linear-gradient(180deg, #ffbe01 0, #ff5b01 100%); --ug-cream: #fff6e8; }

/* ---------- Logos (sharp 2x logo, bigger in the header) ---------- */
.navbar-area .logo-wrapper { max-width: 250px; }
.navbar-area .custom-logo-link img, .custom-logo-link img { max-width: 230px !important; width: 230px; height: auto; }
.footer-logo img { max-width: 200px !important; width: 200px; height: auto; display: block; }
.footer-logo { margin-bottom: 18px; display: inline-block; }
@media (max-width: 991px) {
  .navbar-area .custom-logo-link img, .custom-logo-link img { width: 180px; max-width: 180px !important; }
}
@media (max-width: 400px) {
  .navbar-area .custom-logo-link img, .custom-logo-link img { width: 160px; max-width: 160px !important; }
}

/* "New" tag in the menu */
.navbar-area .ug-new, .ug-new { color: #fff !important; -webkit-text-fill-color: #fff; -webkit-background-clip: border-box; background-clip: border-box; display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: #ff5b01; color: #fff; font-size: 10px; font-weight: 600; line-height: 16px; vertical-align: 2px; text-transform: uppercase; letter-spacing: .03em; }

/* ---------- Shared pieces ---------- */
.ug-wrap { max-width: 1230px; margin: 0 auto; padding: 0 15px; }
.ug-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px; border-radius: 12px; font-weight: 600; font-size: 16px; line-height: 1; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s, color .15s; }
.ug-btn--play { background: var(--ug-grad); color: #fff; box-shadow: 0 10px 24px rgba(255, 91, 1, .28); }
.ug-btn--play:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(255, 91, 1, .36); }
.ug-btn--outline { border: 2px solid var(--ug-ink); color: var(--ug-ink); background: #fff; }
.ug-btn--outline:hover { background: var(--ug-ink); color: #fff; }
.ug-hero-play { display: inline-block; vertical-align: middle; margin: 0 16px 10px 0; }
.ug-section-head .theme-heading-title .title, .ug-play-head .theme-heading-title .title { font-size: 54px; line-height: 1.15; }
.ug-hero-play + .elementor-element, .ug-hero-play ~ .elementor-element { vertical-align: middle; }

/* Game cards */
.ug-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.ug-grid--featured { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ug-grid--small { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
.ug-card { display: flex; flex-direction: column; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .08); color: var(--ug-ink); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.ug-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0, 0, 0, .14); color: var(--ug-ink); }
.ug-card[hidden] { display: none; }
.ug-card__img { display: block; aspect-ratio: 3 / 4; background: #120d2b; overflow: hidden; }
.ug-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ug-card__body { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 18px; }
.ug-card__name { font-family: "Paytone One", sans-serif; font-size: 20px; line-height: 1.25; }
.ug-card__tag { font-size: 14px; color: var(--ug-muted); }
.ug-card__btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 16px; border-radius: 10px; background: var(--ug-ink); color: #fff; font-size: 14px; font-weight: 600; }
.ug-card:hover .ug-card__btn { background: #ff5b01; }
.ug-grid--small .ug-card__name { font-size: 16px; }
.ug-grid--small .ug-card__tag, .ug-grid--small .ug-card__btn { display: none; }
.ug-grid--small .ug-card__body { padding: 10px 12px 12px; }

/* ---------- Home page ---------- */
.ug-home-play { background: var(--ug-cream); padding: 80px 0; margin: 40px 0 0; }
.ug-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.ug-section-head .theme-heading-title { margin: 0; }
.ug-section-head .theme-heading-title .title { margin: 0; }
.ug-home-newapps { padding: 10px 0 20px; }
.ug-apps-more { text-align: center; padding-bottom: 70px; }
.ug-apps-more p { font-size: 16px; }
.ug-apps-more a:not(.ug-btn) { color: #ff5b01; text-decoration: underline; }
.ug-app-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ug-app-card__img { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; }
.ug-app-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Play pages ---------- */
.ug-play-main { padding: 140px 0 0; }
.ug-play-head { text-align: center; margin-bottom: 28px; }
.ug-play-head .theme-heading-title { margin-bottom: 10px; }
.ug-lead { max-width: 640px; margin: 0 auto; font-size: 18px; line-height: 1.6; color: #333; }
.ug-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 28px 0 30px; }
.ug-filters button { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--ug-ink); background: #fff; color: var(--ug-ink); font: 500 15px/1 Poppins, sans-serif; cursor: pointer; }
.ug-filters button:hover { background: #f3f3f3; }
.ug-filters button.is-active { background: var(--ug-ink); color: #fff; }
.ug-band { background: var(--ug-cream); margin-top: 80px; padding: 44px 0; }
.ug-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.ug-band h2 { font-family: "Paytone One", sans-serif; font-weight: 400; font-size: 30px; margin: 0 0 6px; }
.ug-band p { margin: 0; color: #333; }

.ug-crumbs { font-size: 14px; color: var(--ug-muted); margin-bottom: 16px; }
.ug-crumbs a { color: var(--ug-muted); text-decoration: underline; }
.ug-crumbs a:hover { color: #ff5b01; }

/* Game page: left ad | game | right column */
.ug-stage { display: grid; grid-template-columns: 160px auto 300px; justify-content: center; align-items: start; gap: 28px; margin: 4px 0 8px; }
.ug-stage__game { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ug-stage__side { display: flex; flex-direction: column; gap: 20px; width: 300px; }
.ug-frame { position: relative; height: min(720px, calc(100vh - 150px)); min-height: 480px; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #0b0820; box-shadow: 0 18px 40px rgba(11, 8, 32, .35); }
.ug-frame > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #0b0820; }
.ug-frame__start { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #0b0820; cursor: pointer; }
.ug-frame__start img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.6); transition: filter .2s; }
.ug-frame__start:hover img { filter: brightness(.75); }
.ug-frame__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 92px; height: 92px; border-radius: 50%; background: var(--ug-grad); color: #fff; display: flex; align-items: center; justify-content: center; padding-left: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: transform .15s; }
.ug-frame__start:hover .ug-frame__play { transform: translate(-50%, -50%) scale(1.06); }
.ug-frame__hint { position: absolute; left: 0; right: 0; top: calc(50% + 62px); color: #fff; font: 600 16px/1 Poppins, sans-serif; text-align: center; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.ug-frame__close { display: none; position: absolute; top: max(10px, env(safe-area-inset-top)); right: 10px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 28px; line-height: 44px; cursor: pointer; }
.ug-frame:fullscreen { width: 100%; height: 100%; max-height: none; border-radius: 0; aspect-ratio: auto; background: #000; }
.ug-frame:fullscreen .ug-frame__close { display: block; }
/* Phones without real full screen (iPhone): fill the window instead */
.ug-frame.is-filled { position: fixed; inset: 0; z-index: 2147483000; width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; border-radius: 0; background: #000; }
.ug-frame.is-filled .ug-frame__close { display: block; }
html.ug-noscroll, html.ug-noscroll body { overflow: hidden; }
.ug-tools { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ug-tool { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 2px solid var(--ug-ink); background: #fff; color: var(--ug-ink); font: 600 14px/1 Poppins, sans-serif; cursor: pointer; }
.ug-tool:hover { background: var(--ug-ink); color: #fff; }

.ug-info { background: var(--ug-cream); border-radius: 20px; padding: 22px; }
.ug-info h1 { font-family: "Paytone One", sans-serif; font-weight: 400; font-size: 30px; line-height: 1.2; margin: 0 0 10px; }
.ug-info p { font-size: 15px; line-height: 1.6; color: #333; margin: 0 0 10px; }
.ug-info__how { font-size: 14px !important; }
.ug-info__get { font-weight: 600; color: var(--ug-ink) !important; margin: 16px 0 8px !important; }
.ug-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ug-badges img { height: 40px; width: auto; display: block; }
.ug-badge-soon { display: inline-flex; flex-direction: column; justify-content: center; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px dashed #9aa0a6; color: var(--ug-muted); font-size: 12px; font-weight: 600; line-height: 1.2; cursor: default; }
.ug-badge-soon small { font-size: 10px; font-weight: 400; }

.ug-more { padding: 44px 0 80px; }
.ug-more__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.ug-more__head h2 { font-family: "Paytone One", sans-serif; font-weight: 400; font-size: 32px; margin: 0; }
.ug-more__head a { font-weight: 600; color: var(--ug-ink); text-decoration: underline; }

/* ---------- Ad spots ---------- */
.ug-ad { margin: 0 auto 22px; text-align: center; }
.ug-ad.is-empty { display: none; }
.ug-ad__label { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8a9097; margin-bottom: 4px; }
.ug-ad__slot { display: flex; justify-content: center; }
.ug-ad__slot img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.ug-ad--play-list-top, .ug-ad--play-top, .ug-ad--play-bottom { max-width: 728px; }
.ug-ad--play-list-top .ug-ad__slot img, .ug-ad--play-top .ug-ad__slot img, .ug-ad--play-bottom .ug-ad__slot img { width: 728px; }
.ug-ad--play-left { width: 160px; margin: 0; }
.ug-ad--play-left .ug-ad__slot img { width: 160px; }
.ug-ad--play-right, .ug-ad--play-right-2 { width: 300px; margin: 0 auto; }
.ug-ad--play-right .ug-ad__slot img, .ug-ad--play-right-2 .ug-ad__slot img { width: 300px; }
.ug-ad--play-bottom { margin-top: 30px; }
.ug-ad__preview { display: none; }
/* ?ads=preview shows every spot as a labelled box */
html.ug-ads-preview .ug-ad, html.ug-ads-preview .ug-ad.is-empty { display: block; }
html.ug-ads-preview .ug-ad.is-empty .ug-ad__preview { display: flex; }
html.ug-ads-preview .ug-ad__preview { flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed #c9c9c9; border-radius: 12px; background: #fafafa; color: var(--ug-muted); font-size: 14px; font-weight: 600; padding: 10px; box-sizing: border-box; }
html.ug-ads-preview .ug-ad__preview small { font-weight: 400; font-size: 12px; line-height: 1.4; }
html.ug-ads-preview .ug-ad--play-list-top .ug-ad__preview, html.ug-ads-preview .ug-ad--play-top .ug-ad__preview, html.ug-ads-preview .ug-ad--play-bottom .ug-ad__preview { height: 90px; }
html.ug-ads-preview .ug-ad--play-left .ug-ad__preview { height: 600px; }
html.ug-ads-preview .ug-ad--play-right .ug-ad__preview, html.ug-ads-preview .ug-ad--play-right-2 .ug-ad__preview { height: 250px; }

/* No left banner on this page: keep the game centred */
.ug-stage:has(.ug-ad--play-left.is-empty) { grid-template-columns: auto 300px; }
.ug-stage:has(.ug-ad--play-left.is-empty) .ug-stage__left { display: none; }
html.ug-ads-preview .ug-stage:has(.ug-ad--play-left.is-empty) { grid-template-columns: 160px auto 300px; }
html.ug-ads-preview .ug-stage:has(.ug-ad--play-left.is-empty) .ug-stage__left { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .ug-stage, html.ug-ads-preview .ug-stage:has(.ug-ad--play-left.is-empty) { grid-template-columns: auto 300px; }
  .ug-stage__left, html.ug-ads-preview .ug-stage:has(.ug-ad--play-left.is-empty) .ug-stage__left { display: none; }
  .ug-grid--featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .ug-play-main { padding-top: 100px; }
  .ug-home-play { padding: 56px 0; }
  .ug-stage, .ug-stage:has(.ug-ad--play-left.is-empty), html.ug-ads-preview .ug-stage:has(.ug-ad--play-left.is-empty) { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ug-stage__side { width: 100%; align-items: center; }
  .ug-info { width: 100%; box-sizing: border-box; }
  .ug-frame { width: min(100%, calc((100svh - 110px) * 9 / 16)); height: auto; min-height: 0; margin: 0 auto; }
  .ug-stage__game { width: 100%; }
  .ug-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .ug-card__name { font-size: 17px; }
  .ug-card__tag { font-size: 13px; }
  .ug-card__body { padding: 10px 12px 14px; }
  .ug-card__btn { padding: 7px 12px; font-size: 13px; }
  .ug-ad--play-right, .ug-ad--play-right-2 { width: 100%; max-width: 300px; }
  .ug-play-head .theme-heading-title .title, .ug-section-head .theme-heading-title .title { font-size: 38px; }
}
@media (max-width: 767px) {
  .ug-hero-play { display: block; margin: 0 0 14px; }
}

/* Game page: about + questions (crawlable text) */
.ug-about { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; margin: 40px 0 0; padding: 36px; background: #fafafa; border-radius: 22px; }
.ug-about h2 { font-family: "Paytone One", sans-serif; font-weight: 400; font-size: 28px; margin: 0 0 12px; }
.ug-about h3 { font-size: 17px; font-weight: 600; margin: 18px 0 6px; }
.ug-about p { font-size: 15px; line-height: 1.7; color: #333; margin: 0; }
.ug-features { margin: 0; padding: 0; list-style: none; }
.ug-features li { position: relative; padding: 0 0 8px 26px; font-size: 15px; line-height: 1.6; color: #333; }
.ug-features li::before { content: ""; position: absolute; left: 0; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--ug-grad); }
@media (max-width: 767px) { .ug-about { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 18px; } }

/* Controls tables on game pages */
.ug-controls { margin: 40px 0 0; padding: 32px 36px; background: var(--ug-cream); border-radius: 22px; scroll-margin-top: 90px; }
.ug-controls h2 { font-family: "Paytone One", sans-serif; font-weight: 400; font-size: 28px; margin: 0 0 14px; }
.ug-controls h3 { font-size: 17px; font-weight: 600; margin: 0 0 10px; }
.ug-controls__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.ug-keys { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; background: #fff; border-radius: 14px; overflow: hidden; }
.ug-keys th { text-align: left; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #555d66; padding: 10px 14px; background: #fff; border-bottom: 2px solid #f0e3cf; }
.ug-keys td { padding: 10px 14px; border-bottom: 1px solid #f3ebde; vertical-align: top; color: #333; }
.ug-keys tr:last-child td { border-bottom: 0; }
.ug-keys td:first-child { width: 44%; font-weight: 500; color: var(--ug-ink); }
.ug-keys kbd { font-family: inherit; font-size: 14px; background: none; border: 0; padding: 0; }
.ug-controls__note { font-size: 14px; color: #555d66; margin: 10px 0 0; }
.ug-about p + p { margin-top: 12px; }
.ug-info__how a { font-weight: 600; white-space: nowrap; }
@media (max-width: 767px) { .ug-controls { padding: 24px 18px; } .ug-controls__grid { grid-template-columns: minmax(0, 1fr); gap: 22px; } }

/* Continue video ad over the game (play.js + src/_data/videoAds.json) */
.ug-vad { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: #000; color: #fff; }
.ug-vad__bar { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; align-items: center; padding: max(8px, env(safe-area-inset-top)) 12px 8px; font: 600 12px/1.3 Poppins, sans-serif; background: #0b0820; }
.ug-vad__note { opacity: .75; font-weight: 400; }
.ug-vad__stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.ug-vad__stage video, .ug-vad__slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.ug-vad__stage video { object-fit: contain; background: #000; }
.ug-vad__spin { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: ug-vad-spin .8s linear infinite; }
@keyframes ug-vad-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ug-vad__spin { animation-duration: 2.4s; } }
.ug-frame:has(.ug-vad) .ug-frame__close { display: none; }
