:root {
  --bg-main: #0a0b0f;
  --bg-darker: #050608;
  --bg-card: rgba(20, 22, 30, 0.7);
  --border-color: rgba(255, 90, 0, 0.3);
  --accent-color: #ff5a00;
  --accent-secondary: #00ffcc;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;

  --font-sans: "Inter", sans-serif;
  --font-mono: "Fira Code", monospace;

  --transition-fast: 150ms ease-out;
  --transition-normal: 220ms ease-out;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* CRT Overlay */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(0, 0, 0, 0) 60%,
    rgba(0, 0, 0, 0.3) 100%
  );
  opacity: 0.5;
}

.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.1)
  );
  background-size: 100% 4px;
  opacity: 0.15;
}

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

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 90, 0, 0.1);
}

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

.logo a {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 16px;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}
.nav-links a:hover {
  color: var(--accent-color);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  background: transparent;
}
.btn-sm:hover {
  background: rgba(255, 90, 0, 0.1);
  box-shadow: 0 0 10px rgba(255, 90, 0, 0.2);
}
.btn-primary {
  background: var(--accent-color);
  color: #fff;
  border: 1px solid var(--accent-color);
}
.btn-primary:hover {
  background: #e65100;
  box-shadow: 0 0 15px rgba(255, 90, 0, 0.4);
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  border-color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.section {
  padding: 100px 0;
}
.dark-section {
  background-color: var(--bg-darker);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* Typography elements */
.accent-text {
  color: var(--accent-color);
}
.mono-title {
  font-family: var(--font-mono);
  color: var(--accent-secondary);
  font-size: 1.5rem;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--accent-color);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 1rem;
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav a {
  color: var(--text-main);
  text-decoration: none;
  padding: 12px 0;
  font-family: var(--font-mono);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding-top: 64px; /* offset navbar */
  overflow: hidden;
}

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

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(255, 90, 0, 0.1);
  border: 1px solid var(--border-color);
  color: var(--accent-color);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.small-line {
  font-family: var(--font-mono);
  color: var(--accent-secondary);
  font-size: 0.9rem;
  margin-bottom: 3rem;
}
.blink {
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* Content blocks */
.content-box {
  max-width: 800px;
}
.lead {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}
.hacker-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 2rem;
}
.hacker-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.95em;
  color: var(--text-muted);
}
.hacker-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent-secondary);
}
.highlight {
  padding: 1rem;
  border-left: 3px solid var(--accent-color);
  background: rgba(255, 90, 0, 0.05);
  font-weight: 500;
}
.mb-md {
  margin-bottom: 1.5rem;
}
.mb-lg {
  margin-bottom: 2.5rem;
}
.mt-lg {
  margin-top: 2.5rem;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.game-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(255, 90, 0, 0.15);
  border-radius: 8px;
  padding: 24px;
  transition:
    transform var(--transition-normal),
    border-color var(--transition-fast),
    box-shadow var(--transition-normal);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(255, 90, 0, 0.05) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}
.game-card:hover .card-glow {
  opacity: 1;
}

.card-header h3 {
  margin: 0 0 8px 0;
  font-size: 1.5rem;
  color: #fff;
}
.badge {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(0, 255, 204, 0.1);
  color: var(--accent-secondary);
  border: 1px solid rgba(0, 255, 204, 0.3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  border-radius: 4px;
  margin-bottom: 16px;
}

.h-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-color);
  margin: 16px 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.feature-list {
  margin: 0 0 16px 0;
  padding-left: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.feature-list li {
  margin-bottom: 6px;
}

.card-note {
  font-size: 0.85rem;
  color: #fff;
  opacity: 0.8;
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-image-wrapper {
  width: 100%;
  height: 200px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(0, 255, 204, 0.2);
}
.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}
.card-image-wrapper svg {
  width: 48px;
  height: 48px;
  color: var(--accent-secondary);
  opacity: 0.3;
}

.glowing-wire {
  width: 100%;
  height: 1px;
  background: rgba(255, 90, 0, 0.2);
  position: relative;
  overflow: hidden;
}
.glowing-wire::after {
  content: "";
  position: absolute;
  top: 0;
  left: -200px;
  width: 200px;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-secondary), transparent);
  animation: wire-data 3s infinite linear;
}
@keyframes wire-data {
  0% { left: -200px; }
  100% { left: 100%; }
}

.card-footer {
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 16px;
}
.footer-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.links a {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-main);
  text-decoration: none;
  transition: background var(--transition-fast);
}
.links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.subtext {
  opacity: 0.5;
  margin-left: 4px;
}

/* Pipeline styles */
.pipeline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 600px;
  margin: 0 auto;
}
.pipe-step {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pipe-icon {
  width: 48px;
  height: 48px;
  background: rgba(0, 255, 204, 0.1);
  border: 1px solid var(--accent-secondary);
  color: var(--accent-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: bold;
}
.pipe-step p {
  font-size: 1.1rem;
  margin: 0;
}
.pipe-connector {
  width: 2px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  margin-left: 23px; /* centers with 48px icon */
  position: relative;
}
.pipe-connector::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-color);
  transform: translateY(-50%);
}

.align-center {
  text-align: center;
  margin: 3rem auto 0 auto;
}

/* Submissions form */
.submit-box {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px;
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  position: relative;
}
.submit-box::before {
  content: "[ FORM ]";
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--bg-main);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #fff;
  font-family: var(--font-sans);
  transition: border-color var(--transition-fast);
  box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}
.submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
}

/* FAQ */
.faq-list {
  max-width: 800px;
}
.faq-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 12px;
  border-radius: 4px;
  padding: 16px;
}
.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-content {
  padding-top: 12px;
  color: var(--text-muted);
}

/* Footer */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 60px 0 20px;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: #fff;
  font-weight: bold;
  margin-bottom: 16px;
}
.footer-tagline {
  max-width: 400px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links a {
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.footer-links a:hover {
  color: var(--accent-color);
}
.copyright {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
}

/* Animation Utilities for Intersection Observer */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    transition: none;
    transform: none;
    opacity: 1 !important; /* fallback to always visible */
  }
}
.is-visible {
  opacity: 1;
  transform: none;
}
.delay-1 {
  transition-delay: 100ms;
}
.delay-2 {
  transition-delay: 200ms;
}
.delay-3 {
  transition-delay: 300ms;
}
.delay-4 {
  transition-delay: 400ms;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: 1fr;
  }
  .hidden-mobile {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
  .nav-links {
    display: none;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero-actions {
    flex-direction: column;
  }
  .pipeline {
    align-items: stretch;
  }
  .pipe-step p {
    font-size: 0.9rem;
  }
}
