/* ===== CSS Variables ===== */
:root {
  /* Backgrounds */
  --bg-page: #0A0A0A;
  --bg-section-alt: #0F0F0F;
  --bg-card: #1A1A1A;
  --bg-surface: #1F1F1F;
  --bg-hover: #252525;
  --bg-terminal: #111111;
  --bg-terminal-header: #161616;
  --bg-footer: #050505;

  /* Primary Accent - Roblox Red */
  --red-primary: #E34C4C;

  /* Secondary Accents */
  --green-primary: #22C55E;
  --blue-primary: #3B82F6;
  --amber-primary: #F59E0B;
  --purple-primary: #A855F7;
  --pink-primary: #EC4899;

  /* Neutral */
  --text-primary: #E5E5E5;
  --text-secondary: #737373;
  --text-tertiary: #525252;
  --text-muted: #3B3B3B;
  --border-subtle: #1F1F1F;
  --border-divider: #252525;

  /* Font */
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 64px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-icon {
  position: relative;
  width: 36px;
  height: 36px;
  background-color: var(--red-primary);
  border-radius: 4px;
}

.logo-icon-sm {
  width: 32px;
  height: 32px;
}

.logo-block {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.logo-icon-sm .logo-block {
  width: 10px;
  height: 10px;
}

.block-green {
  background-color: var(--green-primary);
  top: 4px;
  left: 4px;
}

.block-blue {
  background-color: var(--blue-primary);
  top: 12px;
  left: 20px;
}

.block-amber {
  background-color: var(--amber-primary);
  top: 20px;
  left: 12px;
}

.logo-icon-sm .block-green {
  top: 4px;
  left: 4px;
}

.logo-icon-sm .block-blue {
  top: 10px;
  left: 18px;
}

.logo-icon-sm .block-amber {
  top: 18px;
  left: 10px;
}

.logo-img {
  height: 36px;
  width: auto;
}

.logo-img-sm {
  height: 32px;
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background-color: #f25757;
  transform: translateY(-1px);
}

.btn-white {
  background-color: #FFFFFF;
  color: var(--bg-page);
}

.btn-white:hover {
  background-color: #F0F0F0;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid #333333;
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-xl {
  padding: 18px 40px;
  font-size: 18px;
  border-radius: 8px;
}

.btn-icon {
  font-weight: 600;
}

/* ===== Hero Section ===== */
.hero {
  padding: 192px 64px 80px;
  background-color: var(--bg-page);
}

.hero-content {
  max-width: 1312px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--red-primary);
  font-size: 12px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--green-primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.headline-group {
  text-align: center;
}

.headline {
  font-size: 64px;
  font-weight: 700;
  line-height: 1.1;
}

.headline-accent {
  color: var(--red-primary);
}

.subhead {
  max-width: 800px;
  font-size: 18px;
  color: var(--text-secondary);
  text-align: center;
}

.cta-group {
  display: flex;
  gap: 16px;
}

/* ===== Terminal ===== */
.terminal {
  width: 100%;
  max-width: 900px;
  background-color: var(--bg-terminal);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background-color: var(--bg-terminal-header);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red { background-color: var(--red-primary); }
.dot-amber { background-color: var(--amber-primary); }
.dot-green { background-color: var(--green-primary); }

.terminal-title {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: 8px;
}

.terminal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.terminal-line {
  font-size: 14px;
  color: var(--text-secondary);
}

.term-user { color: var(--blue-primary); }
.term-ai { color: var(--text-secondary); }
.term-success { color: var(--green-primary); }
.term-link { color: var(--blue-primary); }

.terminal-cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background-color: var(--red-primary);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Interactive Terminal */
.terminal-interactive {
  position: relative;
}

.terminal-status {
  margin-left: auto;
  font-size: 11px;
  color: var(--green-primary);
  animation: pulse 2s infinite;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-terminal-header);
}

#hero-terminal-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  flex: 1;
  outline: none;
  caret-color: var(--red-primary);
}

#hero-terminal-input::placeholder {
  color: var(--text-tertiary);
}

#hero-terminal-input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

#hero-terminal-input:not(:disabled) {
  opacity: 1;
}

.terminal-interactive .terminal-body {
  min-height: 200px;
  max-height: 300px;
  overflow-y: auto;
}

/* Typing indicator */
.typing-indicator {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background-color: var(--text-tertiary);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
.typing-indicator span:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* ===== Sections ===== */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  font-size: 14px;
  margin-bottom: 16px;
  display: block;
}

.tag-red { color: var(--red-primary); }
.tag-green { color: var(--green-primary); }
.tag-blue { color: var(--blue-primary); }
.tag-amber { color: var(--amber-primary); }
.tag-purple { color: var(--purple-primary); }

.section-title {
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 16px;
  color: var(--text-tertiary);
}

/* ===== Features Section ===== */
.features {
  padding: 80px 64px;
  background-color: var(--bg-section-alt);
}

.features-grid {
  max-width: 1312px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background-color: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-divider);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: var(--text-tertiary);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.icon-green {
  background-color: rgba(34, 197, 94, 0.12);
  color: var(--green-primary);
}

.icon-red {
  background-color: rgba(227, 76, 76, 0.12);
  color: var(--red-primary);
}

.icon-blue {
  background-color: rgba(59, 130, 246, 0.12);
  color: var(--blue-primary);
}

.icon-amber {
  background-color: rgba(245, 158, 11, 0.12);
  color: var(--amber-primary);
}

.icon-purple {
  background-color: rgba(168, 85, 247, 0.12);
  color: var(--purple-primary);
}

.icon-pink {
  background-color: rgba(236, 72, 153, 0.12);
  color: var(--pink-primary);
}

.feature-title {
  font-size: 16px;
  font-weight: 600;
}

.feature-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== How It Works Section ===== */
.how-it-works {
  padding: 80px 64px;
  background-color: var(--bg-page);
}

.steps-flow {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.step-card {
  width: 280px;
  padding: 32px;
  background-color: var(--bg-card);
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.step-green { border: 1px solid rgba(34, 197, 94, 0.2); }
.step-blue { border: 1px solid rgba(59, 130, 246, 0.2); }
.step-red { border: 1px solid rgba(227, 76, 76, 0.2); }

.step-num {
  font-size: 48px;
  font-weight: 700;
}

.step-green .step-num { color: var(--green-primary); }
.step-blue .step-num { color: var(--blue-primary); }
.step-red .step-num { color: var(--red-primary); }

.step-title {
  font-size: 16px;
  font-weight: 600;
}

.step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-arrow {
  font-size: 32px;
  color: #333333;
}

/* ===== Editors Section ===== */
.editors {
  padding: 80px 64px;
  background-color: var(--bg-section-alt);
}

.editors-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 32px;
}

.editor-card {
  width: 200px;
  padding: 32px;
  background-color: var(--bg-card);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s;
}

.editor-card:hover {
  transform: translateY(-4px);
}

.editor-icon {
  width: 64px;
  height: 64px;
  background-color: var(--bg-page);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--green-primary);
}

.editor-name {
  font-size: 18px;
  font-weight: 600;
}

.editor-status {
  font-size: 12px;
  color: var(--green-primary);
}

/* ===== Installation Section ===== */
.installation {
  padding: 80px 64px;
  background-color: var(--bg-page);
}

/* Setup Guide */
.setup-guide {
  max-width: 900px;
  margin: 0 auto 64px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.setup-section {
  background-color: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.setup-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.setup-header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setup-title {
  font-size: 18px;
  font-weight: 600;
}

.setup-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
}

.setup-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.prereq-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.prereq-list li::before {
  content: "→";
  color: var(--green-primary);
}

.prereq-optional {
  opacity: 0.7;
}

.prereq-optional::before {
  content: "○" !important;
  color: var(--text-tertiary) !important;
}

.prereq-tag {
  font-size: 10px;
  padding: 2px 8px;
  background-color: var(--bg-surface);
  border-radius: 4px;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.prereq-link {
  color: var(--blue-primary);
  font-size: 12px;
}

.prereq-link:hover {
  text-decoration: underline;
}

.setup-note {
  font-size: 13px;
  color: var(--text-secondary);
}

.setup-alt {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

.setup-skip {
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
}

.setup-success {
  font-size: 14px;
  color: var(--text-primary);
  padding: 16px;
  background-color: rgba(34, 197, 94, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.setup-substeps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.substep {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.substep-label {
  color: var(--text-tertiary);
  font-weight: 600;
  min-width: 24px;
}

.plugin-paths {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background-color: var(--bg-surface);
  border-radius: 8px;
}

.plugin-path {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.path-os {
  color: var(--text-tertiary);
  min-width: 70px;
}

.path-code {
  color: var(--amber-primary);
  font-size: 12px;
}

.inline-code {
  background-color: var(--bg-surface);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--blue-primary);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--bg-page);
  flex-shrink: 0;
}

.num-green { background-color: var(--green-primary); }
.num-blue { background-color: var(--blue-primary); }
.num-amber { background-color: var(--amber-primary); }
.num-red { background-color: var(--red-primary); }
.num-purple { background-color: var(--purple-primary); }

/* Code Blocks */
.code-block {
  background-color: var(--bg-terminal);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.code-block-inline {
  width: 100%;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background-color: var(--bg-terminal-header);
}

.code-title {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: 8px;
}

.code-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.code-body code {
  font-size: 13px;
  color: var(--text-secondary);
  display: block;
}

.term-comment {
  color: var(--text-tertiary);
}

/* Setup Terminal Animation */
.setup-terminal-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.terminal-section-title {
  font-size: 14px;
  color: var(--green-primary);
  margin-bottom: 16px;
  text-align: center;
}

.terminal-animated {
  min-height: 400px;
}

.terminal-animated .terminal-body {
  min-height: 340px;
}

.terminal-line-typed {
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.term-output {
  color: var(--text-secondary);
}

.term-comment {
  color: var(--text-tertiary);
  font-style: italic;
}

.term-final {
  color: var(--green-primary);
  font-weight: 600;
}

.terminal-animated .terminal-body {
  overflow-y: auto;
  max-height: 380px;
}

/* Responsive adjustments for setup */
@media (max-width: 768px) {
  .setup-guide {
    gap: 24px;
  }

  .setup-header {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .setup-content {
    padding: 16px;
  }

  .prereq-list li {
    flex-wrap: wrap;
  }

  .plugin-paths {
    font-size: 11px;
  }

  .path-code {
    font-size: 10px;
    word-break: break-all;
  }

  .terminal-animated {
    min-height: 300px;
  }

  .terminal-animated .terminal-body {
    min-height: 240px;
    max-height: 280px;
  }
}

/* ===== Social Proof Section ===== */
.social-proof {
  padding: 80px 64px;
  background-color: var(--bg-section-alt);
}

.stats-row {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 64px;
}

.stat {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-value {
  font-size: 48px;
  font-weight: 700;
}

.stat-green { color: var(--green-primary); }
.stat-blue { color: var(--blue-primary); }
.stat-amber { color: var(--amber-primary); }
.stat-red { color: var(--red-primary); }

.stat-label {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* ===== Final CTA Section ===== */
.final-cta {
  padding: 100px 64px;
  background-color: var(--bg-page);
}

.cta-box {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px;
  background-color: var(--bg-card);
  border-radius: 16px;
  border: 2px solid rgba(227, 76, 76, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.cta-title {
  font-size: 48px;
  font-weight: 700;
}

.cta-sub {
  font-size: 18px;
  color: var(--text-secondary);
}

.cta-buttons {
  display: flex;
  gap: 16px;
}

/* ===== Footer ===== */
.footer {
  padding: 48px 64px 32px;
  background-color: var(--bg-footer);
}

.footer-main {
  max-width: 1312px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

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

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

.footer-col-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-link {
  font-size: 12px;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

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

.footer-divider {
  max-width: 1312px;
  margin: 32px auto;
  height: 1px;
  background-color: var(--border-subtle);
}

.footer-bottom {
  max-width: 1312px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

.social-link {
  font-size: 11px;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

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

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .install-content {
    flex-direction: column;
    align-items: center;
  }

  .code-block {
    width: 100%;
    max-width: 600px;
  }
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-flow {
    flex-direction: column;
  }

  .step-arrow {
    transform: rotate(90deg);
  }

  .editors-grid {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: 0 24px;
  }

  .nav {
    display: none;
  }

  .hero {
    padding: 140px 24px 60px;
  }

  .headline {
    font-size: 36px;
  }

  .subhead {
    font-size: 14px;
  }

  .cta-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-large, .btn-xl {
    width: 100%;
    justify-content: center;
  }

  .terminal {
    width: 100%;
  }

  .features, .how-it-works, .editors, .installation, .social-proof, .final-cta {
    padding: 60px 24px;
  }

  .section-title {
    font-size: 28px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .step-card {
    width: 100%;
    max-width: 320px;
  }

  .editors-grid {
    flex-direction: column;
    align-items: center;
  }

  .editor-card {
    width: 100%;
    max-width: 280px;
  }

  .stats-row {
    flex-wrap: wrap;
    gap: 32px;
  }

  .stat-value {
    font-size: 36px;
  }

  .cta-box {
    padding: 32px 24px;
  }

  .cta-title {
    font-size: 28px;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }

  .footer-main {
    flex-direction: column;
    gap: 48px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
