*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --sky-top: #4fc3f7;
  --sky-bottom: #81d4fa;
  --green-pipe: #4caf50;
  --green-dark: #388e3c;
  --gold: #ffc107;
  --gold-dark: #ff8f00;
  --text-dark: #1a237e;
  --text-light: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
  background: #e3f2fd;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(170deg, var(--sky-top) 0%, var(--sky-bottom) 60%, #a5d6a7 85%, #66bb6a 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120px 90px at 15% 25%, rgba(255,255,255,0.35), transparent),
    radial-gradient(ellipse 90px 70px at 75% 15%, rgba(255,255,255,0.25), transparent),
    radial-gradient(ellipse 140px 50px at 50% 10%, rgba(255,255,255,0.3), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 2rem 1.5rem;
}

.hero-icon {
  width: 140px;
  height: 140px;
  border-radius: 28px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-light);
  text-shadow: 0 3px 12px rgba(0,0,0,0.2);
  letter-spacing: -0.02em;
}

.hero .tagline {
  font-size: 1.35rem;
  color: rgba(255,255,255,0.92);
  margin: 0.75rem 0 2rem;
  font-weight: 500;
}

.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.btn-primary {
  background: #000;
  color: #fff;
}

.btn-primary svg {
  width: 22px;
  height: 22px;
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-dark);
  backdrop-filter: blur(8px);
}

/* ── Scrolling ground ── */
.ground-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 60px;
  background: repeating-linear-gradient(
    90deg,
    #66bb6a 0px, #66bb6a 48px,
    #5cb860 48px, #5cb860 96px
  );
  animation: scroll-ground 6s linear infinite;
  z-index: 1;
}

@keyframes scroll-ground {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Pipe decorations ── */
.pipe {
  position: absolute;
  width: 56px;
  background: linear-gradient(90deg, #66bb6a, var(--green-pipe), #66bb6a);
  border: 3px solid var(--green-dark);
  border-radius: 4px;
  z-index: 0;
  opacity: 0.3;
}

.pipe-top { top: 0; border-top: none; }
.pipe-bottom { bottom: 60px; border-bottom: none; }
.pipe-cap {
  position: absolute;
  left: -6px;
  width: calc(100% + 12px);
  height: 18px;
  background: linear-gradient(90deg, #5cb860, var(--green-pipe), #5cb860);
  border: 3px solid var(--green-dark);
  border-radius: 4px;
}
.pipe-top .pipe-cap { bottom: -2px; }
.pipe-bottom .pipe-cap { top: -2px; }

/* ── Section base ── */
section {
  padding: 5rem 1.5rem;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.section-subtitle {
  text-align: center;
  color: #546e7a;
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* ── Features ── */
.features {
  background: #fff;
}

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

.feature-card {
  background: #f8f9ff;
  border-radius: 18px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 2.8rem;
  margin-bottom: 0.75rem;
  display: block;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.feature-card p {
  font-size: 0.95rem;
  color: #546e7a;
}

/* ── How to play ── */
.how-to-play {
  background: linear-gradient(170deg, #e8f5e9 0%, #fff 100%);
}

.steps {
  display: flex;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.step {
  flex: 1;
  min-width: 220px;
  max-width: 280px;
  text-align: center;
}

.step-number {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--sky-top), #1e88e5);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.step h3 {
  margin-bottom: 0.4rem;
  color: var(--text-dark);
}

.step p {
  font-size: 0.95rem;
  color: #546e7a;
}

/* ── Game modes ── */
.game-modes {
  background: #fff;
}

.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.mode-card {
  background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
  border-radius: 16px;
  padding: 1.8rem;
  text-align: center;
}

.mode-card .mode-icon {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
  display: block;
}

.mode-card h3 {
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.mode-card p {
  font-size: 0.95rem;
  color: #546e7a;
}

/* ── Weather ── */
.weather {
  background: linear-gradient(170deg, #e1f5fe 0%, #fff 100%);
}

.weather-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.weather-badge {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--text-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.weather-badge span:first-child {
  font-size: 1.6rem;
}

/* ── Stats ── */
.stats {
  background: linear-gradient(135deg, var(--text-dark), #283593);
  color: #fff;
  text-align: center;
}

.stats .section-title {
  color: #fff;
}

.stats .section-subtitle {
  color: rgba(255,255,255,0.7);
}

.stats-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.stat-item {
  flex: 1;
  min-width: 140px;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
}

.stat-label {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

/* ── CTA ── */
.cta-section {
  background: linear-gradient(170deg, var(--sky-top) 0%, var(--sky-bottom) 100%);
  text-align: center;
  padding: 5rem 1.5rem;
}

.cta-section h2 {
  font-size: 2.4rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.cta-section p {
  color: rgba(255,255,255,0.9);
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

/* ── Footer ── */
footer {
  background: #0d1b3e;
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: 0.9rem;
}

footer a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

footer a:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

/* ── Privacy page ── */
.privacy-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.privacy-page h1 {
  font-size: 2.2rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.privacy-page .updated {
  color: #78909c;
  margin-bottom: 2rem;
}

.privacy-page h2 {
  font-size: 1.4rem;
  color: var(--text-dark);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.privacy-page p,
.privacy-page li {
  color: #455a64;
  line-height: 1.7;
}

.privacy-page ul {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.privacy-page li {
  margin-bottom: 0.3rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--sky-top);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 2rem;
}

.back-link:hover {
  text-decoration: underline;
}

/* ── Nav bar ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.0);
  backdrop-filter: blur(0px);
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  transition: color 0.3s;
}

.nav.scrolled .nav-brand {
  color: var(--text-dark);
}

.nav-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.nav.scrolled .nav-links a {
  color: #455a64;
}

.nav.scrolled .nav-links a:hover {
  color: var(--text-dark);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .hero .tagline { font-size: 1.1rem; }
  .hero-icon { width: 110px; height: 110px; }
  section { padding: 3.5rem 1.25rem; }
  .section-title { font-size: 1.8rem; }
  .stats .stat-number { font-size: 2.2rem; }
  .nav-links { display: none; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .cta-group { flex-direction: column; align-items: center; }
}
