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

:root {
  /* Retro gaming palette — derived from the app */
  --bg-deep: #0A0E14;
  --bg-card: #101419;
  --bg-surface: #161B22;
  --accent: #FF2E63;
  --accent-hover: #E0264F;
  --cyan: #08D9D6;
  --text-primary: #FFFFFF;
  --text-secondary: #B4BCD0;
  --border: #4A5568;
  --font-body: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Press Start 2P", "Inter", monospace;
  --max-width: 1140px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== SCANLINE OVERLAY (subtle retro CRT effect) ===== */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar__logo img {
  height: 36px;
  width: 36px;
  border-radius: 8px;
}

.navbar__logo span {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.navbar__links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.navbar__links a:hover {
  color: var(--text-primary);
}

/* Language select */
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 5px 24px 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23B4BCD0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.lang-select:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.05);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23FFFFFF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.lang-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Mobile nav toggle */
.navbar__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: visible;
  padding: 100px 0 80px;
  min-height: 520px;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.hero__content {
  flex: 1;
  max-width: 520px;
}

.hero__tagline {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero__tagline .highlight {
  color: var(--accent);
}

.hero__description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 440px;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--text-primary);
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, transform 0.15s;
}

.hero__cta:hover {
  background: var(--accent-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.hero__image {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Allow the image to overflow the hero boundaries */
  align-self: stretch;
}

.hero__image img {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-45%);
  width: 115%;
  height: auto;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 20px 60px rgba(255, 46, 99, 0.15));
  z-index: 2;
}

/* Glow behind hero image */
.hero__image::before {
  content: "";
  position: absolute;
  bottom: -30%;
  right: 10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 46, 99, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
}

/* Clip the overflow on the page level so the image
   bleeds past the hero but doesn't cause horizontal scroll */
body {
  overflow-x: hidden;
}

/* ===== FEATURES ===== */
.features {
  position: relative;
  z-index: 3;
  padding: 100px 0;
}

.feature {
  display: flex;
  align-items: center;
  gap: 60px;
  padding: 60px 0;
}

.feature:not(:last-child) {
  border-bottom: 1px solid rgba(74, 85, 104, 0.3);
}

.feature--reverse {
  flex-direction: row-reverse;
}

.feature__content {
  flex: 1;
}

.feature__content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.feature__content p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 460px;
}

.feature__image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature__img {
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
}

.feature__image-placeholder {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 3;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== CTA SECTION ===== */
.cta-section {
  text-align: center;
  padding: 100px 0;
  background: var(--bg-card);
  border-top: 1px solid rgba(74, 85, 104, 0.3);
  border-bottom: 1px solid rgba(74, 85, 104, 0.3);
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

.cta-section__badge {
  display: inline-block;
  transition: opacity 0.2s, transform 0.15s;
}

.cta-section__badge:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.cta-section__badge img {
  height: 54px;
  width: auto;
}

/* ===== SUPPORT ===== */
.support-section {
  text-align: center;
  padding: 80px 0;
}

.support-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.support-section p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.support-section__badge {
  display: inline-block;
  transition: opacity 0.2s, transform 0.15s;
}

.support-section__badge:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.support-section__badge img {
  height: 40px;
  width: auto;
}

/* ===== FOOTER ===== */
.footer {
  padding: 48px 0;
  border-top: 1px solid rgba(74, 85, 104, 0.3);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer__brand img {
  height: 28px;
  width: 28px;
  border-radius: 6px;
}

.footer__brand span {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer__links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer__links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer__copy {
  width: 100%;
  text-align: center;
  color: var(--border);
  font-size: 0.8rem;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(74, 85, 104, 0.2);
}

/* ===== TERMS PAGE ===== */
.terms {
  padding: 80px 0 100px;
  max-width: 760px;
  margin: 0 auto;
}

.terms h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.terms .terms__updated {
  color: var(--border);
  font-size: 0.85rem;
  margin-bottom: 40px;
}

.terms h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.terms p,
.terms li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.terms ul {
  padding-left: 24px;
  margin-bottom: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar__links {
    display: none;
  }

  .navbar__toggle {
    display: block;
  }

  .hero {
    padding: 48px 0 0;
    min-height: auto;
    overflow: hidden;
  }

  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__description {
    max-width: 100%;
  }

  .hero__tagline {
    font-size: 2rem;
  }

  .hero__image {
    position: relative;
    min-height: 360px;
  }

  .hero__image img {
    position: relative;
    bottom: auto;
    right: auto;
    max-height: 400px;
    max-width: 100%;
  }

  .feature,
  .feature--reverse {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }

  .feature__content p {
    max-width: 100%;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
  }
}
