/* ============================================================
   Puzzlica – Game Detail Page Stylesheet
   Loaded on /games/*.html in addition to style.css
   ============================================================ */

/* ── GAME HERO ───────────────────────────────────────────── */
.gp-hero {
  background: linear-gradient(135deg, var(--gp-from, #ff6b6b), var(--gp-to, #ffd93d));
  padding: clamp(4rem, 10vh, 6rem) 0 clamp(3rem, 7vh, 5rem);
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* ── Hero genre tags ──────────────────────────────────────── */
.gp-hero-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .9rem;
}
.gp-hero-tag {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.88);
  font-size: .77rem;
  font-weight: 700;
  padding: .22em .78em;
  border-radius: 50px;
  letter-spacing: .04em;
}

/* ── Hero tagline ─────────────────────────────────────────── */
.gp-tagline {
  font-size: clamp(.92rem, 2.5vw, 1.08rem);
  color: rgba(255,255,255,.68);
  max-width: 480px;
  margin: -.15rem auto 1.5rem;
  line-height: 1.62;
}

.gp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.12);
  pointer-events: none;
}

.gp-hero-inner {
  position: relative;
  z-index: 1;
}

.gp-icon {
  width: 120px; height: 120px;
  border-radius: 28px;
  margin: 0 auto 1.5rem;
  background: rgba(255,255,255,.18);
  border: 2px solid rgba(255,255,255,.25);
  box-shadow: 0 16px 48px rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.gp-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: .75rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.gp-platforms {
  display: flex;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 1rem;
}

.gp-platform-badge {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: .25em .85em;
  border-radius: 50px;
  letter-spacing: .04em;
}

.gp-rating {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  margin-bottom: 1.75rem;
  letter-spacing: .02em;
}
.gp-rating .stars { color: #ffe566; letter-spacing: .06em; }
.gp-rating .rating-count { color: rgba(255,255,255,.65); font-weight: 400; }

.gp-store-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.gp-store-badges .badge-link img { height: 44px; }

/* ── SCREENSHOTS ─────────────────────────────────────────── */
.gp-screenshots {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--surface);
  overflow: hidden;
}

.gp-screenshots h2 { margin-bottom: 1.75rem; color: var(--dark); }

.screenshots-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: .5rem .25rem 2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.15) transparent;
  -webkit-overflow-scrolling: touch;
}
.screenshots-scroll::-webkit-scrollbar { height: 5px; }
.screenshots-scroll::-webkit-scrollbar-track { background: transparent; }
.screenshots-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 4px; }

/* CSS phone mockup */
.phone-mockup {
  flex-shrink: 0;
  width: 168px;
  height: 298px;
  border-radius: 30px;
  border: 3px solid rgba(0,0,0,.14);
  background: var(--mock-bg, #eee);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,.15), inset 0 0 0 1px rgba(255,255,255,.3);
}

/* Status bar */
.phone-mockup::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 26px;
  background: rgba(0,0,0,.18);
  z-index: 3;
}

/* Home indicator */
.phone-mockup::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%; transform: translateX(-50%);
  width: 52px; height: 4px;
  border-radius: 3px;
  background: rgba(255,255,255,.45);
  z-index: 3;
}

/* Fake UI elements inside phone */
.mock-ui {
  position: absolute;
  inset: 26px 0 20px;
  overflow: hidden;
}

.mock-bar {
  position: absolute;
  border-radius: 6px;
  background: rgba(255,255,255,.3);
}
.mock-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
}
.mock-grid {
  position: absolute;
  top: 18px; left: 14px;
  display: grid;
  grid-template-columns: repeat(4, 28px);
  gap: 6px;
}
.mock-cell {
  width: 28px; height: 28px;
  border-radius: 6px;
}

/* Phone color themes per game */
.phone-color-maze { background: linear-gradient(160deg, #ff6b6b 0%, #ffd93d 100%); }
.phone-block-blast { background: linear-gradient(160deg, #6bcb77 0%, #4d96ff 100%); }
.phone-word-loops { background: linear-gradient(160deg, #c77dff 0%, #ff6b6b 100%); }

/* ── ABOUT THE GAME ──────────────────────────────────────── */
.gp-about {
  padding: clamp(4rem, 8vw, 6rem) 0;
  background: var(--bg);
}

.gp-about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.gp-about-text h2 { color: var(--dark); margin-bottom: 1rem; }
.gp-about-text p  { color: var(--muted); margin-bottom: 1rem; line-height: 1.75; }

.gp-feature-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.gp-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--dark);
}
.gp-feature-list li::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  background: linear-gradient(135deg, var(--gp-from, #ff6b6b), var(--gp-to, #ffd93d));
  color: #fff;
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 2px;
}

/* CSS device preview */
.gp-device {
  position: relative;
  width: 240px;
  height: 420px;
  margin: 0 auto;
  background: linear-gradient(160deg, var(--gp-from, #ff6b6b), var(--gp-to, #ffd93d));
  border-radius: 42px;
  border: 4px solid rgba(0,0,0,.12);
  box-shadow: 0 24px 60px rgba(0,0,0,.2), inset 0 0 0 2px rgba(255,255,255,.2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gp-device::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 30px;
  background: rgba(0,0,0,.2);
}
.gp-device::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 50%; transform: translateX(-50%);
  width: 60px; height: 4px;
  border-radius: 3px;
  background: rgba(255,255,255,.4);
}
.gp-device-label {
  color: rgba(255,255,255,.9);
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
  padding: 2rem;
  z-index: 1;
}

/* ── KEY FEATURES ────────────────────────────────────────── */
.gp-key-features {
  padding: clamp(4rem, 8vw, 6rem) 0;
  background: var(--surface);
}

.gp-key-features h2 { text-align: center; margin-bottom: 2.75rem; color: var(--dark); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gp-feature-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.gp-feature-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.gp-feature-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--gp-from, #ff6b6b), var(--gp-to, #ffd93d));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}
.gp-feature-item h4 { color: var(--dark); margin-bottom: .4rem; font-size: .95rem; }
.gp-feature-item p  { color: var(--muted); font-size: .85rem; line-height: 1.5; }

/* ── REVIEWS ─────────────────────────────────────────────── */
.gp-reviews {
  padding: clamp(4rem, 8vw, 6rem) 0;
  background: var(--bg);
}

.gp-reviews h2 { text-align: center; margin-bottom: 2.75rem; color: var(--dark); }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.review-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.review-card:hover { transform: translateY(-4px); }

.review-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.review-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gp-from, #ff6b6b), var(--gp-to, #ffd93d));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-family: 'Nunito', sans-serif;
  font-size: .9rem;
  color: #fff;
  flex-shrink: 0;
}

.review-meta { flex: 1; }
.review-name  { font-weight: 700; font-size: .9rem; color: var(--dark); }
.review-stars { color: #f5a623; font-size: .85rem; letter-spacing: .04em; }
.review-text  { color: var(--muted); font-size: .9rem; line-height: 1.65; font-style: italic; }

/* ── MORE GAMES ──────────────────────────────────────────── */
.gp-more-games {
  padding: clamp(3.5rem, 7vw, 5rem) 0;
  background: var(--surface);
}

.gp-more-games h2 { text-align: center; margin-bottom: 2rem; color: var(--dark); }

.more-games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.more-game-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
  border-left: 4px solid var(--accent-color, var(--red));
}
.more-game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.mgc-icon {
  width: 60px; height: 60px;
  border-radius: 15px;
  background: var(--icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.mgc-info h4 { color: var(--dark); font-size: 1rem; margin-bottom: .25rem; }
.mgc-info p  { color: var(--muted); font-size: .82rem; }
.mgc-arrow   { margin-left: auto; color: var(--accent-color, var(--red)); font-size: 1.2rem; font-weight: 700; flex-shrink: 0; }

/* ── DEMO / IFRAME SECTION ──────────────────────────────── */
/*
 * Used by games that have a web playable demo.
 * Place a .gp-demo section with:
 *   .demo-wrapper > .demo-frame (iframe) + .demo-cta
 */
.gp-demo {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--surface);
  overflow: hidden;
}
.gp-demo > .container > h2 {
  text-align: center;
  margin-bottom: .5rem;
  color: var(--dark);
}
.demo-subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-size: .95rem;
}

.demo-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 3.5rem;
}

/* Phone frame that wraps the iframe */
.demo-frame {
  position: relative;
  width: 360px;
  height: 640px;
  background: #1a1222;
  border-radius: 44px;
  border: 6px solid rgba(0,0,0,.28);
  box-shadow:
    0 32px 80px rgba(0,0,0,.25),
    0 0 0 1px rgba(255,255,255,.1),
    inset 0 0 0 2px rgba(255,255,255,.08);
  overflow: hidden;
  flex-shrink: 0;
}
/* Status bar */
.demo-frame::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 32px;
  background: rgba(0,0,0,.45);
  z-index: 10;
  pointer-events: none;
  border-radius: 40px 40px 0 0;
}
/* Home indicator */
.demo-frame::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 50%; transform: translateX(-50%);
  width: 60px; height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,.28);
  z-index: 10;
  pointer-events: none;
}
.demo-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Side CTA column */
.demo-cta {
  max-width: 300px;
  padding-top: 1.5rem;
}
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: linear-gradient(135deg, var(--gp-from), var(--gp-to));
  color: #fff;
  padding: .38em 1.1em;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: .04em;
}
.demo-cta h3 {
  color: var(--dark);
  font-size: 1.45rem;
  margin-bottom: .85rem;
  line-height: 1.3;
}
.demo-cta p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.72;
  margin-bottom: .9rem;
}
.demo-cta .gp-store-badges {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ── MORE GAMES — 3-column variant ──────────────────────── */
.more-games-grid--3,
.more-games-grid-3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 960px;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — GAME PAGES
══════════════════════════════════════════════════════════ */
@media (max-width: 920px) {
  .demo-wrapper { flex-direction: column; align-items: center; gap: 2rem; }
  .demo-frame   { width: 320px; height: 570px; }
  .demo-cta     { max-width: 100%; text-align: center; }
  .demo-cta .gp-store-badges { justify-content: center; }
}

@media (max-width: 900px) {
  .gp-about-inner { grid-template-columns: 1fr; gap: 3rem; }
  .gp-device { width: 200px; height: 350px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid  { grid-template-columns: repeat(2, 1fr); }
  .more-games-grid--3,
  .more-games-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .reviews-grid  { grid-template-columns: 1fr; }
  .more-games-grid { grid-template-columns: 1fr; }
  .gp-about-inner { gap: 2rem; }
  .gp-device { display: none; }
}

@media (max-width: 480px) {
  .demo-frame { width: 290px; height: 510px; }
}
