/* ===== Custom styles (Tailwind via CDN for utilities) ===== */

:root {
  --neon-purple: #a855f7;
  --neon-cyan: #22d3ee;
  --neon-gold: #fbbf24;
}

html {
  scroll-behavior: smooth;
}

/* ----- Buttons ----- */
.btn-neon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f172a;
  background: linear-gradient(135deg, var(--neon-gold) 0%, #f59e0b 50%, var(--neon-gold) 100%);
  border-radius: 0.5rem;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-neon:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-neon-lg {
  padding: 0.875rem 2rem;
  font-size: 0.95rem;
}

.game-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  transition: background 0.2s, border-color 0.2s;
}

.game-btn:hover:not(:disabled) {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(168, 85, 247, 0.4);
}

.game-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.game-btn-primary {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  border-color: transparent;
  color: white;
}

.game-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #8b5cf6, #22d3ee);
}

.kbd {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  font-size: 0.75rem;
  font-family: monospace;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.25rem;
  color: #cbd5e1;
}

/* ----- Hero section ----- */
.hero-section {
  background: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(168, 85, 247, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(34, 211, 238, 0.08), transparent 45%),
    #020617;
}

.hero-bg-glow {
  position: absolute;
  top: 10%;
  right: 5%;
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  background: radial-gradient(circle, rgba(251, 191, 36, 0.15) 0%, rgba(168, 85, 247, 0.08) 40%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.hero-grid-pattern {
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-title-gradient {
  background: linear-gradient(90deg, var(--neon-gold), #fde68a, var(--neon-purple), var(--neon-cyan));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Banner frame — harmonizes square promo art with dark UI */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-visual {
    align-items: flex-end;
  }
}

.hero-banner-frame {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  border-radius: 1.25rem;
  padding: 3px;
  background: linear-gradient(
    145deg,
    rgba(251, 191, 36, 0.7) 0%,
    rgba(168, 85, 247, 0.5) 45%,
    rgba(34, 211, 238, 0.5) 100%
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 25px 50px -12px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(168, 85, 247, 0.25),
    0 0 80px rgba(251, 191, 36, 0.12);
}

@media (min-width: 640px) {
  .hero-banner-frame {
    max-width: 560px;
  }
}

@media (min-width: 1024px) {
  .hero-banner-frame {
    max-width: 100%;
  }
}

.hero-banner-glow {
  position: absolute;
  inset: -20%;
  z-index: 0;
  background: radial-gradient(circle at 60% 40%, rgba(251, 191, 36, 0.2), transparent 55%);
  filter: blur(24px);
  pointer-events: none;
}

.hero-banner-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: calc(1.25rem - 3px);
  background: #0f172a;
}

/* Light edge blend — does not crop the image */
.hero-banner-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: calc(1.25rem - 3px);
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0.08) 0%,
    transparent 20%,
    transparent 85%,
    rgba(2, 6, 23, 0.12) 100%
  );
}

/* Mobile: banner on top, slightly smaller */
@media (max-width: 1023px) {
  .hero-layout {
    padding-top: 0.5rem;
  }

  .hero-banner-frame {
    max-width: min(92vw, 400px);
  }
}

/* Very small screens */
@media (max-width: 380px) {
  .hero-banner-frame {
    max-width: 100%;
    border-radius: 1rem;
  }

  .hero-banner-img,
  .hero-banner-shine {
    border-radius: calc(1rem - 3px);
  }
}

/* ----- Game ----- */
.game-canvas-wrap {
  aspect-ratio: 4 / 3;
  max-height: min(70vh, 480px);
}

#game-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(4px);
}

.game-overlay.hidden {
  display: none;
}

.rotate-hint.hidden {
  display: none;
}

@media (max-width: 640px) and (orientation: portrait) {
  .rotate-hint:not(.hidden) {
    display: block;
  }
}

/* ----- Features ----- */
.feature-card {
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
  transition: border-color 0.25s, transform 0.25s;
}

.feature-card:hover {
  border-color: rgba(168, 85, 247, 0.35);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

/* ----- Footer ----- */
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.social-link:hover {
  color: var(--neon-cyan);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.08);
}

/* ----- Footer ----- */
.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

.footer-contact-title {
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.5rem;
}

.footer-company {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--neon-cyan);
  margin-bottom: 0.75rem;
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact-list li {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.footer-contact-label {
  color: #64748b;
  margin-right: 0.35rem;
}

.footer-contact-list a {
  color: #cbd5e1;
  transition: color 0.2s;
}

.footer-contact-list a:hover {
  color: var(--neon-cyan);
}

.footer-meta {
  text-align: center;
}

@media (min-width: 768px) {
  .footer-meta {
    text-align: right;
  }

  .footer-meta .flex {
    justify-content: flex-end;
  }
}

/* ----- Footer legal links ----- */
.footer-legal a {
  color: #94a3b8;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: var(--neon-cyan);
}

/* ----- Legal pages ----- */
.legal-page {
  min-height: 100vh;
  background: #020617;
}

.legal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(12px);
}

.legal-content {
  max-width: 48rem;
  margin-inline: auto;
  padding: 2rem 1rem 4rem;
}

.legal-content h1 {
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.5rem;
}

.legal-content .legal-updated {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content p,
.legal-content li {
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content a {
  color: var(--neon-cyan);
}

.legal-content a:hover {
  text-decoration: underline;
}

.legal-highlight {
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.08);
  color: #cbd5e1;
  margin: 1.5rem 0;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--neon-cyan);
  margin-bottom: 1.5rem;
}

.legal-back:hover {
  text-decoration: underline;
}

/* ----- Legal sections on main page ----- */
.legal-section {
  scroll-margin-top: 5rem;
}

.legal-block {
  scroll-margin-top: 5rem;
  padding-bottom: 3rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.legal-block-title {
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.5rem;
}

.legal-block .legal-updated {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.25rem;
}

.legal-block h3 {
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-block p,
.legal-block li {
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

.legal-block ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-block a {
  color: var(--neon-cyan);
}

.legal-block a:hover {
  text-decoration: underline;
}

.legal-block code {
  font-size: 0.875em;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}
