:root {
  --bg: #0f0f12;
  --bg-elev: #18181b;
  --card: #222227;
  --card-soft: rgba(34, 34, 39, 0.72);
  --input-bg: #1a1a1f;
  --border: #34343c;
  --border-soft: rgba(255, 255, 255, 0.08);
  --accent: #ff5722;
  --accent-h: #e64a19;
  --accent-glow: rgba(255, 87, 34, 0.32);
  --amber: #ffb74d;
  --green: #00e676;
  --red: #d32f2f;
  --red-h: #b71c1c;
  --btn-bg: #2e2e35;
  --btn-h: #3c3c46;
  --text: #f4f4f6;
  --text-soft: #d4d4d8;
  --muted: #9a9aa6;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-sans: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "Fira Code", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

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

/* Ambient Background */
#ember-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.bg-glow {
  position: fixed;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 620px;
  background: radial-gradient(ellipse at center, rgba(255, 87, 34, 0.17) 0%, rgba(255, 138, 101, 0.05) 45%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  width: min(1180px, 92%);
  margin: 0 auto;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 15, 18, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.04rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff7043, #ff5722 55%, #d84315);
  display: grid;
  place-items: center;
  box-shadow: 0 0 20px rgba(255, 87, 34, 0.45);
}

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(26, 26, 31, 0.9);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}

.flag-ico {
  width: 16px;
  height: 11px;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.lang-btn:hover {
  color: #fff;
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  padding: 11px 20px;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background: linear-gradient(135deg, #ff6d3f, #ff5722);
  color: #fff;
  box-shadow: 0 8px 26px rgba(255, 87, 34, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff7b52, #f4511e);
  box-shadow: 0 10px 32px rgba(255, 87, 34, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(46, 46, 53, 0.72);
  color: #fff;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--btn-h);
  border-color: #4b4b57;
}

.btn-coffee {
  background: rgba(255, 183, 77, 0.12);
  color: #ffd180;
  border: 1px solid rgba(255, 183, 77, 0.38);
}

.btn-coffee:hover {
  background: rgba(255, 183, 77, 0.22);
  border-color: rgba(255, 183, 77, 0.65);
  color: #fff;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 15px;
  font-size: 0.86rem;
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1rem;
  border-radius: 12px;
}

/* Hero Section */
.hero {
  padding: 72px 0 84px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 52px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 87, 34, 0.12);
  border: 1px solid rgba(255, 87, 34, 0.32);
  color: #ff8a65;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.8rem);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(95deg, #ff8a65 0%, #ff5722 45%, #ffb74d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--text-soft);
  font-size: 1.08rem;
  max-width: 540px;
  margin-bottom: 28px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-pill {
  background: rgba(34, 34, 39, 0.65);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 14px;
}

.metric-pill strong {
  display: block;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.metric-pill span {
  font-size: 0.76rem;
  color: var(--muted);
}

/* Interactive Flame App Replica (Hero Right) */
.app-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-stage-glow {
  position: absolute;
  inset: -24px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 87, 34, 0.25), transparent 68%);
  filter: blur(24px);
  z-index: 0;
  pointer-events: none;
}

.live-badge {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--amber);
  background: rgba(255, 183, 77, 0.1);
  border: 1px solid rgba(255, 183, 77, 0.28);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  font-weight: 600;
}

.flame-window {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 452px;
  background: #18181b;
  border-radius: 14px;
  border: 1px solid #34343c;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: opacity 0.15s ease, box-shadow 0.25s ease;
}

.flame-window.clicking-active {
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.75), 0 0 36px rgba(0, 230, 118, 0.22);
  border-color: rgba(0, 230, 118, 0.4);
}

.win-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: #131316;
  border-bottom: 1px solid #26262d;
  font-size: 0.78rem;
  color: var(--muted);
  user-select: none;
}

.win-titlebar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.win-controls {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: #777785;
}

.flame-body {
  padding: 16px 20px 18px;
}

.flame-hdr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.flame-hdr h3 {
  font-size: 1.38rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.flame-status {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  transition: color 0.2s;
}

.flame-status.active {
  color: var(--green);
}

.flame-card {
  background: #222227;
  border: 1px solid #34343c;
  border-radius: 12px;
  padding: 14px 16px 16px;
  margin-bottom: 14px;
}

.flame-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.flame-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 5px;
}

.flame-input {
  width: 100%;
  height: 36px;
  border-radius: 8px;
  background: #1a1a1f;
  border: 1px solid #34343c;
  color: #fff;
  font-family: inherit;
  font-size: 0.94rem;
  text-align: center;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

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

.flame-input.invalid {
  border-color: #ef5350;
}

.flame-input:disabled {
  background: #16161a;
  color: #5a5a64;
  border-color: #26262c;
  cursor: not-allowed;
}

.flame-cps {
  font-size: 0.74rem;
  color: var(--muted);
  margin: 7px 0 11px 2px;
  min-height: 18px;
  font-weight: 500;
}

.flame-cps.max { color: #ff8a65; font-weight: 600; }
.flame-cps.warn { color: var(--amber); font-weight: 600; }
.flame-cps.err { color: #ef5350; font-weight: 600; }

.flame-switch-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8rem;
  color: #e4e4e7;
  cursor: pointer;
  user-select: none;
}

.ctk-switch {
  position: relative;
  width: 36px;
  height: 19px;
  flex-shrink: 0;
}

.ctk-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ctk-slider {
  position: absolute;
  inset: 0;
  background: #44444e;
  border-radius: 999px;
  transition: background 0.2s;
}

.ctk-slider::before {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.ctk-switch input:checked + .ctk-slider {
  background: var(--accent);
}

.ctk-switch input:checked + .ctk-slider::before {
  transform: translateX(17px);
}

.flame-divider {
  height: 1px;
  background: #34343c;
  margin: 13px 0;
}

.flame-dropdown {
  position: relative;
  width: 100%;
}

.flame-dd-trigger {
  width: 100%;
  height: 34px;
  border-radius: 8px;
  background: #1a1a1f;
  border: 1px solid #34343c;
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.flame-dd-trigger:hover {
  background: #2e2e35;
  border-color: #4b4b57;
}

.flame-dd-label {
  line-height: 1;
}

.flame-dd-caret {
  color: #e4e4e7;
  font-size: 0.82rem;
  line-height: 1;
}

.flame-dd-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: #222227;
  border: 1px solid #34343c;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 30;
}

.flame-dropdown.open .flame-dd-menu {
  display: flex;
}

.flame-dd-opt {
  width: 100%;
  border: none;
  background: transparent;
  color: #e4e4e7;
  font-family: inherit;
  font-size: 0.81rem;
  padding: 7px 10px;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
}

.flame-dd-opt:hover,
.flame-dd-opt.active {
  background: #3c3c46;
  color: #fff;
}

.flame-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.flame-btn-start,
.flame-btn-stop,
.flame-btn-settings {
  border-radius: 9px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.flame-btn-start {
  height: 42px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.92rem;
}

.flame-btn-start:hover:not(:disabled) {
  background: var(--accent-h);
}

.flame-btn-start:disabled {
  background: #4a2b22;
  color: #9e8a84;
  cursor: not-allowed;
}

.flame-btn-stop {
  height: 42px;
  border: none;
  background: #2e2e35;
  color: #fff;
  font-size: 0.92rem;
}

.flame-btn-stop:hover {
  background: #3c3c46;
}

.flame-btn-stop.active {
  background: var(--red);
}

.flame-btn-stop.active:hover {
  background: var(--red-h);
}

.flame-btn-settings {
  width: 100%;
  height: 34px;
  background: transparent;
  border: 1px solid #34343c;
  color: #d4d4d8;
  font-size: 0.82rem;
}

.flame-btn-settings:hover {
  background: #222227;
}

.sim-counter-bar {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  width: 100%;
  max-width: 452px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(34, 34, 39, 0.72);
  border: 1px solid var(--border-soft);
  font-size: 0.82rem;
  color: var(--muted);
}

.sim-counter-bar strong {
  color: #fff;
  font-family: var(--font-mono);
}

.sim-disclaimer {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  max-width: 452px;
  text-align: center;
  font-size: 0.74rem;
  color: var(--muted);
  opacity: 0.85;
}

/* Settings Modal Overlay inside Hero */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(6px);
  display: none;
  place-items: center;
  z-index: 120;
  padding: 20px;
}

.modal-backdrop.open {
  display: grid;
}

.flame-modal {
  width: 100%;
  max-width: 332px;
  background: #18181b;
  border: 1px solid #34343c;
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: modalPop 0.18s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-inner {
  padding: 16px;
}

.modal-box {
  background: #222227;
  border: 1px solid #34343c;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.key-cap-btn {
  width: 100%;
  height: 34px;
  border-radius: 8px;
  background: #1a1a1f;
  border: 1px solid #34343c;
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
}

.key-cap-btn.capturing {
  border-color: var(--accent);
  color: #ff8a65;
}

.modal-row-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.flame-range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.retest-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  border: none;
  background: #2e2e35;
  color: #fff;
  font-weight: 700;
  font-size: 0.76rem;
  cursor: pointer;
}

.retest-btn:hover { background: #3c3c46; }
.retest-btn:disabled { opacity: 0.6; cursor: wait; }

/* Sections */
.section {
  padding: 86px 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 54px;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.section-header p {
  color: var(--muted);
  font-size: 1.02rem;
}

/* UI Showcase Alternating Rows */
.showcase-list {
  display: flex;
  flex-direction: column;
  gap: 56px;
  margin-bottom: 64px;
}

.showcase-row {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 44px;
  align-items: center;
  background: var(--card-soft);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 32px;
}

.showcase-row.reverse {
  grid-template-columns: 0.92fr 1.08fr;
}

.showcase-row.reverse .showcase-media {
  order: 2;
}

.showcase-media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: radial-gradient(circle at 50% 45%, rgba(255, 87, 34, 0.22) 0%, #141418 65%, #0e0e11 100%);
  padding: 28px 24px 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
}

.showcase-media img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 430px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.35s ease;
}

.showcase-media:hover img {
  transform: scale(1.02);
}

.media-caption {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(15, 15, 18, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  color: var(--text-soft);
}

.showcase-content h3 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.showcase-content > p {
  color: var(--text-soft);
  margin-bottom: 20px;
}

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

.feature-bullets li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.93rem;
  color: var(--text-soft);
}

.bullet-dot {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(255, 87, 34, 0.16);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 2px;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.bento-card {
  background: var(--card-soft);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.bento-card:hover {
  border-color: rgba(255, 87, 34, 0.45);
  transform: translateY(-3px);
}

.bento-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(255, 87, 34, 0.14);
  border: 1px solid rgba(255, 87, 34, 0.28);
  color: #ff8a65;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.bento-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.bento-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Surprise Playground Section */
.playground-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.play-card {
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.play-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
}

.play-card p {
  font-size: 0.92rem;
  color: var(--muted);
}

.cps-pad {
  height: 176px;
  border-radius: 14px;
  border: 2px dashed rgba(255, 87, 34, 0.45);
  background: radial-gradient(circle at center, rgba(255, 87, 34, 0.12), rgba(24, 24, 27, 0.9));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.06s, border-color 0.2s, background 0.2s;
}

.cps-pad:active {
  transform: scale(0.985);
  background: radial-gradient(circle at center, rgba(255, 87, 34, 0.26), rgba(24, 24, 27, 0.95));
  border-color: var(--accent);
}

.cps-pad-big {
  font-size: 2rem;
  font-weight: 850;
  color: #fff;
}

.cps-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mini-stat {
  background: #18181b;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}

.mini-stat span {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

.mini-stat strong {
  font-size: 1.12rem;
  font-family: var(--font-mono);
  color: #fff;
}

#jitter-canvas {
  width: 100%;
  height: 176px;
  border-radius: 14px;
  background: #141418;
  border: 1px solid var(--border);
  display: block;
}

.jitter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #18181b;
  border: 1px solid var(--border-soft);
  padding: 12px 16px;
  border-radius: 12px;
}

/* Source Code Viewer */
.code-shell {
  background: #121216;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

.code-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #18181d;
  border-bottom: 1px solid var(--border);
}

.code-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: #fff;
}

.mac-dots {
  display: flex;
  gap: 6px;
}

.mac-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.mac-dots span:nth-child(1) { background: #ff5f56; }
.mac-dots span:nth-child(2) { background: #ffbd2e; }
.mac-dots span:nth-child(3) { background: #27c93f; }

.code-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 18px;
  background: #15151a;
  border-bottom: 1px solid var(--border-soft);
}

.code-tab {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.code-tab:hover {
  color: #fff;
  border-color: var(--border);
}

.code-tab.active {
  background: rgba(255, 87, 34, 0.16);
  border-color: rgba(255, 87, 34, 0.5);
  color: #ff8a65;
}

.code-scroll {
  max-height: 540px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.62;
  padding: 16px 0;
}

.code-line {
  display: grid;
  grid-template-columns: 56px 1fr;
  padding: 0 20px 0 0;
  transition: background 0.15s;
}

.code-line:hover {
  background: rgba(255, 255, 255, 0.03);
}

.code-line.highlight {
  background: rgba(255, 87, 34, 0.14);
  border-left: 3px solid var(--accent);
}

.ln {
  text-align: right;
  padding-right: 16px;
  color: #555563;
  user-select: none;
}

.lc {
  white-space: pre;
  color: #e4e4e7;
}

/* Syntax Highlighting */
.tok-kw { color: #ff7b72; font-weight: 600; }
.tok-fn { color: #d2a8ff; }
.tok-str { color: #a5d6ff; }
.tok-num { color: #79c0ff; }
.tok-com { color: #768390; font-style: italic; }
.tok-cls { color: #ffa657; }

/* Download Section */
.download-box {
  position: relative;
  border-radius: 26px;
  padding: 48px;
  background: linear-gradient(145deg, rgba(34, 34, 39, 0.92), rgba(20, 20, 24, 0.96));
  border: 1px solid rgba(255, 87, 34, 0.42);
  box-shadow: 0 32px 84px rgba(0, 0, 0, 0.65), 0 0 60px rgba(255, 87, 34, 0.14);
  overflow: hidden;
}

.download-box::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255, 87, 34, 0.25), transparent 70%);
  pointer-events: none;
}

.download-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.dl-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.dl-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.dl-badge.green {
  color: var(--green);
  border-color: rgba(0, 230, 118, 0.3);
  background: rgba(0, 230, 118, 0.08);
}

.download-box h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.55rem);
  font-weight: 850;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.download-box p {
  color: var(--text-soft);
  margin-bottom: 24px;
}

.dl-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.dl-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.setup-card {
  background: #141418;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}

.setup-card h4 {
  font-size: 0.96rem;
  margin-bottom: 14px;
  color: #fff;
}

.cmd-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #0d0d10;
  border: 1px solid #2b2b33;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #ffab91;
  margin-bottom: 12px;
  overflow-x: auto;
}

.cmd-copy {
  background: #24242b;
  border: 1px solid #383842;
  color: #e4e4e7;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.cmd-copy:hover {
  background: #33333d;
}

.exe-details {
  margin-top: 12px;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}

.exe-details summary {
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--amber);
}

.exe-details .cmd-box {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 0.74rem;
}

/* Reviews Section */
.reviews-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--card-soft);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 26px 32px;
  margin-bottom: 28px;
}

.rating-big {
  display: flex;
  align-items: center;
  gap: 18px;
}

.rating-score {
  font-size: 3rem;
  font-weight: 850;
  line-height: 1;
  color: #fff;
}

.stars {
  color: #ffb74d;
  letter-spacing: 2px;
  font-size: 1.15rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.review-card {
  background: var(--card-soft);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reviewer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7043, #bf360c);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
}

.reviewer strong {
  display: block;
  font-size: 0.92rem;
}

.reviewer span {
  font-size: 0.76rem;
  color: var(--muted);
}

.review-text {
  font-size: 0.9rem;
  color: var(--text-soft);
}

.review-form-card {
  background: #18181c;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
}

.review-form-card h3 {
  font-size: 1.18rem;
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  margin-bottom: 14px;
}

.form-input,
.form-textarea {
  width: 100%;
  background: #121216;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 11px 14px;
  outline: none;
}

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

.form-textarea {
  min-height: 92px;
  resize: vertical;
  margin-bottom: 14px;
}

.star-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #121216;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
}

.star-btn {
  background: none;
  border: none;
  color: #4b4b57;
  font-size: 1.35rem;
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
}

.star-btn.lit {
  color: #ffb74d;
}

.star-btn:hover {
  transform: scale(1.15);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 36px 0 48px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer a {
  color: var(--text-soft);
  text-decoration: none;
}

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

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #222227;
  border: 1px solid var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid,
  .showcase-row,
  .showcase-row.reverse,
  .playground-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .showcase-row.reverse .showcase-media {
    order: 0;
  }

  .bento-grid,
  .reviews-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-metrics,
  .bento-grid,
  .reviews-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .download-box,
  .showcase-row {
    padding: 22px;
  }
}
