/* ============================================
   TAPTECH X — Maximalism / Dopamine Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700;800;900&family=DM+Sans:wght@400;500;700&family=Bangers&display=swap');

/* --- CSS Variables --- */
:root {
  --bg: #0D0D1A;
  --fg: #FFFFFF;
  --muted: #2D1B4E;
  --accent: #FF3AF2;
  --secondary: #00F5D4;
  --tertiary: #FFE600;
  --quaternary: #FF6B35;
  --quinary: #7B2FFF;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-display: 'Bangers', cursive;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--fg);
  font-size: 18px;
  line-height: 1.625;
  overflow-x: hidden;
  /* Global patterns: dots + stripes */
  background-image:
    radial-gradient(circle, rgba(255,58,242,0.04) 1px, transparent 1px),
    repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,230,0,0.03) 20px, rgba(255,230,0,0.03) 40px);
  background-size: 30px 30px, auto;
}

a { color: var(--secondary); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--accent); }

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

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

/* --- Animations --- */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}
@keyframes float-reverse {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(20px) rotate(-5deg); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255,58,242,0.5); }
  50% { box-shadow: 0 0 40px rgba(255,58,242,0.8), 0 0 60px rgba(0,245,212,0.5); }
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-reverse { animation: float-reverse 5s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-gradient { animation: gradient-shift 4s ease infinite; background-size: 200% 200%; }
.animate-spin-slow { animation: spin-slow 20s linear infinite; }
.animate-wiggle { animation: wiggle 1s ease-in-out infinite; }
.animate-bounce { animation: bounce-subtle 2s ease-in-out infinite; }

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13,13,26,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 4px solid var(--accent);
  padding: 16px 0;
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--accent), var(--secondary), var(--tertiary), var(--accent));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 4s ease infinite;
  cursor: pointer;
}
.nav { display: flex; gap: 24px; align-items: center; }
.nav a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--fg);
  padding: 8px 16px;
  border-radius: 9999px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}
.nav a:hover {
  color: var(--tertiary);
  border-color: var(--tertiary);
  text-shadow: 0 0 10px rgba(255,230,0,0.5);
}

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--fg); }

/* --- Hero --- */
.hero {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
  /* Section pattern: gradient mesh */
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(255,58,242,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0,245,212,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(123,47,255,0.1) 0%, transparent 60%);
}
.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 16rem;
  color: var(--quinary);
  opacity: 0.08;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 10; text-align: center; }
.hero h1 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 72px;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -2px;
  text-shadow: 2px 2px 0 var(--quinary), 4px 4px 0 var(--accent), 6px 6px 0 var(--secondary);
  margin-bottom: 24px;
}
.hero h1 .gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--secondary), var(--tertiary), var(--accent));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 4s ease infinite;
}
.hero p {
  font-size: 20px;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto 40px;
}
.hero-cta {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--bg);
  padding: 18px 48px;
  border-radius: 9999px;
  border: 4px solid var(--tertiary);
  background: linear-gradient(135deg, var(--accent), var(--quinary), var(--secondary));
  box-shadow: 0 0 20px rgba(255,58,242,0.5), 8px 8px 0 var(--tertiary), 16px 16px 0 var(--accent);
  transition: all 0.3s cubic-bezier(0.68,-0.55,0.265,1.55);
  text-decoration: none;
}
.hero-cta:hover {
  transform: scale(1.1);
  color: var(--bg);
  box-shadow: 0 0 30px rgba(255,58,242,0.7), 10px 10px 0 var(--tertiary), 20px 20px 0 var(--accent);
}
.hero-cta:active { transform: scale(0.95); }

/* Floating decorations */
.deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 5;
  font-size: 48px;
}

/* --- Section shared --- */
.section {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}
.section-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 56px;
  text-transform: uppercase;
  letter-spacing: -1px;
  text-align: center;
  margin-bottom: 64px;
  line-height: 1;
}

/* --- Games Section --- */
.games-section {
  /* Checkerboard pattern */
  background-image:
    conic-gradient(from 90deg at 1px 1px, transparent 90deg, rgba(0,245,212,0.04) 0);
  background-size: 40px 40px;
}
.games-section .section-title {
  text-shadow: 2px 2px 0 var(--secondary), 4px 4px 0 var(--accent);
  color: var(--fg);
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.game-card {
  position: relative;
  background: rgba(45,27,78,0.8);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.68,-0.55,0.265,1.55);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  color: var(--fg);
}
.game-card:nth-child(odd) { transform: rotate(0deg); }
.game-card:nth-child(even) { transform: rotate(0deg); }
.game-card:hover {
  transform: scale(1.03);
  z-index: 20;
}
.game-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-bottom-width: 4px;
  border-bottom-style: dashed;
  display: block;
}
.game-card-body {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.game-card-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  text-transform: uppercase;
}
.game-card-type {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 4px 12px;
  border-radius: 9999px;
  border: 2px solid;
}
.play-btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 10px 24px;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.play-btn:hover { transform: scale(1.08); }

/* --- About Section --- */
.about-section {
  background-image:
    radial-gradient(ellipse at 70% 20%, rgba(255,107,53,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 80%, rgba(123,47,255,0.12) 0%, transparent 50%),
    repeating-linear-gradient(135deg, transparent, transparent 15px, rgba(255,58,242,0.03) 15px, rgba(255,58,242,0.03) 30px);
}
.about-section .section-title {
  text-shadow: 2px 2px 0 var(--quaternary), 4px 4px 0 var(--quinary);
}
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.about-content p {
  font-size: 20px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
}
.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.about-feature {
  background: rgba(45,27,78,0.6);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
}
.about-feature:hover { transform: translateY(-8px); }
.about-feature-icon { font-size: 48px; margin-bottom: 16px; display: block; }
.about-feature h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.about-feature p {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0;
}

/* --- Contact Section --- */
.contact-section {
  background-image:
    radial-gradient(ellipse at 50% 50%, rgba(0,245,212,0.1) 0%, transparent 50%);
}
.contact-section .section-title {
  text-shadow: 2px 2px 0 var(--tertiary), 4px 4px 0 var(--secondary);
}
.contact-box {
  max-width: 560px;
  margin: 0 auto;
  background: rgba(45,27,78,0.7);
  backdrop-filter: blur(8px);
  border: 4px solid var(--secondary);
  border-radius: 24px;
  padding: 48px;
  text-align: center;
  box-shadow: 8px 8px 0 var(--tertiary), 16px 16px 0 var(--accent);
}
.contact-box p {
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 24px;
}
.contact-email {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 24px;
  color: var(--secondary);
  border-bottom: 4px dashed var(--tertiary);
  padding-bottom: 4px;
  transition: all 0.3s ease;
}
.contact-email:hover {
  color: var(--tertiary);
  border-color: var(--accent);
  text-shadow: 0 0 20px rgba(0,245,212,0.5);
}
.contact-address {
  margin-top: 32px;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

/* --- Footer --- */
.footer {
  border-top: 4px solid var(--quinary);
  padding: 40px 0;
  text-align: center;
  background: rgba(13,13,26,0.9);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 20px;
}
.footer-links a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.6);
  transition: all 0.3s ease;
}
.footer-links a:hover { color: var(--accent); }
.footer-entity {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  margin-top: 12px;
}
.footer-copy {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
}

/* --- Legal Pages --- */
.legal-page {
  padding: 120px 0 80px;
}
.legal-page .container {
  max-width: 800px;
}
.legal-page h1 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 48px;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 var(--quinary), 4px 4px 0 var(--accent);
  margin-bottom: 16px;
}
.legal-page .last-updated {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 48px;
}
.legal-page h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 24px;
  color: var(--secondary);
  margin-top: 40px;
  margin-bottom: 16px;
}
.legal-page p, .legal-page ul {
  color: rgba(255,255,255,0.8);
  margin-bottom: 16px;
}
.legal-page ul {
  padding-left: 24px;
}
.legal-page li {
  margin-bottom: 8px;
}
.legal-page .entity-notice {
  background: rgba(45,27,78,0.6);
  border: 4px solid var(--quinary);
  border-radius: 16px;
  padding: 24px;
  margin: 40px 0;
  font-size: 15px;
  color: rgba(255,255,255,0.9);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 56px; }
  .section-title { font-size: 44px; }
}
@media (max-width: 768px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(13,13,26,0.95);
    backdrop-filter: blur(16px);
    padding: 24px;
    border-bottom: 4px solid var(--accent);
    z-index: 50;
  }
  .nav-toggle { display: block; }
  .games-grid { grid-template-columns: 1fr; }
  .game-card:nth-child(odd),
  .game-card:nth-child(even) { transform: none; }
  .game-card:hover { transform: scale(1.02); }
  .hero { padding: 80px 0 60px; }
  .hero h1 { font-size: 40px; }
  .hero-bg-text { font-size: 6rem; }
  .section { padding: 64px 0; }
  .section-title { font-size: 36px; margin-bottom: 40px; }
  .about-features { grid-template-columns: 1fr; }
  .contact-box { padding: 32px 24px; }
  .contact-email { font-size: 18px; }
  .footer-links { flex-direction: column; gap: 12px; }
}
