:root {
  /* Colors - Optimized for Gamers */
  --bg: #030303;
  --surface: #0a0a0a;
  --surface-2: #121212;
  --surface-3: #1a1a1a;
  --accent: #c8f135;
  --accent-rgb: 200, 241, 53;
  --accent-dim: rgba(var(--accent-rgb), 0.08);
  --accent-soft: rgba(var(--accent-rgb), 0.25);
  --accent-glow: 0 0 20px rgba(var(--accent-rgb), 0.4);
  
  --text: #f5f5f7;
  --text-dim: #9ca3af;
  --text-ghost: #4b5563;
  --border: rgba(255, 255, 255, 0.06);
  --border-active: rgba(var(--accent-rgb), 0.35);
  
  /* Fonts */
  --font-display: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;
  
  /* Utilities */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-lg: 0 10px 40px -10px rgba(0,0,0,0.7);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

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

/* Custom Selection */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* Grid Background & Spotlight */
.grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0%, transparent 60%);
  transition: mask-image 0.1s ease-out;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.ambient-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
  opacity: 0.4;
  filter: blur(100px);
}

.scanlines {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.05) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.01),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.01)
  );
  background-size: 100% 4px, 3px 100%;
  pointer-events: none;
  z-index: 10000;
  opacity: 0.2;
}

/* Components */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.z-1 { position: relative; z-index: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: #d6f94a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(var(--accent-rgb), 0.4);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-3);
  border-color: var(--text-ghost);
  transform: translateY(-2px);
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: var(--transition);
}

nav.scrolled {
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(20px);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo Stack */
.logo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  gap: 4px;
  transition: var(--transition);
}

.logo-stack img {
  filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.2));
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-stack:hover img {
  transform: translateY(-8px) scale(1.1) rotate(5deg);
  filter: drop-shadow(0 15px 30px rgba(var(--accent-rgb), 0.4));
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: -8px;
  transition: var(--transition);
}

.logo-stack:hover .logo-text {
  letter-spacing: 5px;
  text-shadow: 0 0 20px var(--accent-soft);
}

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

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-link:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

/* Hero */
.hero {
  padding: 180px 0 100px;
  text-align: center;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-dim);
  border: 1px solid var(--border-active);
  border-radius: 100px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: fadeInDown 0.8s ease;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  animation: fadeInDown 1s ease;
}

h1 span {
  display: block;
}

h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #fff 50%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 6s linear infinite;
}

@keyframes shine {
  to { background-position: 200% center; }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-container {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.hero-sub {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 40px;
  animation: fadeInUp 1s 0.2s ease backwards;
}

.hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  animation: fadeInUp 1s 0.4s ease backwards;
}

/* Features */
.section {
  padding: 100px 0;
}

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

.section-tag {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 12px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transition: var(--transition);
  transform-origin: bottom;
}

.feature-card:hover {
  background: var(--surface-2);
  border-color: var(--border-active);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.8), 
              0 0 15px rgba(var(--accent-rgb), 0.1);
}

.feature-card:hover::before {
  transform: scaleY(1);
  box-shadow: 0 0 20px var(--accent);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 20px;
  display: block;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

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

/* Portfolio Section */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.game-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.15s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.game-card:hover {
  border-color: var(--border-active);
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.8), 
              0 0 30px rgba(var(--accent-rgb), 0.1);
}

.card-img {
  width: 100%;
  height: 240px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.9));
  transition: var(--transition);
}

.game-card:hover .card-img::after {
  background: linear-gradient(to bottom, transparent 10%, rgba(0,0,0,0.95));
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 24px;
  width: 100%;
  z-index: 10;
}

.game-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.game-dev {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.card-content {
  padding: 24px;
}

.tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tag {
  font-size: 0.7rem;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
}

/* Waitlist CTA */
.waitlist-section {
  padding: 120px 0;
}

.cta-card {
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  padding: 80px 40px;
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::after {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: var(--accent);
  filter: blur(150px);
  opacity: 0.1;
  pointer-events: none;
}

.waitlist-form {
  display: flex;
  max-width: 500px;
  margin: 40px auto 0;
  gap: 12px;
}

.waitlist-form input {
  flex: 1;
  background: var(--surface-3);
  border: 1px solid var(--border);
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition);
}

.waitlist-form input:focus {
  border-color: var(--accent);
}

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

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.social-link {
  color: var(--text-ghost);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.social-link:hover {
  color: var(--text);
}

/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Pixel Lab Section */
.pixel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.pixel-box {
  height: 300px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  image-rendering: pixelated; /* THE PIXEL PART */
  transition: var(--transition);
  cursor: pointer;
}

.pixel-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--bg) 1px, transparent 0);
  background-size: 4px 4px;
  opacity: 0.2;
  z-index: 1;
  pointer-events: none;
}

.pixel-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  opacity: 0.6;
  transition: var(--transition);
}

.pixel-box:hover {
  transform: scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 0 30px var(--accent-dim);
}

.pixel-box:hover::after {
  opacity: 0.9;
}

.pixel-info {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
}

.pixel-info h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-top: 5px;
  color: #fff;
}

/* Custom Cursor */
@media (pointer: fine) {
  body { cursor: none; }
  .custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    transition: width 0.3s, height 0.3s, transform 0.1s;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
  }
  .cursor-glow {
    opacity: 0.5;
    filter: blur(20px);
  }
  .custom-cursor.expand {
    width: 60px;
    height: 60px;
    background: var(--accent-dim);
    border-color: var(--accent);
    opacity: 0.8;
  }
}

/* Hero Terminal */
.hero-terminal {
  max-width: 600px;
  margin: 60px auto 0;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}

.hero-terminal:hover {
  transform: translateY(-5px);
  border-color: var(--border-active);
}

.terminal-header {
  background: var(--surface-2);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.terminal-dots { display: flex; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-ghost);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.terminal-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #fff;
  line-height: 1.8;
}

.terminal-body .cmd { color: var(--accent); }
.terminal-body .status { float: right; color: var(--text-dim); }

.blink { animation: termBlink 1s infinite; }
@keyframes termBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@media (max-width: 768px) {
  .hero-terminal { display: none; }
}
