/* === Tumble Type Website === */

:root {
  --bg-dark: #0a0a14;
  --bg-card: #12121e;
  --bg-card-hover: #1a1a2a;
  --red: #c73838;
  --yellow: #d1ad1e;
  --blue: #3866c7;
  --red-glow: rgba(199, 56, 56, 0.3);
  --yellow-glow: rgba(209, 173, 30, 0.3);
  --blue-glow: rgba(56, 102, 199, 0.3);
  --gold: #ffd700;
  --text: #e8e8ef;
  --text-dim: #8888a0;
  --text-muted: #555568;
  --green: #28a745;
  --green-hover: #34c759;
  --max-width: 900px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* === Nav === */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 100;
  padding: 0 24px;
}

nav .nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

nav .nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}

nav .nav-logo img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

nav .nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

nav .nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

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

nav .nav-cta {
  background: var(--green);
  color: white;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s, transform 0.15s;
}

nav .nav-cta:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
}

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 50%);
  opacity: 0.4;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -200px;
  left: 30%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--blue-glow) 0%, transparent 50%);
  opacity: 0.3;
  pointer-events: none;
}

.hero-glow-yellow {
  position: absolute;
  top: 30%;
  right: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--yellow-glow) 0%, transparent 50%);
  opacity: 0.25;
  pointer-events: none;
}

.hero-logo {
  width: 340px;
  max-width: 80%;
  image-rendering: pixelated;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  animation: float 4s ease-in-out infinite;
}

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

.hero-tagline {
  font-size: 22px;
  color: var(--text-dim);
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: transform 0.15s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-play {
  background: var(--green);
  color: white;
  font-size: 22px;
  padding: 16px 44px;
  box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
}

.btn-play:hover {
  background: var(--green-hover);
  box-shadow: 0 6px 28px rgba(40, 167, 69, 0.4);
}

.btn-store {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 16px;
  padding: 12px 28px;
}

.btn-store:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.hero-platforms {
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 14px;
  position: relative;
  z-index: 1;
}

/* === Sections === */
section {
  padding: 80px 24px;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-dim);
  font-size: 18px;
  margin-bottom: 48px;
}

/* === Features === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.2s, border-color 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.12);
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.5;
}

/* Color accent borders on feature cards */
.feature-card.red { border-top: 3px solid var(--red); }
.feature-card.yellow { border-top: 3px solid var(--yellow); }
.feature-card.blue { border-top: 3px solid var(--blue); }

/* === Screenshots === */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.screenshot-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.2s, border-color 0.3s, box-shadow 0.3s;
}

.screenshot-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.screenshot-card img {
  width: 100%;
  display: block;
  image-rendering: pixelated;
}

.screenshot-label {
  display: block;
  text-align: center;
  padding: 10px 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
}

/* === How to Play === */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  counter-reset: step;
}

.step {
  text-align: center;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: 2px solid var(--gold);
  color: var(--gold);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-dim);
  font-size: 14px;
}

/* === Get the Game / Purchase === */
.purchase-section {
  background: linear-gradient(180deg, transparent, rgba(255,215,0,0.03), transparent);
}

.purchase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.purchase-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  transition: transform 0.2s, border-color 0.3s;
}

.purchase-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
}

.purchase-card .price-tag {
  font-size: 14px;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.purchase-card h3 {
  font-size: 24px;
  margin-bottom: 12px;
}

.purchase-card p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

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

/* === Footer === */
footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

footer a {
  color: var(--text-dim);
  text-decoration: none;
}

footer a:hover {
  color: var(--text);
}

/* === Play Page === */
.play-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 0 20px;
}

.game-container {
  width: 360px;
  height: 640px;
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  position: relative;
}

.game-container canvas,
.game-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.play-info {
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.play-info a {
  color: var(--text-dim);
}

.fullscreen-btn {
  margin-top: 12px;
  background: var(--bg-card);
  color: var(--text-dim);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.fullscreen-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

/* === Responsive === */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .screenshots-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .purchase-grid {
    grid-template-columns: 1fr;
  }

  .hero-logo {
    width: 260px;
  }

  .hero-tagline {
    font-size: 18px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .section-title {
    font-size: 28px;
  }

  nav .nav-links {
    gap: 16px;
  }

  nav .nav-links a {
    font-size: 13px;
  }

  .game-container {
    width: 100vw;
    height: calc(100vw * 1.78);
    max-height: calc(100vh - 100px);
    max-width: 400px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

@media (max-width: 480px) {
  nav .nav-links {
    display: none;
  }

  .steps {
    grid-template-columns: 1fr;
  }
}
