:root {
  --bg-page: #f2f8ff;
  --bg-surface: #ffffff;
  --bg-soft: #e6f3ff;
  --bg-card: #ffffff;
  --border-subtle: #d5e7f7;
  --border-strong: #9ad1f5;

  --cyan: #00a8e8;
  --cyan-dark: #0077b6;
  --cyan-soft: #e0f5ff;
  --sun: #ffb703;
  --sun-soft: #fff4d6;
  --coral: #ff6b6b;
  --coral-soft: #ffe8e8;
  --mint: #10b981;
  --mint-soft: #dffaf0;
  --violet: #7c3aed;
  --violet-soft: #efe8ff;

  --text-primary: #132a42;
  --text-secondary: #486581;
  --text-muted: #7b93ab;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --max-width: 1440px;

  --shadow-card: 0 10px 28px rgba(19, 42, 66, 0.08);
  --shadow-card-hover: 0 16px 36px rgba(0, 168, 232, 0.18);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(0, 168, 232, 0.14), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(255, 183, 3, 0.14), transparent 30%),
    radial-gradient(circle at 82% 82%, rgba(124, 58, 237, 0.08), transparent 36%);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand {
  font-family: "Fredoka", "Nunito", sans-serif;
  letter-spacing: -0.01em;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 44px);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 168, 232, 0.24);
}

.brand-accent {
  color: var(--cyan-dark);
}

.brand-junior {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--sun);
  color: #132a42;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 700;
  color: var(--text-secondary);
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.badge-division {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan-dark);
  font-weight: 800;
  font-size: 0.88rem;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.badge-division:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}

/* Hero */
.hero {
  padding: clamp(32px, 5vw, 64px) 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(24px, 4vw, 52px);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--sun-soft);
  color: #8a5a00;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 16px;
  border: 2px solid rgba(255, 183, 3, 0.35);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1.1;
  color: var(--text-primary);
}

.hero h1 span {
  color: var(--cyan-dark);
  background: linear-gradient(120deg, rgba(255, 183, 3, 0.32), rgba(0, 168, 232, 0.22));
  padding: 0 8px;
  border-radius: 12px;
}

.hero-desc {
  margin: 0 0 26px;
  font-size: 1.12rem;
  color: var(--text-secondary);
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 16px;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  font-size: 1.04rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:hover:not([aria-disabled="true"]) {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 119, 182, 0.26);
}

.btn-primary:hover:not([aria-disabled="true"]) {
  box-shadow: 0 12px 26px rgba(0, 119, 182, 0.34);
}

.btn-play {
  width: 100%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.25);
}

.btn-play:hover {
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.34);
}

.btn-secondary {
  background: var(--bg-soft);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary[aria-disabled="true"] {
  opacity: 0.72;
  cursor: default;
}

/* Video Box */
.hero-media {
  position: relative;
  background: #0c1f33;
  border-radius: var(--radius-lg);
  padding: 10px;
  border: 3px solid #ffffff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.hero-video {
  display: block;
  width: 100%;
  border-radius: calc(var(--radius-lg) - 8px);
  background: #081523;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.media-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.media-btn {
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.media-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* Overview strip */
.telemetry {
  padding: 12px 0 20px;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.telemetry-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: 0 4px 14px rgba(19, 42, 66, 0.04);
}

.telemetry-label {
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.telemetry-value {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

.telemetry-value span {
  color: var(--cyan-dark);
}

/* Sections */
.section {
  padding: clamp(32px, 5vw, 56px) 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.65rem, 3vw, 2.3rem);
}

.section-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Filter & Search Controls */
.controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border: 2px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  padding: 9px 16px;
  border-radius: 999px;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pill:hover {
  border-color: var(--cyan);
  color: var(--cyan-dark);
}

.pill.active {
  background: var(--cyan-dark);
  border-color: var(--cyan-dark);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(0, 119, 182, 0.22);
}

.search-input {
  min-width: min(320px, 100%);
  flex: 0 1 340px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 2px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.14);
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.game-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--cyan);
}

.game-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.game-world {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--cyan-soft);
  color: var(--cyan-dark);
}

.game-world.world-officina {
  background: var(--violet-soft);
  color: var(--violet);
}

.game-world.world-mdp {
  background: var(--sun-soft);
  color: #8a5a00;
}

.age-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--bg-soft);
  color: var(--text-secondary);
}

.game-hero-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.game-icon-box {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #e0f5ff, #fff4d6);
  border: 2px solid var(--border-subtle);
}

.game-title {
  margin: 0 0 4px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.game-tagline {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--cyan-dark);
}

.game-desc {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.tag {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
}

.game-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}

.status-live {
  background: var(--mint-soft);
  color: #047857;
}

.status-coming_soon {
  background: var(--coral-soft);
  color: #b91c1c;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-surface);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 1.08rem;
  font-weight: 700;
}

/* How it works (3 steps) */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 6px 18px rgba(19, 42, 66, 0.05);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--sun-soft);
  color: #8a5a00;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.step-card p {
  margin: 0;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  margin-top: 24px;
  padding: 28px 0 38px;
  border-top: 2px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.65);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.94rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--cyan-dark);
}

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

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

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

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

  .hero-video {
    aspect-ratio: 9 / 16;
    max-height: 460px;
    margin: 0 auto;
    width: auto;
    max-width: 100%;
  }

  .controls-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    width: 100%;
    flex: none;
  }
}
