/* ============================================
   giddy.games — stylesheet
   ============================================ */

:root {
  --bg: #fbf8ff;
  --surface: #ffffff;
  --ink: #17122a;
  --muted: #6b6483;
  --line: #eae4f7;
  --violet: #7c3aed;
  --pink: #ec4899;
  --amber: #f59e0b;
  --green: #10b981;
  --blue: #3b82f6;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(23, 18, 42, .06), 0 4px 12px rgba(23, 18, 42, .04);
  --shadow-md: 0 8px 24px rgba(23, 18, 42, .10), 0 2px 6px rgba(23, 18, 42, .05);
  --shadow-lg: 0 20px 48px rgba(124, 58, 237, .18);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-narrow { max-width: 760px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--violet);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(23, 18, 42, .05);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.02em;
  flex: none;
}
.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  box-shadow: 0 4px 12px rgba(124, 58, 237, .35);
  position: relative;
  transform: rotate(-8deg);
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
  opacity: .9;
}
.logo-tld { color: var(--muted); font-weight: 600; }
.logo-sm { font-size: 17px; }

.nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); background: rgba(124, 58, 237, .07); }

.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  height: 40px;
  width: 240px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within {
  border-color: rgba(124, 58, 237, .5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}
.search svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  flex: none;
}
.search input {
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 14.5px;
  width: 100%;
  color: var(--ink);
}
.search input::placeholder { color: #a9a2bd; }

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.menu-btn span {
  width: 16px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s var(--ease), opacity .2s;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: 56px;
  padding-top: 66px;
  padding-bottom: 66px;
}
.hero-copy { max-width: 660px; }

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(124, 58, 237, .08);
  color: var(--violet);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 800;
}
.grad {
  background: linear-gradient(100deg, var(--violet), var(--pink) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0 0 28px;
  font-size: 17.5px;
  color: var(--muted);
  max-width: 580px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #fff;
  box-shadow: 0 10px 24px rgba(124, 58, 237, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(124, 58, 237, .34); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: rgba(124, 58, 237, .35); }

/* ---------- hero: points + device visual ---------- */

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.hero-points li { display: inline-flex; align-items: center; gap: 7px; }
.hero-points span { font-size: 15px; }

.hero-visual { position: relative; }

.screen {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 16px;
  border-radius: 28px;
  background: linear-gradient(160deg, #ffffff, #f5efff);
  border: 1px solid var(--line);
  box-shadow:
    0 30px 70px rgba(124, 58, 237, .16),
    0 4px 14px rgba(23, 18, 42, .06);
}
.screen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: 100%;
}
.tile {
  display: grid;
  place-items: center;
  font-size: clamp(28px, 3.4vw, 44px);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--a), var(--b));
  box-shadow: inset 0 -24px 44px rgba(0, 0, 0, .14);
}
.screen-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.screen-play span {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 34px rgba(23, 18, 42, .28);
}
.screen-play svg { width: 26px; height: 26px; fill: var(--violet); margin-left: 4px; }

.chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.chip-1 { top: 7%; left: -28px; }
.chip-2 { top: 44%; right: -30px; }
.chip-3 { bottom: 6%; left: 12%; }

.hero-blob {
  position: absolute;
  right: -140px;
  top: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(236, 72, 153, .20), transparent 62%),
              radial-gradient(circle at 70% 60%, rgba(124, 58, 237, .18), transparent 60%);
  filter: blur(8px);
  z-index: 1;
}

/* ---------- sections ---------- */

.section { padding: 56px 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(124, 58, 237, .045), transparent); }

.section-head { margin-bottom: 26px; }
.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -.02em;
  font-weight: 800;
}
.section-head p { margin: 0; color: var(--muted); font-size: 15.5px; }
.count { color: var(--muted); font-size: 14px; }

/* ---------- categories ---------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), border-color .15s;
}
.cat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(124, 58, 237, .28); }
.cat[aria-pressed="true"] {
  border-color: rgba(124, 58, 237, .55);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}
.cat-emoji {
  font-size: 20px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(124, 58, 237, .07);
  flex: none;
}

/* ---------- filter row ---------- */

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -8px 0 20px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(124, 58, 237, .09);
  color: var(--violet);
  font-size: 13.5px;
  font-weight: 700;
}
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover { color: var(--violet); }

/* ---------- game grid ---------- */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  transition: transform .18s var(--ease), box-shadow .22s var(--ease), border-color .18s;
}
.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(124, 58, 237, .3);
  outline: none;
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  font-size: 44px;
  overflow: hidden;
}
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, .35), transparent 55%);
  pointer-events: none;
}
.thumb-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(23, 18, 42, .34);
  opacity: 0;
  transition: opacity .18s var(--ease);
}
.game-card:hover .thumb-play,
.game-card:focus-visible .thumb-play { opacity: 1; }
.thumb-play span {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  transform: scale(.9);
  transition: transform .18s var(--ease);
}
.game-card:hover .thumb-play span { transform: scale(1); }
.thumb-play svg {
  width: 20px;
  height: 20px;
  fill: var(--violet);
  margin-left: 3px;
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px 14px;
}
.game-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-tag {
  flex: none;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(23, 18, 42, .05);
  padding: 4px 8px;
  border-radius: 8px;
}

.card-soon {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(23, 18, 42, .55);
  backdrop-filter: blur(6px);
  padding: 4px 9px;
  border-radius: 999px;
}

.empty {
  margin: 10px 0 0;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 22px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .12), rgba(236, 72, 153, .12));
  margin-bottom: 14px;
}
.feature h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- faq ---------- */

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 18px;
  margin-bottom: 10px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;
  padding: 16px 0;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 600;
  color: var(--violet);
  transition: transform .2s var(--ease);
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14.5px;
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(124, 58, 237, .04));
  padding-top: 44px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.4fr 1fr;
  gap: 28px;
  padding-bottom: 32px;
}
.footer-brand p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.footer-col h4 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-col a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-size: 14.5px;
  padding: 4px 0;
  opacity: .85;
}
.footer-col a:hover { color: var(--violet); opacity: 1; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 24px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(23, 18, 42, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 80;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 46px;
    padding-bottom: 50px;
  }
  .hero-copy { max-width: none; }
  .hero-visual { width: 100%; max-width: 540px; margin: 0 auto; }
  .chip-1 { left: -10px; }
  .chip-2 { right: -10px; }
}

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .menu-btn { display: flex; }
  .nav.is-open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 8px;
    margin: 0;
    gap: 2px;
  }
  .nav.is-open a { padding: 12px 14px; font-size: 15px; }
  .search { width: 180px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .header-inner { height: 62px; gap: 12px; }
  .search { width: 100%; max-width: 190px; }
  .hero-inner { padding-top: 38px; padding-bottom: 42px; gap: 30px; }
  .hero-blob { width: 340px; height: 340px; right: -160px; top: -100px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-points { font-size: 13px; gap: 7px 14px; margin-top: 22px; }
  .chip { font-size: 11.5px; padding: 6px 10px; }
  .chip-1 { left: 0; top: 3%; }
  .chip-2 { right: 0; }
  .screen-play span { width: 60px; height: 60px; }
  .section { padding: 40px 0; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
  .cat { padding: 12px; font-size: 14px; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .thumb { font-size: 34px; }
  .game-meta { padding: 10px 12px 12px; }
  .game-title { font-size: 13.5px; }
  .game-tag { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .footer-bottom { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- content pages (privacy / terms) ---------- */

.page { padding: 52px 0 72px; }
.page h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -.03em;
  font-weight: 800;
}
.page .updated { margin: 0 0 30px; color: var(--muted); font-size: 14px; }

.prose h2 {
  margin: 30px 0 8px;
  font-size: 19px;
  letter-spacing: -.01em;
  font-weight: 800;
}
.prose p, .prose li { color: var(--muted); font-size: 15.5px; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--violet); }
.prose strong { color: var(--ink); }

@media (max-width: 640px) {
  .page { padding: 36px 0 56px; }
}
