:root {
  --joy-yellow: #fff59d;
  --joy-lime: #c5e1a5;
  --joy-mint: #a7ffeb;
  --joy-sky: #81d4fa;
  --joy-lavender: #b39ddb;
  --joy-coral: #ffab91;
  --joy-cream: #fffbf0;
  --joy-paper: #ffffff;
  --joy-ink: #2c2c2c;
  --joy-muted: #6b6b6b;
  --joy-border: #e8e0d4;
  --joy-radius: 1.25rem;
  --joy-shadow: 0 8px 24px rgba(80, 60, 40, 0.08);
  --joy-shadow-hover: 0 14px 36px rgba(80, 60, 40, 0.14);
  --max-width: 1200px;
  --font: 'Segoe UI', 'Nunito', 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--joy-cream);
  color: var(--joy-ink);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--joy-radius);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 251, 240, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--joy-border);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--joy-sky), var(--joy-lavender));
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 4px 10px rgba(129, 212, 250, 0.4);
}

.main-nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s;
}

.main-nav a:hover {
  background: var(--joy-yellow);
  transform: translateY(-2px);
}

.nav-cta {
  background: var(--joy-coral);
  color: #fff !important;
}

/* Hero */
.hero {
  padding: 4rem 1.5rem 3.5rem;
  background: linear-gradient(160deg, var(--joy-mint) 0%, var(--joy-yellow) 40%, var(--joy-cream) 100%);
  text-align: center;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -1px;
}

.hero h1 span {
  color: #4a7c59;
}

.hero p {
  font-size: 1.2rem;
  max-width: 620px;
  margin: 0 auto 2rem;
  color: var(--joy-muted);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--joy-shadow-hover);
}

.btn-primary {
  background: var(--joy-coral);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--joy-ink);
  border: 2px solid var(--joy-border);
}

.hero-visual {
  margin-top: 2.5rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-visual img {
  width: 100%;
  border-radius: 1.5rem;
  box-shadow: var(--joy-shadow-hover);
  object-fit: cover;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--joy-sky), var(--joy-lavender));
}

/* Section styles */
section {
  padding: 3.5rem 1.5rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--joy-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

/* Game grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.game-card {
  background: var(--joy-paper);
  border: 1px solid var(--joy-border);
  border-radius: var(--joy-radius);
  padding: 1.25rem;
  box-shadow: var(--joy-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.game-card:hover {
  transform: translateY(-6px) rotate(1deg);
  box-shadow: var(--joy-shadow-hover);
}

.game-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}

.game-card h3 {
  font-size: 1.15rem;
  margin: 0;
}

.game-card p {
  font-size: 0.92rem;
  color: var(--joy-muted);
  margin: 0;
  flex-grow: 1;
}

.game-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--joy-yellow);
  width: fit-content;
}

/* Mood categories */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.mood-card {
  background: var(--joy-paper);
  border-radius: var(--joy-radius);
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px solid var(--joy-border);
  box-shadow: var(--joy-shadow);
  transition: transform 0.2s;
}

.mood-card:hover {
  transform: scale(1.05);
}

.mood-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.mood-card h4 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
}

.mood-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--joy-muted);
}

/* Daily joy picks */
.daily-joy {
  background: linear-gradient(135deg, var(--joy-lavender), var(--joy-sky));
  border-radius: 2rem;
  padding: 3rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  color: #fff;
}

.daily-joy .section-title,
.daily-joy .section-subtitle {
  color: #fff;
}

.daily-joy .section-subtitle {
  opacity: 0.92;
}

.daily-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.daily-item {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: var(--joy-radius);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: background 0.2s, transform 0.2s;
}

.daily-item:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-4px);
}

.daily-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: #6b5b95;
  display: grid;
  place-items: center;
  font-weight: 900;
  flex-shrink: 0;
}

/* Puzzle corner */
.puzzle-corner {
  background: var(--joy-paper);
  border-top: 1px solid var(--joy-border);
  border-bottom: 1px solid var(--joy-border);
}

.puzzle-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  align-items: center;
}

.puzzle-image {
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--joy-shadow-hover);
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--joy-lime), var(--joy-mint));
}

.puzzle-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.puzzle-text h2 {
  font-size: 2rem;
  margin: 0 0 1rem;
}

.puzzle-text p {
  color: var(--joy-muted);
  margin: 0 0 1.5rem;
}

.puzzle-features {
  display: grid;
  gap: 0.8rem;
}

.puzzle-feature {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-weight: 600;
}

/* User moments */
.moments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.moment-card {
  background: var(--joy-paper);
  border-radius: var(--joy-radius);
  padding: 1.5rem;
  border: 1px solid var(--joy-border);
  box-shadow: var(--joy-shadow);
}

.moment-quote {
  font-size: 1.1rem;
  font-style: italic;
  margin: 0 0 1rem;
  line-height: 1.5;
}

.moment-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}

.moment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--joy-coral), var(--joy-yellow));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}

/* FAQ */
.faq {
  background: var(--joy-paper);
  border-top: 1px solid var(--joy-border);
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--joy-border);
  border-radius: var(--joy-radius);
  overflow: hidden;
  background: var(--joy-cream);
}

.faq-item summary {
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--joy-coral);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  padding: 0 1.25rem 1.25rem;
  margin: 0;
  color: var(--joy-muted);
}

/* Footer */
.site-footer {
  background: var(--joy-ink);
  color: #e5e5e5;
  padding: 3rem 1.5rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto 2rem;
}

.footer-col h5 {
  color: #fff;
  margin: 0 0 1rem;
  font-size: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-col a {
  color: #b8b8b8;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--joy-yellow);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  font-size: 0.85rem;
  color: #999;
  border-top: 1px solid #444;
  padding-top: 1.5rem;
}

/* Legal pages */
.legal-hero {
  background: linear-gradient(135deg, var(--joy-lavender), var(--joy-sky));
  color: #fff;
  padding: 3rem 1.5rem;
  text-align: center;
}

.legal-hero h1 {
  font-size: 2.4rem;
  margin: 0;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.legal-content h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
  color: #4a7c59;
}

.legal-content p,
.legal-content li {
  color: var(--joy-muted);
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content a {
  color: var(--joy-coral);
  text-decoration: underline;
}

.last-updated {
  font-size: 0.9rem;
  color: var(--joy-muted);
  margin-top: 2rem;
  font-style: italic;
}

/* Responsive */
@media (max-width: 800px) {
  .header-bar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .puzzle-layout {
    grid-template-columns: 1fr;
  }

  .puzzle-image {
    order: -1;
  }
}

@media (max-width: 500px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--joy-coral);
  outline-offset: 2px;
}

::selection {
  background: var(--joy-yellow);
  color: var(--joy-ink);
}
