:root {
  --bg: #0b0b0c;
  --card: #141416;
  --text: #eaeaea;
  --muted: #a9a9b2;
  --line: #242428;
  --accent: #ffffff;
  --card-height: 400px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 18px 60px;
}

.gamesLayout{
  display: grid;
  grid-template-columns: 1fr 320px; /* left: games, right: news */
  gap: 18px;
  align-items: start;
}

/* On smaller screens, stack the news under the games */
@media (max-width: 980px){
  .gamesLayout{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px){
  .gamesGrid{
    grid-template-columns: 1fr;
  }
}


.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.6px;
}

.badge {
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.hero {
  padding: 26px 0 10px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: center;
  grid-template-columns: 1.2fr 0.8fr;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
}

h1 {
  margin: 0 0 10px;
  font-size: 42px;
  line-height: 1.1;
}

p { margin: 0 0 12px; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.ctaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 18px;     /* unified height */
  min-height: 44px;       /* guarantees same button height */
  line-height: 1;

  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f0f10;
  font-weight: 600;
}


.btn.primary {
  background: #ffffff;
  color: #0b0b0c;
  border-color: #ffffff;
}

.small {
  font-size: 13px;
  color: var(--muted);
}

img.heroImg {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: block;
}

.nav > div:last-child {
  flex: 0 0 auto;          /* don't let the logo container shrink */
  display: flex;
  align-items: center;
}

img.heroImg2{
  width: 44px;
  height: 44px;
  object-fit: contain;
}

@media (max-width: 420px){
  .brand{
    font-size: 14px;
    letter-spacing: 0.4px;
  }
  img.heroImg2{
    width: 38px;
    height: 38px;
  }
}

.gamesSection{
  margin-top: 22px;
}

.gamesHeader{
  margin-bottom: 14px;
}

.gamesTitle{
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
}

.gamesGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}



@media (min-width: 700px){
  .gamesGrid{
    grid-template-columns: 1fr 1fr; /* always 2 per row */
  }
}


/* When using explicit columns, you DON'T need grid-column spans */
.gameCard{
  display: flex;
  flex-direction: column;
  height: var(--card-height);
}

/* One card spans full width on small screens, half-ish on wide screens */
.gameCard{
  position: relative;
  /* overflow: hidden; */
  transition: transform .15s ease, border-color .15s ease;
}


.gameMedia{
  height: 190px;            /* tweak this: 150–190 depending on taste */
  overflow: hidden;
  border-radius: 14px;
  background: #0f0f10;      /* so "contain" has a nice backdrop */
  border: 1px solid var(--line);
}


.newsPanel{
  position: sticky;
  top: 18px;
  height: var(--card-height);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
}


.newsHeader{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.newsTitle{
  margin: 0;
  font-size: 18px;
}

.newsHint{
  margin: 0;
  opacity: .7;
}

.newsScroller{
  max-height: none;
  overflow: auto;
  padding-right: 6px;
  flex: 1;
}


/* Nice-looking items */
.newsItem{
  border: 1px solid var(--line);
  background: #0f0f10;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
}

.newsItemTitle{
  font-weight: 700;
  margin-bottom: 2px;
}

.newsItemMeta{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.newsItemBody{
  margin: 0;
  color: var(--muted);
}

.gameCard { --media-zoom: 1; }

.gameMedia img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(var(--media-zoom));
  transform-origin: center;
}

.gameBody{
  display: flex;
  flex-direction: column;
  flex: 1;
}

.gameTopRow{
  display:flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.gameName{
  margin: 0;
  font-size: 22px;
}

.statusPill{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #2d2d2d;
  background: rgba(255,255,255,.04);
  opacity: .9;
}

.gameTagline{
  margin: 10px 0 6px;
}

.gameDesc{
  margin: 0 0 12px;
  opacity: .85;
}

.tagRow{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tagPill{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #2d2d2d;
  background: rgba(255,255,255,.03);
  opacity: .9;
}

.gameActions{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top:auto;
}

.gameActions .btn {
  min-width: 110px;
}

/* Nice “card hover” like storefronts */
.gameCard:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.18);
}


/* Placeholder / Coming Soon card */
.comingSoon{
  position: relative;
  opacity: .92; /* keeps the card readable */
  --media-zoom: 1;
}

.comingSoon .gameMedia img{
  filter: grayscale(1) brightness(.75) contrast(.95);
  opacity: .8;
}

/* Dim the text slightly */
.comingSoon .gameBody{
  opacity: .75;
}

/* Optional: make buttons look disabled + unclickable */
.comingSoon .gameActions a{
  opacity: .55;
  pointer-events: none;
}

/* The diagonal “stamp” */
.comingSoon::after{
  content: "Happy Katz Pro - COMING SOON";
  position: absolute;
  left: -2%;
  top: 46%;
  width: 104%;
  text-align: center;

  padding: 10px 0;
  font-weight: 800;
  letter-spacing: .18em;
  font-size: 14px;

  color: rgba(255,255,255,.92);
  background: rgba(0,0,0,.45);
  border-top: 1px solid rgba(255,255,255,.18);
  border-bottom: 1px solid rgba(255,255,255,.18);

  transform: rotate(-12deg);
  z-index: 5;
  pointer-events: none;
}


/* --- Skeleton / blurred text placeholder --- */

.skeletonText span{
  display: block;
  height: 1em;                 /* thickness = “fat text” */
  margin: 0.45em 0;
  border-radius: 6px;

  background: linear-gradient(
    90deg,
    rgba(255,255,255,.18),
    rgba(255,255,255,.28),
    rgba(255,255,255,.18)
  );

  filter: blur(0.6px);
  opacity: .55;
}

.skeletonText span.short{
  width: 65%;
}


/* --- Redacted title --- */

.redacted{
  position: relative;
}

.redacted span{
  position: relative;
  color: transparent; /* keep text but hide it */
}

/* the “black bar” */
.redacted span::after{
  content: "";
  position: absolute;
  left: 0;
  top: 55%;                 /* aligns with text baseline */
  transform: translateY(-50%);

  width: 78%;               /* tweak to match left card title width */
  height: 0.9em;

  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,.18),
    rgba(255,255,255,.28),
    rgba(255,255,255,.18)
  );

  filter: blur(0.6px);
  opacity: .6;
}


body,html{ color:#fff; }

/* Loading label under STUDIOS */
#loading-text{
    margin-top: 1.2vh;
    font-size: clamp(14px, 2.8vw, 18px);
    letter-spacing: .25em;
    text-transform: uppercase;
    color: #ff69b4;
    opacity: .85;
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse{
    0%,100%{opacity:.45}
    50%{opacity:1}
}


/* Force 3 columns on phone landscape (override the <=980px stacking rule) */
/* Phone landscape: show 3 cards in one row (Game 1 | Game 2 | News) */
@media (orientation: landscape) and (max-width: 980px){
  :root{
    --card-height: 320px;
  }

  .wrap{
    padding-left: calc(12px + env(safe-area-inset-left));
    padding-right: calc(12px + env(safe-area-inset-right));
    max-width: none;   /* <-- key: stop desktop-style max width */
    width: 100%;
  }

  .hero{
    padding: 12px 0 6px;
    grid-template-columns: 1fr; /* keeps hero simpler in short height */
  }

  h1{
    font-size: 30px;
  }

.gamesLayout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}

    /* Make each card fill its grid column */
  .gameCard,
  .newsPanel{
    width: 100%;
    min-width: 0;
  }


  /* KEY LINE: make the two game cards become grid items */
  .gamesGrid{
    display: contents;
  }

  /* stop the inner 2-col game grid from interfering in this mode */
  .gamesGrid{
    grid-template-columns: none;
  }

  .gameMedia{
    height: 140px;
  }

  /* news becomes the 3rd column card */
  .newsPanel{
    position: static;
    top: auto;
    grid-column: 3;
  }
}

#splash, #ios-start { z-index: 9999; }



/* Make the splash fit on phones (portrait + landscape) */
@media (max-height: 520px){
  .screen{
    padding: 6vh 6vw 8vh;  /* reduce top/bottom padding */
    gap: 1.2vh;            /* tighter spacing */
  }

  #splash .logo-img{
    width: clamp(60px, 14vw, 110px); /* slightly smaller logo */
  }

  #loading-text{
    margin-top: .6vh;
    font-size: clamp(12px, 3.5vw, 16px);
  }
}

/* Always visible track + safe-area offset (Android + iPhone) */
#progressTrack{
  position:absolute;
  left:0; right:0;
  bottom: max(12px, env(safe-area-inset-bottom));
  height: 10px;
  background: rgba(255,105,180,.20);
  z-index: 300; /* above everything in the splash */
}

#progress{
  height: 100%;
  width: 0%;
  background: #ff69b4;
  transition: width .2s linear;
}

/* iOS overlay progress bar too */
#progress-ios{
  position:absolute;
  left:0; right:0;
  bottom: max(12px, env(safe-area-inset-bottom));
  height: 10px;
  width: 0%;
  background: #ff69b4;
  transition: width .2s linear;
}

.logo-container{
  position: relative;
  display: inline-block;
}

.logo-container img{
  width: clamp(70px, 15vw, 130px);
  filter: drop-shadow(0 0 16px rgba(255,0,200,.6));
}

.logo-img{
  display: block;                 /* IMPORTANT: removes baseline spacing issues */
  width: clamp(70px, 15vw, 130px);
  filter: drop-shadow(0 0 16px rgba(255,0,200,.6));
}

.logo-container .logo-img{
  display: block;                 /* avoids baseline spacing */
  position: relative;
  z-index: 1;                     /* force image below text */
  width: clamp(70px, 15vw, 130px);
  filter: drop-shadow(0 0 16px rgba(255,0,200,.6));
}

.logo-container .loading-text{
  position: absolute;
  inset: 0;
  z-index: 2;                     /* force text above image */
  display: grid;
  place-items: center;

  font-weight: 900;
  font-size: clamp(18px, 4.3vw, 42px);   /* slightly smaller than your titles */
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1;

  /* SAME LOOK AS .title */
  background: linear-gradient(45deg,#ff7ac8,#ff00d9,#ff6ec7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;  /* important for Safari/iOS */

  text-shadow: 0 0 20px rgba(255,0,200,.6);

  pointer-events: none;
  user-select: none;
}
