/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #121218;
  --bg-card: #1e1e2a;
  --bg-elevated: #262636;
  --text: #e8e8f0;
  --text-muted: #9898b0;
  --accent: #7c6cf0;
  --accent-light: #9d8ff8;
  --accent-dark: #5b4ec9;
  --accent-glow: rgba(124, 108, 240, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #fff;
}

/* === Hero === */
.hero {
  text-align: center;
  padding: 120px 24px 80px;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 60%);
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero-subtitle {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--accent-light);
  margin-top: 4px;
  font-weight: 300;
  letter-spacing: 0.15em;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  margin-top: 16px;
  font-weight: 400;
}

.hero-cta {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: var(--accent-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(124, 108, 240, 0.3);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: var(--bg-card);
  color: #fff;
  transform: translateY(-1px);
  border-color: var(--accent);
}

.btn-large {
  padding: 18px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius);
}

.btn-large .btn-label {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.btn-large .btn-main {
  font-weight: 600;
  line-height: 1.3;
}

.btn-large .btn-sub {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.3;
}

.btn-large .btn-icon {
  font-size: 1.5rem;
}

/* === Screenshot === */
.screenshot {
  padding: 0 24px 80px;
  text-align: center;
}

.screenshot-img {
  max-width: 480px;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* === Section Title === */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  color: #fff;
}

/* === Features === */
.features {
  padding: 80px 24px;
}

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

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: rgba(124, 108, 240, 0.3);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === How to Play === */
.how-to-play {
  padding: 80px 24px;
  background: var(--bg-card);
}

.rules-content {
  display: grid;
  gap: 32px;
  max-width: 700px;
  margin: 0 auto;
}

.rule-block h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 8px;
}

.rule-block p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* === Download === */
.download {
  padding: 80px 24px;
  text-align: center;
}

.download-text {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.download-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === Footer === */
.footer {
  padding: 48px 24px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

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

.footer a:hover {
  color: var(--accent-light);
}

/* === Responsive === */
@media (max-width: 640px) {
  .hero {
    padding: 80px 16px 60px;
  }

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

  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

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

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

  .download-buttons .btn-large {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .screenshot-img {
    max-width: 100%;
  }

  section, .how-to-play, .features, .download {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (min-width: 641px) and (max-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
