@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Design System Variables --- */
:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Colors */
  --bg-primary: #0a0b10;
  --bg-secondary: #12141c;
  --bg-tertiary: #191c28;
  
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.4);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.4);
  --accent-pink: #ec4899;
  --accent-pink-glow: rgba(236, 72, 153, 0.4);

  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(255, 255, 255, 0.15);

  --gradient-primary: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  --gradient-secondary: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  --gradient-dark: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
  background: var(--gradient-dark);
  min-height: 100vh;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

p {
  color: var(--text-secondary);
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* --- Scrollbar Customization --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-spacing {
  padding: 100px 0;
}

.glow-text {
  text-shadow: 0 0 20px var(--accent-purple-glow);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-cyan {
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Header & Navigation --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 11, 16, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition-normal);
}

header.scrolled {
  background: rgba(10, 11, 16, 0.9);
  padding: 10px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  transition: height var(--transition-normal);
}

header.scrolled .nav-container {
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 15px var(--accent-purple-glow);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: white;
  box-shadow: 0 0 15px var(--accent-purple-glow);
}

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

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 8px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
  border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-btn {
  background: var(--gradient-primary);
  color: white;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 15px var(--accent-purple-glow);
  transition: all var(--transition-normal);
  border: none;
  cursor: pointer;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-normal);
  transform-origin: 1px;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.3;
}

.hero-glow-1 {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--accent-purple-glow) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.hero-glow-2 {
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-cyan);
}

.badge span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -1px;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px var(--accent-purple-glow);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
}

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
}

/* App Mockup / Visual Container */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-backdrop {
  position: absolute;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, var(--accent-purple-glow) 0%, transparent 60%);
  z-index: -1;
  border-radius: 50%;
  filter: blur(40px);
}

.mockup-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: float 6s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Match Lobby Mockup Design */
.mockup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mockup-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-pink);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mockup-title {
  font-size: 20px;
  font-weight: 700;
}

.mockup-players {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mockup-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}

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

.player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  color: white;
}

.player-avatar.p2 {
  background: var(--accent-cyan);
}

.player-name {
  font-size: 14px;
  font-weight: 500;
}

.player-ping {
  font-size: 11px;
  color: #10b981;
}

.voice-status {
  display: flex;
  align-items: center;
  gap: 4px;
}

.voice-wave {
  width: 3px;
  height: 12px;
  background: var(--accent-cyan);
  border-radius: 10px;
  animation: voice-pulse 1.2s infinite ease-in-out alternate;
}

.voice-wave:nth-child(2) {
  height: 18px;
  animation-delay: 0.2s;
}

.voice-wave:nth-child(3) {
  height: 14px;
  animation-delay: 0.4s;
}

.mockup-action {
  background: var(--gradient-secondary);
  color: white;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 15px var(--accent-cyan-glow);
}

/* --- Features Section --- */
.section-title-wrapper {
  text-align: center;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.section-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 70%, var(--accent-purple-glow) 150%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-purple);
  background: var(--glass-bg-hover);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.1);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-box {
  width: 52px;
  height: 52px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent-purple);
  margin-bottom: 8px;
  transition: all var(--transition-normal);
}

.feature-card:hover .feature-icon-box {
  background: var(--accent-purple);
  color: white;
  box-shadow: 0 0 20px var(--accent-purple-glow);
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
}

.feature-card p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* --- App Preview/Games Section --- */
.games-showcase {
  background: rgba(255, 255, 255, 0.01);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.game-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-normal);
}

.game-item:hover {
  transform: scale(1.03);
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 25px rgba(6, 182, 212, 0.15);
  background: var(--glass-bg-hover);
}

.game-icon {
  width: 64px;
  height: 64px;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--accent-cyan);
  transition: all var(--transition-normal);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.05);
}

.game-item:hover .game-icon {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  box-shadow: 0 0 25px var(--accent-cyan-glow);
}

.game-item h3 {
  font-size: 18px;
  font-weight: 600;
}

/* --- Legal Page Styles (Privacy / Terms) --- */
.legal-hero {
  padding-top: 160px;
  padding-bottom: 60px;
  background: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
  border-bottom: 1px solid var(--glass-border);
  text-align: center;
}

.legal-hero h1 {
  font-size: 44px;
  margin-bottom: 12px;
}

.last-updated {
  font-size: 14px;
  color: var(--text-muted);
}

.legal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  padding-top: 60px;
  padding-bottom: 100px;
}

/* Sidebar Navigation */
.legal-sidebar {
  position: sticky;
  top: 110px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.legal-nav-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding-left: 12px;
}

.legal-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 1px solid var(--glass-border);
}

.legal-nav-item a {
  display: block;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  border-left: 2px solid transparent;
  margin-left: -1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all var(--transition-fast);
}

.legal-nav-item a:hover {
  color: var(--accent-purple);
  padding-left: 20px;
}

.legal-nav-item.active a {
  color: var(--accent-purple);
  font-weight: 600;
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.05);
}

/* Document Content */
.legal-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 48px;
  max-width: 800px;
}

.legal-section {
  margin-bottom: 40px;
  scroll-margin-top: 110px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-section h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.legal-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul, .legal-section ol {
  margin-left: 24px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 15px;
}

.legal-section li {
  margin-bottom: 8px;
}

.legal-section strong {
  color: var(--text-primary);
}

.legal-callout {
  background: rgba(6, 182, 212, 0.05);
  border-left: 3px solid var(--accent-cyan);
  padding: 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
}

.legal-callout h4 {
  color: var(--accent-cyan);
  font-size: 15px;
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legal-callout p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 0;
}

/* --- Footer --- */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 30px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 320px;
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-purple);
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all var(--transition-normal);
}

.social-icon:hover {
  background: var(--accent-purple);
  color: white;
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--accent-purple-glow);
}

/* --- Scroll Animation Classes --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Keyframe Animations --- */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(6, 182, 212, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
  }
}

@keyframes voice-pulse {
  from {
    transform: scaleY(1);
  }
  to {
    transform: scaleY(1.8);
  }
}

/* --- 3D Visual Enhancement Styles --- */

/* 3D perspective grid plane background */
.grid-3d-plane {
  position: absolute;
  bottom: -40%;
  left: -50%;
  width: 200%;
  height: 140%;
  background-image: 
    linear-gradient(rgba(139, 92, 246, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(600px) rotateX(65deg) translateY(0);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.8) 10%, rgba(0, 0, 0, 0) 90%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.8) 10%, rgba(0, 0, 0, 0) 90%);
  animation: grid-scroll 30s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes grid-scroll {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 1000px;
  }
}

/* 3D tilt classes and glare overlay */
.tilt-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.15s ease-out, box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
}

.glare-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  border-radius: inherit;
  background: transparent;
  transition: background 0.15s ease-out;
}

/* 3D Floating elements surrounding visual container */
.floating-3d-element {
  position: absolute;
  font-size: 56px;
  user-select: none;
  pointer-events: none;
  z-index: 5;
  transition: transform var(--transition-normal);
}

.card-spade {
  top: 15%;
  left: -10%;
  color: var(--accent-pink);
  text-shadow: 0 0 20px var(--accent-pink-glow);
  animation: float-3d-1 6s ease-in-out infinite alternate;
}

.game-die {
  bottom: 15%;
  right: -12%;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6));
  animation: float-3d-2 7s ease-in-out infinite alternate;
}

.chess-piece {
  top: -15%;
  right: 5%;
  font-size: 64px;
  color: var(--accent-cyan);
  text-shadow: 0 0 20px var(--accent-cyan-glow);
  animation: float-3d-3 8s ease-in-out infinite alternate;
}

@keyframes float-3d-1 {
  0% { transform: translateY(0px) rotate(-15deg) translateZ(40px); }
  100% { transform: translateY(-20px) rotate(-5deg) translateZ(80px); }
}

@keyframes float-3d-2 {
  0% { transform: translateY(0px) rotate(10deg) translateZ(50px); }
  100% { transform: translateY(-25px) rotate(35deg) translateZ(100px); }
}

@keyframes float-3d-3 {
  0% { transform: translateY(0px) rotate(5deg) translateZ(30px); }
  100% { transform: translateY(-15px) rotate(-10deg) translateZ(70px); }
}

/* Layered depth effects for mockup card details */
.mockup-card.tilt-3d {
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(18, 20, 28, 0.6);
}

.mockup-card .mockup-header {
  transform: translateZ(30px);
}

.mockup-card .mockup-title, 
.mockup-card p {
  transform: translateZ(40px);
}

.mockup-card .mockup-players .mockup-player:nth-child(1) {
  transform: translateZ(55px);
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.mockup-card .mockup-players .mockup-player:nth-child(2) {
  transform: translateZ(65px);
  border-color: rgba(6, 182, 212, 0.2);
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

.mockup-card .mockup-action {
  transform: translateZ(80px);
  border: 1px solid rgba(6, 182, 212, 0.3);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* 3D enhancements for secondary cards */
.game-item.tilt-3d, .feature-card.tilt-3d {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: rgba(18, 20, 28, 0.45);
}

.game-item.tilt-3d:hover {
  box-shadow: 0 20px 40px rgba(6, 182, 212, 0.2);
}

.feature-card.tilt-3d:hover {
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

.game-item.tilt-3d *, .feature-card.tilt-3d * {
  transform: translateZ(20px);
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 60px;
    padding-top: 60px;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero h1 {
    font-size: 44px;
  }
  
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .legal-sidebar {
    position: static;
    display: none; /* Hide sidebar list on mobile/tablet for simpler viewing, or show a simple header dropdown */
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--glass-border);
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    transition: right var(--transition-normal);
    z-index: 100;
  }

  .nav-links.open {
    right: 0;
  }

  .menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .legal-content {
    padding: 24px;
  }
  
  .legal-hero h1 {
    font-size: 32px;
  }
}

/* ==========================================
   Awwwards Interactive Visual Styles
   ========================================== */

/* 2. Canvas Background for Plexus Node particles */
#plexus-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* 3. 3D Card Flipping Redesign */
.game-card-wrapper {
  perspective: 1200px;
  height: 320px;
}

.game-card-inner {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border-radius: var(--radius-md);
}

.game-card-wrapper:hover .game-card-inner {
  transform: rotateY(180deg);
}

.game-card-front, .game-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.game-card-front {
  background: rgba(18, 20, 28, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2;
  transform: rotateY(0deg);
  gap: 16px;
}

.game-card-back {
  background: linear-gradient(135deg, rgba(18, 20, 28, 0.95), rgba(10, 11, 16, 0.95));
  border-color: var(--accent-cyan);
  transform: rotateY(180deg);
  z-index: 1;
  gap: 12px;
}

.flip-hint {
  font-size: 11px;
  color: var(--accent-purple);
  margin-top: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 0;
}

.stat-row span:nth-child(1) {
  color: var(--text-secondary);
}

.stat-row span:nth-child(2) {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 600;
}

.game-play-btn {
  width: 100%;
  margin-top: 16px;
  font-size: 14px !important;
  padding: 10px !important;
}

/* 4. 3D Deal Simulation Overlay */
.deal-simulation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 11, 16, 0.95);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--accent-cyan);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 20;
  transform: scale(0.9) translateZ(100px);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
  transform-style: preserve-3d;
}

.deal-simulation-overlay.active {
  transform: scale(1) translateZ(0);
  opacity: 1;
  pointer-events: auto;
}

.deal-sim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-sim-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
}

.close-sim-btn:hover {
  color: var(--accent-pink);
}

.deal-board {
  flex-grow: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 160px;
  perspective: 1000px;
  transform-style: preserve-3d;
}

/* Individual dealt cards */
.dealt-card {
  position: absolute;
  width: 70px;
  height: 100px;
  background: #ffffff;
  border-radius: 6px;
  color: #000000;
  font-family: var(--font-heading);
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
  font-weight: bold;
  opacity: 0;
  transform: scale(0.2) translate(0, 0) rotate(0deg);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, opacity 0.8s ease;
}

/* When simulation is active, deal cards out into a 3D fan layout */
.deal-simulation-overlay.active .dealt-card {
  opacity: 1;
}

.deal-simulation-overlay.active .card-1 {
  transform: translate(-75px, -10px) rotate(-15deg) translateZ(10px);
  transition-delay: 0.2s;
}

.deal-simulation-overlay.active .card-2 {
  transform: translate(-25px, -25px) rotate(-5deg) translateZ(20px);
  transition-delay: 0.4s;
}

.deal-simulation-overlay.active .card-3 {
  transform: translate(25px, -25px) rotate(5deg) translateZ(30px);
  transition-delay: 0.6s;
}

.deal-simulation-overlay.active .card-4 {
  transform: translate(75px, -10px) rotate(15deg) translateZ(40px);
  transition-delay: 0.8s;
}

/* Card hand hover states: lift card and raise z-index and shadow */
.deal-simulation-overlay.active .dealt-card:hover {
  z-index: 50 !important;
  box-shadow: 0 15px 30px rgba(139, 92, 246, 0.4);
  background: #f8fafc;
  cursor: pointer;
}

.deal-simulation-overlay.active .card-1:hover {
  transform: translate(-75px, -30px) rotate(-10deg) translateZ(50px) scale(1.1);
  transition-delay: 0s;
}

.deal-simulation-overlay.active .card-2:hover {
  transform: translate(-25px, -45px) rotate(0deg) translateZ(60px) scale(1.1);
  transition-delay: 0s;
}

.deal-simulation-overlay.active .card-3:hover {
  transform: translate(25px, -45px) rotate(0deg) translateZ(70px) scale(1.1);
  transition-delay: 0s;
}

.deal-simulation-overlay.active .card-4:hover {
  transform: translate(75px, -30px) rotate(10deg) translateZ(80px) scale(1.1);
  transition-delay: 0s;
}

/* Card details (rank & suit styles) */
.dealt-card[data-suit="hearts"], .dealt-card[data-suit="diamonds"] {
  color: #e11d48;
}

.dealt-card[data-suit="spades"], .dealt-card[data-suit="clubs"] {
  color: #0f172a;
}

.card-corner {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  line-height: 1;
}

.card-corner.bottom-right {
  align-self: flex-end;
  transform: rotate(180deg);
}

.card-center {
  font-size: 24px;
  align-self: center;
}

.sim-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.deal-status-text {
  font-size: 14px;
  color: var(--accent-cyan);
  font-weight: 500;
}

.bid-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.bid-btn {
  padding: 8px 16px !important;
  font-size: 13px !important;
}

/* 5. Glowing wave dividers styling */
.divider-glowing {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  overflow: hidden;
  z-index: 10;
}

.divider-glowing svg {
  width: 100%;
  height: 100%;
  display: block;
}

.divider-glowing.inverse {
  bottom: auto;
  top: 0;
  transform: scaleY(-1);
}

