/*
Theme Name: Colstar
Theme URI: https://example.com
Author: We Are Colstar
Description: A simple, dark, easy-to-edit block theme for We Are Colstar, a solo indie game studio. Includes a Games section, a Devlog, and ready-made page designs. Everything is edited visually from Appearance > Editor.
Version: 2.1.2
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: colstar
*/

/* ---------- Layout helpers ---------- */
.colstar-section { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }

.colstar-header { border-bottom: 1px solid var(--wp--preset--color--line); padding-top: 0.9rem; padding-bottom: 0.9rem; }
.colstar-header .wp-block-site-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.colstar-header .wp-block-site-logo img { display: block; }

.colstar-footer { border-top: 1px solid var(--wp--preset--color--line); padding-top: 2.5rem; padding-bottom: 2.5rem; margin-top: 2rem; }
.colstar-footer p { color: var(--wp--preset--color--muted); margin: 0; }

/* ---------- Hero ---------- */
.colstar-hero { padding-top: clamp(2.5rem, 7vw, 6rem); padding-bottom: clamp(2.5rem, 7vw, 6rem); overflow: hidden; }
.colstar-hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.04; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 1.25rem; }
.colstar-hero .colstar-lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--wp--preset--color--muted); max-width: 34rem; }
.colstar-star { margin: 0; position: relative; isolation: isolate; }
.colstar-star::before { content: ""; position: absolute; inset: -12%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--wp--custom--blue), .5), rgba(var(--wp--custom--glow), .18) 62%, transparent); } /* cheap glow, no heavy blur filter */
.colstar-star img { width: 100%; max-width: 440px; height: auto; margin-inline: auto; display: block; }

/* ---------- Game cards ---------- */
.colstar-card { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line);
  border-radius: 14px; overflow: hidden; height: 100%; transition: border-color .2s ease; }
.colstar-card:hover { border-color: var(--wp--preset--color--accent); }
.colstar-card .wp-block-post-featured-image { margin: 0; }
.colstar-card .wp-block-post-featured-image img { width: 100%; display: block; }
.colstar-card-body { padding: 1.1rem 1.25rem 1.4rem; }
.colstar-card-body .wp-block-post-title { margin: 0 0 .4rem; }
.colstar-card-body .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.colstar-card-body .wp-block-post-excerpt { color: var(--wp--preset--color--muted); margin: 0; }

/* ---------- Panels (about / follow) ---------- */
.colstar-panel { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line);
  border-radius: 18px; padding: clamp(1.5rem, 4vw, 3rem); }

/* ---------- Buttons ---------- */
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--wp--preset--color--accent);
  border: 2px solid var(--wp--preset--color--accent); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--base); }

/* ---------- Social icons ---------- */
.wp-block-social-links.is-style-logos-only .wp-social-link { color: var(--wp--preset--color--accent); }

/* ---------- Focus visibility ---------- */
a:focus-visible, .wp-block-button__link:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 3px; }

/* ---------- Mobile menu ---------- */
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); }

/* =========================================================
   MOTION
   All animation is switched off for visitors who prefer
   reduced motion (see the very bottom of this file).
   ========================================================= */

/* ---- Smooth page-to-page transitions (modern browsers) ---- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 220ms ease both colstar-fade-out; }
::view-transition-new(root) { animation: 320ms ease both colstar-fade-in; }
@keyframes colstar-fade-out { to { opacity: 0; } }
@keyframes colstar-fade-in { from { opacity: 0; } }

/* ---- Sticky, frosted header ---- */
body:not(.editor-styles-wrapper) header.wp-block-template-part {
  position: sticky; top: 0; z-index: 50;
  background: rgba(var(--wp--custom--shade), 0.96);
  view-transition-name: site-header;
}
body.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { body.admin-bar header.wp-block-template-part { top: 46px; } }
.colstar-header .wp-block-site-logo img { transition: transform .5s cubic-bezier(.3,1.6,.5,1); }
.colstar-header .wp-block-site-title:hover ~ *, .colstar-header .wp-block-site-logo:hover img { transform: rotate(72deg) scale(1.08); }

/* Nav links: cyan underline slides in */
.wp-block-navigation .wp-block-navigation-item__content { position: relative; text-decoration: none; transition: color .2s; }
.wp-block-navigation .wp-block-navigation-item__content::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--wp--preset--gradient--colstar); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--accent); }
.wp-block-navigation .wp-block-navigation-item__content:hover::after { transform: scaleX(1); }

/* ---- Twinkling starfield behind everything ---- */
body:not(.editor-styles-wrapper)::before, body:not(.editor-styles-wrapper)::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
body:not(.editor-styles-wrapper)::before {
  background-image:
    radial-gradient(1.5px 1.5px at 8% 18%, #fff, transparent), radial-gradient(1px 1px at 22% 62%, #cfeaff, transparent),
    radial-gradient(1.5px 1.5px at 37% 12%, #fff, transparent), radial-gradient(1px 1px at 51% 78%, #9fe9ff, transparent),
    radial-gradient(2px 2px at 66% 30%, #fff, transparent), radial-gradient(1px 1px at 78% 70%, #cfeaff, transparent),
    radial-gradient(1.5px 1.5px at 90% 14%, #fff, transparent), radial-gradient(1px 1px at 95% 88%, #9fe9ff, transparent);
  animation: colstar-twinkle 5s ease-in-out infinite alternate; will-change: opacity;
}
body:not(.editor-styles-wrapper)::after {
  background-image:
    radial-gradient(1px 1px at 14% 42%, #fff, transparent), radial-gradient(2px 2px at 29% 86%, #9fe9ff, transparent),
    radial-gradient(1px 1px at 44% 38%, #cfeaff, transparent), radial-gradient(1.5px 1.5px at 59% 8%, #fff, transparent),
    radial-gradient(1px 1px at 72% 52%, #fff, transparent), radial-gradient(1.5px 1.5px at 84% 36%, #9fe9ff, transparent),
    radial-gradient(1px 1px at 4% 90%, #cfeaff, transparent), radial-gradient(1px 1px at 98% 48%, #fff, transparent);
  animation: colstar-twinkle 7s ease-in-out -3s infinite alternate; will-change: opacity;
}
@keyframes colstar-twinkle { from { opacity: calc(.15 * var(--wp--custom--stars)); } to { opacity: calc(.9 * var(--wp--custom--stars)); } }
@media (max-width: 782px), (hover: none) { body:not(.editor-styles-wrapper)::before, body:not(.editor-styles-wrapper)::after { animation: none; will-change: auto; opacity: calc(.5 * var(--wp--custom--stars)); } }

/* ---- Hero: staggered entrance, floating star, drifting glow ---- */
.colstar-hero { position: relative; }
.colstar-hero::before {
  content: ""; position: absolute; width: 640px; height: 640px; right: -6%; top: 50%; margin-top: -320px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--wp--custom--blue), .38), transparent);
  animation: colstar-drift 14s ease-in-out infinite alternate; will-change: transform;
}
@keyframes colstar-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, 30px) scale(1.15); } }

.colstar-hero h1, .colstar-hero .colstar-lede, .colstar-hero .wp-block-buttons { animation: colstar-rise .8s cubic-bezier(.2,.8,.2,1) both; }
.colstar-hero .colstar-lede { animation-delay: .15s; }
.colstar-hero .wp-block-buttons { animation-delay: .3s; }
@keyframes colstar-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

.colstar-hero .colstar-star { animation: colstar-pop 1s cubic-bezier(.2,1.3,.4,1) .2s both; }
.colstar-hero .colstar-star img { animation: colstar-float 6s ease-in-out 1.2s infinite; will-change: transform; }
@keyframes colstar-pop { from { opacity: 0; transform: scale(.6) rotate(-14deg); } to { opacity: 1; transform: none; } }
@keyframes colstar-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(2.5deg); } }
@keyframes colstar-pulse {
  from { filter: drop-shadow(0 0 30px rgba(var(--wp--custom--glow), .25)) drop-shadow(0 0 90px rgba(var(--wp--custom--blue), .35)); }
  to   { filter: drop-shadow(0 0 55px rgba(var(--wp--custom--glow), .55)) drop-shadow(0 0 140px rgba(var(--wp--custom--blue), .6)); }
}

/* ---- Scroll reveal (class is added by assets/js/colstar.js) ---- */
.colstar-reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0ms); }
.colstar-reveal.is-visible { opacity: 1; transform: none; }

/* ---- Cards: lift, glow, image zoom ---- */
.colstar-card { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .2s ease; }
.colstar-card:hover { transform: translateY(-8px); box-shadow: 0 18px 50px -12px rgba(var(--wp--custom--glow), .35), 0 0 0 1px rgba(var(--wp--custom--glow), .5); }
.colstar-card .wp-block-post-featured-image { overflow: hidden; }
.colstar-card .wp-block-post-featured-image img { transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .4s ease; }
.colstar-card:hover .wp-block-post-featured-image img { transform: scale(1.08); filter: saturate(1.2) brightness(1.08); }
.colstar-card .wp-block-post-title a { background: var(--wp--preset--gradient--colstar); -webkit-background-clip: text; background-clip: text; background-size: 0% 100%; background-repeat: no-repeat; transition: background-size .4s ease, color .3s; }
.colstar-card:hover .wp-block-post-title a { color: transparent; background-size: 100% 100%; }

/* ---- Buttons: lift + shine sweep ---- */
.wp-block-button__link { position: relative; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, background-color .25s, color .25s; }
.wp-block-button__link:hover { transform: translateY(-3px); box-shadow: 0 10px 28px -6px rgba(var(--wp--custom--glow), .55); }
.wp-block-button__link:active { transform: translateY(0) scale(.97); }
.wp-block-button__link::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg);
}
.wp-block-button__link:hover::after { left: 130%; transition: left .7s ease; }

/* ---- Panels + social icons ---- */
.colstar-panel { transition: border-color .3s, box-shadow .3s; }
.colstar-panel:hover { border-color: rgba(var(--wp--custom--glow), .45); box-shadow: 0 0 60px -20px rgba(var(--wp--custom--glow), .4); }
.wp-block-social-links .wp-social-link { transition: transform .3s cubic-bezier(.3,1.8,.5,1), color .2s; }
.wp-block-social-links .wp-social-link:hover { transform: translateY(-5px) scale(1.2) rotate(-6deg); color: var(--wp--preset--color--contrast); }

/* ---- Respect reduced-motion settings ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .colstar-reveal { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}

/* ---- Smooth slide to on-page sections ---- */
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; } /* room for the sticky header */

/* ---- Menu link for the section currently in view ---- */
.wp-block-navigation a.is-current { color: var(--wp--preset--color--accent); }
.wp-block-navigation a.is-current::after { transform: scaleX(1); }

/* =========================================================
   WOW LAYER: neon, synthwave, arcade
   ========================================================= */
html, body { overflow-x: clip; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* Scroll progress bar */
.colstar-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 9999; pointer-events: none;
  background: var(--wp--preset--gradient--colstar); box-shadow: 0 0 14px var(--wp--preset--color--accent); transform: scaleX(0); transform-origin: left; }

/* Arcade eyebrow labels */
.colstar-eyebrow { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; font-size: .85rem;
  letter-spacing: .3em; text-transform: uppercase; color: var(--wp--preset--color--accent); margin-top: 0; margin-bottom: .6rem; text-shadow: 0 0 14px rgba(var(--wp--custom--glow), calc(.7 * var(--wp--custom--glowk))); }
.colstar-eyebrow::after { content: "_"; margin-left: .15em; animation: colstar-blink 1s steps(1) infinite; }
@keyframes colstar-blink { 50% { opacity: 0; } }

/* Neon headline */
.colstar-hero h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: 1.02; text-shadow: 0 0 40px rgba(var(--wp--custom--blue), calc(.45 * var(--wp--custom--glowk))); }
.colstar-hero h1 mark { background-image: linear-gradient(100deg, var(--wp--preset--color--accent) 0%, var(--wp--custom--mid) 30%, var(--wp--custom--shine) 50%, var(--wp--custom--mid) 70%, var(--wp--preset--color--accent) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
@keyframes colstar-shine { to { background-position: -250% 0; } }

/* Section headings get a glowing bar */
.colstar-section .wp-block-heading { font-size: clamp(2rem, 5vw, 3.2rem); }
.colstar-section .wp-block-heading::after { content: ""; display: block; width: 84px; height: 5px; margin-top: .8rem; border-radius: 5px;
  background: var(--wp--preset--gradient--colstar); box-shadow: 0 0 20px var(--wp--preset--color--accent); }
.has-text-align-center.wp-block-heading::after { margin-inline: auto; }

/* Banner: the same tilted neon band, completely still (no animation, so no lag). */
.colstar-marquee { overflow: hidden; background: var(--wp--preset--gradient--colstar); transform: rotate(-1.4deg) scale(1.04);
  margin: 1.75rem 0 3rem !important; padding: .85rem 1rem; box-shadow: 0 0 60px rgba(var(--wp--custom--glow), .35), 0 0 0 1px rgba(255, 255, 255, .15) inset; }
.colstar-marquee p { margin: 0; text-align: center; color: var(--wp--preset--color--base); font-weight: 700; font-size: clamp(.7rem, 1.5vw, 1.05rem);
  line-height: 1.7; letter-spacing: .24em; text-transform: uppercase; }

/* Game cards: spinning neon border, tilt glare, "view game" slide-up */
.colstar-card { position: relative; transform-style: preserve-3d; will-change: transform; }
.colstar-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: conic-gradient(from var(--a), transparent 0 55%, var(--wp--preset--color--accent), var(--wp--preset--color--primary), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  }
.colstar-card:hover::before { opacity: 1; animation: colstar-spin 2.6s linear infinite; } /* only spins while hovered */
@keyframes colstar-spin { to { --a: 360deg; } }
.colstar-card::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .16), transparent 55%); }
.colstar-card:hover::after { opacity: 1; }
.colstar-card .wp-block-post-featured-image { position: relative; }
.colstar-card .wp-block-post-featured-image::after { content: "▶ View game"; position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .8rem .8rem; text-align: center;
  font: 700 .8rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .25em; text-transform: uppercase; color: var(--wp--preset--color--accent);
  background: linear-gradient(transparent, rgba(var(--wp--custom--shade), .92)); transform: translateY(101%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.colstar-card:hover .wp-block-post-featured-image::after { transform: none; }

/* Arcade buttons: gradient + hard pixel shadow that "presses" */
.wp-block-button:not(.is-style-outline) .wp-block-button__link { background-image: var(--wp--preset--gradient--colstar); box-shadow: 4px 4px 0 var(--wp--preset--color--primary); border-radius: 8px; }
.wp-block-button.is-style-outline .wp-block-button__link { box-shadow: 4px 4px 0 rgba(var(--wp--custom--glow), .35); border-radius: 8px; }
.wp-block-button__link:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--wp--preset--color--primary), 0 0 30px rgba(var(--wp--custom--glow), .6); }
.wp-block-button__link:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--wp--preset--color--primary); }

/* About: glowing panel + stats */
.colstar-panel { position: relative; background: linear-gradient(160deg, rgba(var(--wp--custom--blue), .16), var(--wp--preset--color--surface) 45%); }
.colstar-stats { margin-top: 2rem; gap: 1rem; }
.colstar-stat-num { margin: 0; font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 700; line-height: 1;
  background: var(--wp--preset--gradient--colstar); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px rgba(var(--wp--custom--glow), calc(.45 * var(--wp--custom--glowk)))); }
.colstar-stat-label { margin: .3rem 0 0; color: var(--wp--preset--color--muted); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }

/* Contact: big glowing call-to-action */
.colstar-cta { text-align: center; border-radius: 24px; padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem);
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--wp--custom--blue), .35), transparent 65%), var(--wp--preset--color--surface);
  border: 1px solid rgba(var(--wp--custom--glow), .35); box-shadow: 0 0 80px -10px rgba(var(--wp--custom--blue), .5), 0 0 0 1px rgba(255, 255, 255, .04) inset; }
.colstar-cta .wp-block-social-links { justify-content: center; }

@media (prefers-reduced-motion: reduce) { .colstar-progress { transition: none; } }

/* ---- Genre image tiles in About ---- */
.colstar-genres { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-top: 1.75rem; }
.colstar-genre { position: relative; margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--wp--preset--color--line); }
.colstar-genre img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.colstar-genre:hover img { transform: scale(1.05); }
.colstar-genre figcaption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 2.2rem 1rem .85rem; font-weight: 700; font-size: 1.05rem;
  color: var(--wp--preset--color--contrast); text-align: left; background: linear-gradient(transparent, rgba(var(--wp--custom--shade), .92)); }

/* Centred eyebrow: cancel the trailing letter-spacing + blinking cursor so it sits dead centre */
.colstar-eyebrow.has-text-align-center { padding-left: 1.2em; }

/* =========================================================
   GAME PAGE
   Big cover > info strip > about > screenshot carousel > trailer
   ========================================================= */
.colstar-wide { max-width: var(--wp--style--global--wide-size, 1180px); margin-left: auto; margin-right: auto; padding-left: clamp(1rem, 4vw, 2rem); padding-right: clamp(1rem, 4vw, 2rem); }
.colstar-block { padding-top: clamp(1.5rem, 4vw, 3rem); padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.colstar-game-h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 1.2rem; }
.colstar-game-h2::after { content: ""; display: block; width: 84px; height: 5px; margin-top: .7rem; border-radius: 5px; background: var(--wp--preset--gradient--colstar); box-shadow: 0 0 20px var(--wp--preset--color--accent); }

/* Cover: big, sharp, full width, title sits on the bottom of it */
.colstar-game-hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(380px, 68vh, 720px); overflow: hidden; background: linear-gradient(135deg, rgba(var(--wp--custom--blue), .33), var(--wp--preset--color--surface)); }
.colstar-game-hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; animation: colstar-zoom 14s ease-out both; }
@keyframes colstar-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.colstar-game-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(var(--wp--custom--shade), 0) 35%, rgba(var(--wp--custom--shade), var(--wp--custom--veil)) 78%, var(--wp--preset--color--base) 100%); }
.colstar-game-hero__text { width: 100%; padding-top: 6rem; padding-bottom: clamp(4.5rem, 9vw, 6.5rem); }
.colstar-game-hero__text > * { animation: colstar-rise .8s cubic-bezier(.2,.8,.2,1) both; }
.colstar-game-hero__text > *:nth-child(2) { animation-delay: .12s; } .colstar-game-hero__text > *:nth-child(3) { animation-delay: .24s; }
.colstar-game-title { margin: 0 0 .5rem; font-size: clamp(2.6rem, 8vw, 5.8rem); line-height: 1; text-shadow: 0 4px 40px rgba(var(--wp--custom--shade), .9), 0 0 50px rgba(var(--wp--custom--blue), calc(.5 * var(--wp--custom--glowk))); }
.colstar-game-hero .colstar-lede { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--wp--preset--color--contrast); max-width: 40rem; margin: 0; text-shadow: 0 2px 20px rgba(var(--wp--custom--shade), .95); }

/* Cover that already contains the title: show the whole picture, framed, over a soft blurred copy of itself */
.colstar-game-hero.is-poster { display: block; min-height: 0; background: none; padding-top: clamp(1rem, 3vw, 2rem); padding-bottom: .5rem; }
.colstar-game-hero.is-poster::after { background: linear-gradient(180deg, rgba(var(--wp--custom--shade), .25), var(--wp--preset--color--base) 100%); }
.colstar-game-hero__bg { position: absolute; z-index: -2; left: -40px; top: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(42px) saturate(1.25); opacity: .6; }
.colstar-game-hero__poster { display: block; width: 100%; height: auto; border-radius: 22px; border: 1px solid rgba(var(--wp--custom--glow), .45); animation: colstar-pop 1s cubic-bezier(.2,1.3,.4,1) both;
  box-shadow: 0 0 90px -10px rgba(var(--wp--custom--blue), .6), 0 30px 70px -25px rgba(var(--wp--custom--shadow), .9); }
.colstar-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.colstar-game-info.is-flat { margin-top: 1.2rem; }

/* Info strip, overlapping the bottom of the cover */
.colstar-game-info { position: relative; z-index: 2; margin-top: -3.2rem; display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem clamp(1.2rem, 3vw, 2.5rem); align-items: center;
  padding: 1.3rem clamp(1.1rem, 3vw, 2rem); border-radius: 20px; border: 1px solid rgba(var(--wp--custom--glow), .4);
  background: linear-gradient(160deg, rgba(var(--wp--custom--blue), .22), rgba(var(--wp--custom--panel), .96) 55%);
  box-shadow: 0 0 70px -12px rgba(var(--wp--custom--blue), .6), 0 20px 50px -20px rgba(var(--wp--custom--shadow), .9); }
.colstar-countdown__label { margin: 0; font: 700 .75rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .25em; text-transform: uppercase; color: var(--wp--preset--color--accent); }
.colstar-countdown__date { margin: .5rem 0 0; font-size: .85rem; color: var(--wp--preset--color--muted); }
.colstar-countdown__grid { display: flex; gap: .5rem; margin-top: .5rem; }
.colstar-countdown__grid > div { min-width: 4.2rem; padding: .55rem .4rem .45rem; text-align: center; border-radius: 10px; background: rgba(var(--wp--custom--shade), .7); border: 1px solid rgba(var(--wp--custom--glow), .3); }
.colstar-countdown__grid span { display: block; font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; background: var(--wp--preset--gradient--colstar); -webkit-background-clip: text; background-clip: text; color: transparent; }
.colstar-countdown__grid small { display: block; margin-top: .25rem; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.colstar-countdown.is-live .colstar-countdown__grid { display: none; }
.colstar-release-line { margin: .15rem 0 0; font-weight: 800; font-size: 1.5rem; line-height: 1.2; }
.colstar-game-info__facts { margin: 0; display: flex; flex-wrap: wrap; gap: .8rem clamp(1.2rem, 3vw, 2.4rem); padding-left: clamp(1.2rem, 3vw, 2.5rem); border-left: 1px solid var(--wp--preset--color--line); }
.colstar-game-info__facts dt { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.colstar-game-info__facts dd { margin: .1rem 0 0; font-weight: 700; }
.colstar-store-buttons { display: flex; flex-wrap: wrap; gap: .8rem 1rem; margin: 0; }
.colstar-store-soon { margin: 0; color: var(--wp--preset--color--muted); }

/* About text */
.colstar-game-content > :first-child { margin-top: 0; }
.colstar-game-content h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.colstar-game-content { font-size: 1.12rem; }

/* Screenshot carousel */
.colstar-carousel { position: relative; }
.colstar-carousel__track { list-style: none; margin: 0; padding: .4rem 0 .8rem; display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; border-radius: 16px; }
.colstar-carousel__track::-webkit-scrollbar { display: none; }
.colstar-carousel__track:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 4px; }
.colstar-carousel__slide { flex: 0 0 82%; margin: 0; scroll-snap-align: center; }
.colstar-carousel__slide a { display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--wp--preset--color--line); cursor: zoom-in; transition: border-color .25s, box-shadow .35s; }
.colstar-carousel__slide a:hover { border-color: var(--wp--preset--color--accent); box-shadow: 0 0 40px -8px rgba(var(--wp--custom--glow), .55); }
.colstar-carousel__slide img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cc-btn { position: absolute; top: calc(50% - 1.2rem); z-index: 2; width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 1px solid rgba(var(--wp--custom--glow), .5); background: rgba(var(--wp--custom--shade), .85); color: var(--wp--preset--color--contrast);
  font-size: 1.8rem; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, color .2s, transform .2s, opacity .2s; }
.cc-btn:hover { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--base); transform: scale(1.08); }
.cc-prev { left: .8rem; } .cc-next { right: .8rem; }
.cc-btn[disabled] { opacity: 0; pointer-events: none; }
.cc-dots { display: flex; justify-content: center; gap: .5rem; margin-top: .3rem; }
.cc-dots button { width: .7rem; height: .7rem; padding: 0; border-radius: 50%; border: 0; background: var(--wp--preset--color--line); cursor: pointer; transition: background .2s, transform .2s, width .2s; }
.cc-dots button.is-active { width: 2rem; border-radius: 1rem; background: var(--wp--preset--gradient--colstar); box-shadow: 0 0 12px var(--wp--preset--color--accent); }
.colstar-carousel.is-single .cc-btn, .colstar-carousel.is-single .cc-dots { display: none; }
.colstar-carousel.is-single .colstar-carousel__slide { flex-basis: 100%; }

/* Trailer: big and wide, at the bottom */
.colstar-trailer { position: relative; border-radius: 20px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; border: 1px solid rgba(var(--wp--custom--glow), .4); box-shadow: 0 0 90px -15px rgba(var(--wp--custom--blue), .65); }
.colstar-trailer iframe, .colstar-trailer video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.colstar-trailer figure, .colstar-trailer .wp-block-embed__wrapper { position: static; margin: 0; }
.colstar-trailer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.colstar-back-wrap { margin: 2rem 0 0; }
.colstar-back { text-decoration: none; font-weight: 700; }

@media (max-width: 900px) {
  .colstar-game-info { grid-template-columns: 1fr; }
  .colstar-game-info__facts { padding-left: 0; border-left: 0; padding-top: 1rem; border-top: 1px solid var(--wp--preset--color--line); }
  .colstar-carousel__slide { flex-basis: 90%; }
  .cc-btn { width: 2.6rem; height: 2.6rem; font-size: 1.5rem; }
}
@media (max-width: 480px) { .colstar-countdown__grid > div { min-width: 0; flex: 1; } }

/* Lightbox for screenshots */
.colstar-lightbox { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 3rem 1rem; background: rgba(var(--wp--custom--shade), .94); }
.colstar-lightbox img { max-width: min(100%, 1400px); max-height: 100%; border-radius: 10px; box-shadow: 0 0 80px -10px rgba(var(--wp--custom--blue), .6); }
.colstar-lightbox button { position: absolute; border: 1px solid rgba(var(--wp--custom--glow), .4); background: rgba(var(--wp--custom--panel), .9); color: var(--wp--preset--color--contrast); border-radius: 50%; width: 3rem; height: 3rem; font-size: 1.5rem; cursor: pointer; line-height: 1; }
.colstar-lightbox button:hover { border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--accent); }
.colstar-lightbox .lb-close { top: 1rem; right: 1rem; } .colstar-lightbox .lb-prev { left: 1rem; } .colstar-lightbox .lb-next { right: 1rem; }
.colstar-lightbox .lb-prev, .colstar-lightbox .lb-next { top: 50%; transform: translateY(-50%); }

/* Whole game card is clickable, not just the picture and title */
.colstar-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; z-index: 4; }


/* =========================================================
   LIGHT / DARK SWITCH (visitor's choice, remembered in their browser)
   The colours below must match theme.json (dark) and styles/light.json (light).
   ========================================================= */
html[data-colstar="dark"], html[data-colstar="dark"] body {
  --wp--preset--color--base: #020c1f; --wp--preset--color--surface: #07152e; --wp--preset--color--line: #0d2a52; --wp--preset--color--contrast: #eaf3ff;
  --wp--preset--color--muted: #9db4d3; --wp--preset--color--accent: #0de8fe; --wp--preset--color--primary: #006ffe;
  --wp--preset--gradient--colstar: linear-gradient(135deg, #0de8fe 0%, #006ffe 100%);
  --wp--custom--glow: 13, 232, 254; --wp--custom--blue: 0, 111, 254; --wp--custom--shade: 2, 12, 31; --wp--custom--panel: 7, 21, 46; --wp--custom--shadow: 0, 0, 0;
  --wp--custom--stars: 1; --wp--custom--glowk: 1; --wp--custom--veil: .78; --wp--custom--mid: #4da3ff; --wp--custom--shine: #ffffff; --wp--custom--mode: dark;
}
html[data-colstar="light"], html[data-colstar="light"] body {
  --wp--preset--color--base: #ffffff; --wp--preset--color--surface: #f1f6fe; --wp--preset--color--line: #d3e0f3; --wp--preset--color--contrast: #0a1b36;
  --wp--preset--color--muted: #4a6082; --wp--preset--color--accent: #006ffe; --wp--preset--color--primary: #0043c8;
  --wp--preset--gradient--colstar: linear-gradient(135deg, #0b7bff 0%, #0039b8 100%);
  --wp--custom--glow: 0, 111, 254; --wp--custom--blue: 0, 111, 254; --wp--custom--shade: 255, 255, 255; --wp--custom--panel: 255, 255, 255; --wp--custom--shadow: 30, 60, 120;
  --wp--custom--stars: 0; --wp--custom--glowk: .15; --wp--custom--veil: .92; --wp--custom--mid: #0a4fd1; --wp--custom--shine: #4da3ff; --wp--custom--mode: light;
}
html[data-colstar] body { background-color: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); }

/* The button (only shown when JavaScript is on, since it needs it) */
.colstar-header-right { gap: .9rem; }
.colstar-mode-toggle { display: none; align-items: center; justify-content: center; flex: none; width: 2.6rem; height: 2.6rem; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--wp--preset--color--line); background: transparent; color: var(--wp--preset--color--contrast); transition: border-color .2s, color .2s, box-shadow .3s, transform .3s; }
html.colstar-js .colstar-mode-toggle { display: inline-flex; }
.colstar-mode-toggle:hover { border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--accent); box-shadow: 0 0 18px -2px rgba(var(--wp--custom--glow), .55); transform: rotate(18deg); }
.colstar-mode-toggle .i-moon { display: none; }
html[data-colstar-now="light"] .colstar-mode-toggle .i-sun { display: none; }
html[data-colstar-now="light"] .colstar-mode-toggle .i-moon { display: block; }
html.colstar-fading, html.colstar-fading *, html.colstar-fading *::before, html.colstar-fading *::after { transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease !important; }
@media (prefers-reduced-motion: reduce) { .colstar-mode-toggle { transition: none; } .colstar-mode-toggle:hover { transform: none; } }
