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

:root {
  /* Colors */
  --bg-primary: #020617;
  --bg-secondary: #0f172a;
  
  --glass-surface: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.1);
  
  --kinetic-teal-start: #14b8a6;
  --kinetic-teal-end: #06b6d4;
  --loop-purple-start: #a855f7;
  --loop-purple-end: #6366f1;
  
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --glow-teal: rgba(20, 184, 166, 0.45);
  --glow-purple: rgba(168, 85, 247, 0.4);
  
  /* Layout */
  --max-width: 1280px;
  --nav-width: 72px;
  
  /* Gradients */
  --grad-teal: linear-gradient(135deg, var(--kinetic-teal-start), var(--kinetic-teal-end));
  --grad-purple: linear-gradient(135deg, var(--loop-purple-start), var(--loop-purple-end));
  --grad-velocity: linear-gradient(135deg, #2dd4bf, #c084fc);
  --grad-glass: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.01) 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Kinetic System */
.kinetic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.kinetic-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: orbit 20s linear infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--glow-teal);
  top: -100px;
  left: -100px;
  animation-duration: 25s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--glow-purple);
  bottom: -150px;
  right: -100px;
  animation-duration: 30s;
  animation-direction: reverse;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(6, 182, 212, 0.2);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 8s ease-in-out infinite;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
  transform: perspective(500px) rotateX(60deg) translateY(-100px) scale(3);
  animation: gridMove 20s linear infinite;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

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

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

.text-muted {
  color: var(--text-muted);
}

/* Top Bar (Logo + CTA) */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px 0 calc(var(--nav-width) + 60px);
  z-index: 100;
  background: linear-gradient(180deg, rgba(2,6,23,0.9) 0%, rgba(2,6,23,0) 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.brand svg {
  width: 32px;
  height: 32px;
  color: var(--kinetic-teal-start);
  filter: drop-shadow(0 0 8px var(--glow-teal));
}

/* Floating Nav Desktop */
.floating-nav {
  position: fixed;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  width: var(--nav-width);
  background: var(--glass-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 36px;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  z-index: 100;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.05);
  transition: all 0.3s ease;
}

.nav-item {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  transition: all 0.3s ease;
}

.nav-item:hover {
  color: #fff;
  background: var(--glass-highlight);
  box-shadow: 0 0 20px var(--glow-teal);
  transform: translateY(-2px);
}

.nav-item:hover svg {
  transform: scale(1.1);
}

.nav-item.active {
  background: var(--grad-teal);
  color: #fff;
  box-shadow: 0 0 20px var(--glow-teal);
}

.nav-tooltip {
  position: absolute;
  left: 100%;
  margin-left: 16px;
  background: var(--bg-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  white-space: nowrap;
  border: 1px solid var(--glass-border);
}

.nav-item:hover .nav-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  outline: none;
  gap: 10px;
}

.btn-primary {
  background: var(--grad-velocity);
  color: #fff;
  box-shadow: 0 10px 20px -5px var(--glow-purple), inset 0 2px 4px rgba(255,255,255,0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 25px -5px var(--glow-teal), inset 0 2px 4px rgba(255,255,255,0.4);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

.btn-glass {
  background: var(--glass-surface);
  color: #fff;
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
}

.btn-glass:hover {
  background: var(--glass-highlight);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* Container & Spacing */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
}

.main-content {
  padding-left: calc(var(--nav-width) + 20px);
  padding-top: 80px;
  min-height: 100vh;
}

/* Hero Section */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 40px 20px;
}

.hero-content {
  max-width: 800px;
  z-index: 10;
  animation: fadeInUp 1s ease-out forwards;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-ctas {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* Game Section */
.game-section {
  padding: 120px 0;
  position: relative;
  z-index: 10;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.game-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  border-radius: 30px;
  padding: 2px;
  background: var(--glass-surface);
  box-shadow: 0 30px 60px -10px rgba(0,0,0,0.6);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-container::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 32px;
  background: conic-gradient(from 0deg, var(--kinetic-teal-start), var(--loop-purple-start), var(--kinetic-teal-start));
  z-index: -1;
  animation: spinGlow 4s linear infinite;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.game-container:hover {
  transform: scale(1.02);
}

.game-container:hover::before {
  opacity: 1;
}

.game-glass-layer {
  background: var(--bg-secondary);
  border-radius: 28px;
  overflow: hidden;
  height: 700px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.game-top-bar {
  height: 50px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  justify-content: space-between;
}

.game-dots {
  display: flex;
  gap: 8px;
}
.dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
}
.dot:nth-child(1) { background: #ff5f56; }
.dot:nth-child(2) { background: #ffbd2e; }
.dot:nth-child(3) { background: #27c93f; }

.game-iframe {
  width: 100%;
  flex: 1;
  border: none;
  background: #000;
}

/* Features Grid */
.features-section {
  padding: 100px 0;
  position: relative;
  z-index: 10;
}

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

.feature-card {
  background: var(--grad-glass);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px 30px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.1), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: rgba(20, 184, 166, 0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(20, 184, 166, 0.1);
}

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

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 1px solid var(--glass-border);
  color: var(--kinetic-teal-start);
  position: relative;
}

.feature-icon svg {
  width: 30px;
  height: 30px;
  z-index: 2;
}

.feature-card:hover .feature-icon {
  background: var(--grad-teal);
  color: #fff;
  border-color: transparent;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: #fff;
}

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

/* Content Pages (Legal, About, Contact) */
.page-header {
  padding: 120px 0 60px;
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 60px;
}

.page-header h1 {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.content-container {
  max-width: 800px;
  margin: 0 auto 120px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 60px;
  backdrop-filter: blur(20px);
}

.content-container h2 {
  font-size: 2rem;
  margin: 40px 0 20px;
  color: var(--kinetic-teal-end);
}

.content-container p {
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.content-container ul {
  margin-bottom: 20px;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.content-container li {
  margin-bottom: 10px;
}

/* Contact Form */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--kinetic-teal-start);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 40px;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 10;
  margin-left: calc(var(--nav-width) + 20px);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 30px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.footer-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s;
}

.footer-nav a:hover {
  color: var(--kinetic-teal-start);
}

.legal-notice {
  padding: 24px;
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  max-width: 800px;
  margin: 0 auto;
}

.legal-notice p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

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

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 20px;
}

/* Animations */
@keyframes orbit {
  0% { transform: rotate(0deg) translateX(150px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(150px) rotate(-360deg); }
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
}

@keyframes gridMove {
  0% { transform: perspective(500px) rotateX(60deg) translateY(-100px) scale(3); }
  100% { transform: perspective(500px) rotateX(60deg) translateY(0px) scale(3); }
}

@keyframes spinGlow {
  0% { background: conic-gradient(from 0deg, var(--kinetic-teal-start), var(--loop-purple-start), var(--kinetic-teal-start)); }
  100% { background: conic-gradient(from 360deg, var(--kinetic-teal-start), var(--loop-purple-start), var(--kinetic-teal-start)); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero h1 { font-size: 4rem; }
  .game-glass-layer { height: 600px; }
  .content-container { padding: 40px; }
}

@media (max-width: 768px) {
  :root {
    --nav-width: 0px;
  }
  
  .top-bar {
    padding: 0 20px;
  }
  
  .floating-nav {
    top: auto;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    height: 70px;
    flex-direction: row;
    justify-content: space-around;
    padding: 0 20px;
  }
  
  .nav-tooltip {
    display: none;
  }
  
  .main-content {
    padding-left: 0;
    padding-bottom: 100px;
  }
  
  footer {
    margin-left: 0;
    padding-bottom: 120px;
  }
  
  .game-section {
    padding: 60px 0;
  }
  
  .game-glass-layer {
    height: 500px;
  }
  
  .features-section {
    padding: 60px 0;
  }
  
  .content-container {
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.5rem; }
  .hero-ctas { flex-direction: column; }
  .btn { width: 100%; }
  .game-glass-layer { height: 400px; }
}