/* FunGame Landing — pure HTML/CSS */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-top: #35220f;
  --bg-mid: #15110d;
  --bg-bottom: #0d0a08;
  --card-bg: #1b140d;
  --card-border: #9b6b21;
  --card-inset: #3b2912;
  --gold-heading: #f0cb68;
  --gold-badge: #d7b35b;
  --gold-border-soft: #8f6825;
  --text-primary: #f5f5f5;
  --text-muted: #9e9e9e;
  --text-secondary: #dadada;
  --cta-bg: #2d8f3b;
  --cta-hover: #39a848;
  --cta-border: #4bc65d;
  --accent-purple: #6a5cff;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-pill: 40px;
  --shadow-card: 0 0 0 2px var(--card-inset) inset, 0 10px 35px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 15px rgba(240, 203, 104, 0.3);
  --font-heading: "Poppins", "Segoe UI", Tahoma, sans-serif;
  --font-body: "Segoe UI", Tahoma, sans-serif;
  --container: 1120px;
  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at top, var(--bg-top), var(--bg-mid) 55%, var(--bg-bottom) 100%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--gold-heading);
  color: var(--bg-bottom);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 10, 8, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(155, 107, 33, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  background: radial-gradient(circle at 30% 30%, var(--gold-heading), var(--gold-border-soft));
  box-shadow: 0 0 12px rgba(106, 92, 255, 0.35);
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-heading);
  letter-spacing: 0.5px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--gold-heading);
}

.nav-cta {
  padding: 8px 18px;
  border: 1px solid var(--cta-border);
  border-radius: var(--radius-sm);
  background: var(--cta-bg);
  color: #fff !important;
  font-weight: 600;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--cta-hover);
  color: #fff !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-purple);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--cta-bg);
  color: #fff;
  border: 2px solid var(--cta-border);
}

.btn-primary:hover {
  background: var(--cta-hover);
  box-shadow: var(--shadow-glow);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: transparent;
  color: var(--gold-heading);
  border: 2px solid var(--card-border);
}

.btn-secondary:hover {
  background: rgba(155, 107, 33, 0.15);
  box-shadow: var(--shadow-glow);
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.15rem;
  min-width: 240px;
}

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid var(--gold-border-soft);
  border-radius: var(--radius-pill);
  color: var(--gold-badge);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: #24190d;
  margin-bottom: 24px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-purple);
  box-shadow: 0 0 8px var(--accent-purple);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* Hero */
.hero {
  padding: 56px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  animation: fade-up 0.7s ease both;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--gold-heading);
  line-height: 1.15;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.hero-lead {
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-actions .btn {
  padding: 16px 28px;
  font-size: 1rem;
}

/* Hero visual */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  margin: 0 auto;
  animation: fade-up 0.7s ease 0.15s both;
}

.visual-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--card-border);
}

.visual-ring--outer {
  inset: 0;
  opacity: 0.5;
  animation: spin-slow 24s linear infinite;
}

.visual-ring--inner {
  inset: 18%;
  border-color: var(--gold-border-soft);
  opacity: 0.7;
  animation: spin-slow 16s linear infinite reverse;
}

.visual-core {
  position: absolute;
  inset: 32%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 50%;
  box-shadow: var(--shadow-card);
}

.visual-timer {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gold-heading);
  line-height: 1;
}

.visual-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.visual-node {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-purple);
  box-shadow: 0 0 10px rgba(106, 92, 255, 0.6);
}

.visual-node--1 { top: 8%; left: 50%; transform: translateX(-50%); }
.visual-node--2 { bottom: 20%; left: 10%; }
.visual-node--3 { bottom: 20%; right: 10%; }

.visual-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
  opacity: 0.5;
}

.visual-line--1 {
  width: 60%;
  top: 14%;
  left: 20%;
  transform: rotate(25deg);
}

.visual-line--2 {
  width: 50%;
  bottom: 28%;
  left: 25%;
  transform: rotate(-20deg);
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section headers */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--gold-heading);
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Games */
.games {
  padding: 80px 0;
}

.game-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.game-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-heading);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.game-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.game-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-heading);
}

.game-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Badges */
.badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.badge--live {
  background: rgba(45, 143, 59, 0.2);
  color: #6ed86e;
  border: 1px solid var(--cta-border);
  animation: pulse-badge 2.5s ease-in-out infinite;
}

.badge--soon {
  background: rgba(158, 158, 158, 0.15);
  color: var(--text-muted);
  border: 1px solid #555;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 8px rgba(75, 198, 93, 0.4); }
}

/* Abstract game icons */
.game-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  position: relative;
  border: 1px solid var(--gold-border-soft);
  border-radius: var(--radius-sm);
  background: #24190d;
}

/* Target Pulse — grid dots */
.game-icon--pulse {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px;
  align-content: center;
}

.grid-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: rgba(155, 107, 33, 0.4);
  justify-self: center;
}

.grid-dot--active {
  background: var(--gold-heading);
  box-shadow: 0 0 6px rgba(240, 203, 104, 0.5);
}

/* Wheel Rush — spokes */
.game-icon--wheel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-spoke {
  position: absolute;
  width: 2px;
  height: 22px;
  background: var(--card-border);
  transform-origin: center 28px;
}

.wheel-spoke:nth-child(1) { transform: rotate(0deg); }
.wheel-spoke:nth-child(2) { transform: rotate(60deg); }
.wheel-spoke:nth-child(3) { transform: rotate(120deg); }

.wheel-hub {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold-heading);
  z-index: 1;
}

/* Rise & Fall — trend */
.game-icon--trend {
  display: flex;
  align-items: center;
  justify-content: center;
}

.trend-line {
  position: absolute;
  width: 30px;
  height: 2px;
  background: var(--card-border);
  transform: rotate(-30deg);
}

.trend-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

.trend-arrow--up {
  top: 12px;
  right: 12px;
  border-bottom: 8px solid var(--cta-border);
}

.trend-arrow--down {
  bottom: 12px;
  left: 12px;
  border-top: 8px solid var(--text-muted);
}

/* Split Choice */
.game-icon--split {
  display: flex;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.split-side {
  flex: 1;
  height: 100%;
}

.split-side--left {
  background: rgba(106, 92, 255, 0.35);
}

.split-side--right {
  background: rgba(240, 203, 104, 0.25);
}

/* Sky Glide */
.game-icon--glide {
  display: flex;
  align-items: flex-end;
  padding: 10px;
}

.glide-curve {
  position: absolute;
  bottom: 14px;
  left: 10px;
  right: 10px;
  height: 20px;
  border-top: 2px solid var(--cta-border);
  border-radius: 50% 50% 0 0;
}

.glide-marker {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-heading);
}

/* Triple Mix */
.game-icon--triple {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px;
}

.triple-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--card-border);
}

.triple-bar:nth-child(2) {
  width: 80%;
  background: var(--gold-badge);
}

.triple-bar:nth-child(3) {
  width: 60%;
}

/* Download */
.download {
  padding: 40px 0 100px;
}

.download-card {
  position: relative;
  text-align: center;
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 56px 32px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.download-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(106, 92, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.download-card h2 {
  position: relative;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--gold-heading);
  margin-bottom: 16px;
}

.download-copy {
  position: relative;
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.download-hint {
  position: relative;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(155, 107, 33, 0.3);
  padding: 32px 0;
  background: rgba(13, 10, 8, 0.6);
}

.footer-inner {
  text-align: center;
}

.footer-copy {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.footer-disclaimer {
  color: var(--text-muted);
  font-size: 0.82rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    max-width: 280px;
  }

  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .site-nav a:not(.nav-cta) {
    display: none;
  }

  .hero {
    padding: 36px 0 60px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .games {
    padding: 60px 0;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .download-card {
    padding: 40px 20px;
  }

  .btn-large {
    width: 100%;
    min-width: unset;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
