:root {
  --bg-deep: #040409;
  --bg-dark: #0a0714;
  --bg-card: rgba(15, 10, 31, 0.82);
  --bg-card-hover: rgba(24, 16, 48, 0.92);
  --cyan: #00f5ff;
  --cyan-soft: rgba(0, 245, 255, 0.16);
  --purple: #bd00ff;
  --purple-mid: #9d00ff;
  --lavender: #d79bff;
  --gold: #facc15;
  --emerald: #00ff88;
  --danger: #ff4466;
  --text-main: #f3eeff;
  --text-muted: #9ca3af;
  --border-neon: rgba(0, 245, 255, 0.28);
  --border-purple: rgba(189, 0, 255, 0.35);
  --shadow-cyan: 0 0 24px rgba(0, 245, 255, 0.25);
  --shadow-purple: 0 0 28px rgba(189, 0, 255, 0.28);
  --radius-lg: 18px;
  --radius-md: 12px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(0, 245, 255, 0.09) 0%, transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(189, 0, 255, 0.11) 0%, transparent 42%),
    radial-gradient(circle at 50% 65%, rgba(157, 0, 255, 0.07) 0%, transparent 50%);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #06040d;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  border-radius: 4px;
}

/* Subtle Cyber Grid Overlay */
.cyber-grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(0, 245, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(189, 0, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, black 30%, transparent 85%);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(6, 4, 14, 0.82);
  border-bottom: 1px solid rgba(0, 245, 255, 0.18);
  padding: 0.85rem 2rem;
}

.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: #cbd5e1;
  font-weight: 700;
}

.brand-title {
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #c084fc 0%, #00f5ff 45%, #facc15 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}

.nav-links a {
  color: #d8ccf0;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s, text-shadow 0.2s;
}

.nav-links a:hover {
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.6);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lang-pill {
  background: #151522;
  border: 1.5px solid var(--cyan);
  color: var(--lavender);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-pill.active {
  background: var(--cyan);
  color: #0b0616;
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.55);
}

/* Main Layout */
main {
  position: relative;
  z-index: 1;
}

.section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 3.5rem auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.35);
  color: var(--cyan);
  margin-bottom: 1rem;
  box-shadow: 0 0 18px rgba(0, 245, 255, 0.15);
}

.section-title {
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(90deg, var(--cyan) 0%, var(--lavender) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.06rem;
}

/* Hero Section */
.hero {
  padding-top: 3.5rem;
  padding-bottom: 4rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.5rem, 4.6vw, 4.1rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.14rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
  max-width: 620px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(90deg, var(--cyan) 0%, #00b8ff 100%);
  color: #090514;
  box-shadow: 0 0 25px rgba(0, 245, 255, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(0, 245, 255, 0.75);
}

.btn-secondary {
  background: rgba(21, 21, 34, 0.85);
  color: var(--cyan);
  border: 1.5px solid var(--cyan);
  box-shadow: 0 0 18px rgba(189, 0, 255, 0.22);
}

.btn-secondary:hover {
  background: rgba(0, 245, 255, 0.12);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  background: rgba(15, 10, 31, 0.78);
  border: 1px solid rgba(0, 245, 255, 0.22);
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem;
  text-align: center;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--cyan);
  font-family: 'Consolas', monospace;
}

.stat-label {
  font-size: 0.76rem;
  color: var(--lavender);
  margin-top: 0.2rem;
  font-weight: 600;
}

/* Hero Visual Card */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-art-frame {
  position: relative;
  width: 100%;
  max-width: 500px;
  border-radius: 24px;
  overflow: hidden;
  border: 1.5px solid rgba(0, 245, 255, 0.4);
  box-shadow:
    0 0 40px rgba(189, 0, 255, 0.35),
    0 0 70px rgba(0, 245, 255, 0.18);
  background: #050508;
}

.hero-art-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.hero-floating-badge {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  background: rgba(10, 6, 22, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 245, 255, 0.38);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
  display: inline-block;
  margin-right: 0.5rem;
}

/* Video Demonstration Showcase Theater */
.video-showcase-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.75rem;
  align-items: start;
}

.video-playlist {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.video-tab-btn {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid rgba(215, 155, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.video-tab-btn:hover {
  border-color: var(--cyan);
  background: var(--bg-card-hover);
}

.video-tab-btn.active {
  border-color: var(--cyan);
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.14) 0%, rgba(189, 0, 255, 0.18) 100%);
  box-shadow: var(--shadow-cyan);
}

.video-tab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.video-tab-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
}

.video-tab-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.video-upload-box {
  margin-top: 0.5rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(0, 245, 255, 0.45);
  background: rgba(0, 245, 255, 0.05);
  text-align: center;
}

.video-upload-box label {
  display: inline-block;
  cursor: pointer;
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.85rem;
}

.video-upload-box p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.video-stage {
  background: #070510;
  border: 1.5px solid rgba(0, 245, 255, 0.38);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-purple);
}

.video-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: rgba(18, 12, 36, 0.95);
  border-bottom: 1px solid rgba(0, 245, 255, 0.2);
}

.window-dots {
  display: flex;
  gap: 0.45rem;
}

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

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.stage-badge {
  font-family: 'Consolas', monospace;
  font-size: 0.8rem;
  color: var(--emerald);
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.35);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
}

.video-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #040309;
  overflow: hidden;
}

#demoVideoPlayer {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  background: #000;
}

#videoAiOverlayCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  display: none;
}

.video-overlay-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
  padding: 0.75rem 1.25rem;
  background: rgba(16, 10, 34, 0.96);
  border-top: 1px solid rgba(0, 245, 255, 0.25);
}

.vot-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan);
}

#demoCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.video-stage-footer {
  padding: 1.15rem 1.4rem;
  background: rgba(13, 9, 26, 0.95);
  border-top: 1px solid rgba(215, 155, 255, 0.16);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.stage-info h3 {
  font-size: 1.12rem;
  color: var(--cyan);
  margin-bottom: 0.2rem;
}

.stage-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.stage-controls {
  display: flex;
  gap: 0.6rem;
}

.mini-btn {
  background: #161229;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
}

.mini-btn:hover {
  background: var(--cyan);
  color: #080512;
}

/* Interactive App Simulator */
.app-sim-shell {
  background: linear-gradient(180deg, #0b0718 0%, #06040e 100%);
  border: 1.5px solid rgba(189, 0, 255, 0.45);
  border-radius: 20px;
  box-shadow:
    0 0 45px rgba(189, 0, 255, 0.25),
    inset 0 0 30px rgba(0, 245, 255, 0.05);
  overflow: hidden;
}

.app-sim-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  background: #100a22;
  border-bottom: 1px solid rgba(0, 245, 255, 0.25);
}

.app-sim-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(10, 6, 20, 0.9);
  border-bottom: 1px solid rgba(215, 155, 255, 0.15);
  flex-wrap: wrap;
}

.sim-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.sim-tab.active {
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
  background: rgba(250, 204, 21, 0.08);
}

.sim-panel {
  display: none;
  padding: 1.75rem;
}

.sim-panel.active {
  display: block;
}

/* Controller Table Replica (Matches User Screenshot!) */
.controller-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 12px;
  background: #06050c;
}

.controller-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.controller-table th {
  background: linear-gradient(180deg, #1b1433 0%, #0d091a 100%);
  color: #e2d9f3;
  font-style: italic;
  font-weight: 800;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--cyan);
  border-right: 1px solid rgba(0, 245, 255, 0.25);
  text-align: center;
}

.controller-table td {
  padding: 0.85rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(58, 52, 22, 0.32);
  color: #fff;
  font-style: italic;
  font-weight: 600;
}

.overclock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
  font-weight: 900;
  font-style: normal;
  font-family: 'Consolas', monospace;
  background: rgba(0, 255, 136, 0.14);
  color: var(--emerald);
  border: 1px solid var(--emerald);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.35);
}

.profile-select-pill {
  background: #2b2623;
  border: 1px solid rgba(0, 245, 255, 0.45);
  color: #f3eeff;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  font-style: italic;
  font-weight: 700;
}

.overclock-tester-bar {
  margin-top: 1.4rem;
  padding: 1.1rem 1.25rem;
  background: rgba(18, 12, 36, 0.85);
  border: 1px solid rgba(0, 245, 255, 0.25);
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hz-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hz-btn {
  background: #140e28;
  border: 1px solid rgba(215, 155, 255, 0.3);
  color: var(--lavender);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-family: 'Consolas', monospace;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s;
}

.hz-btn.active {
  background: var(--emerald);
  color: #05140c;
  border-color: var(--emerald);
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.55);
}

/* Macro & AI Gates Replica */
.gates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.gate-card {
  background: rgba(15, 10, 31, 0.9);
  border: 1px solid rgba(189, 0, 255, 0.35);
  border-radius: 14px;
  padding: 1.25rem;
}

.gate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(0, 245, 255, 0.18);
}

.gate-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--lavender);
}

.neon-switch {
  position: relative;
  width: 42px;
  height: 22px;
  background: rgba(196, 181, 253, 0.28);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
}

.neon-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f3eeff;
  transition: transform 0.2s;
}

.neon-switch.on {
  background: var(--purple);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.65);
}

.neon-switch.on::after {
  transform: translateX(20px);
}

.slider-row {
  margin-bottom: 0.85rem;
}

.slider-label-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
  color: var(--cyan);
  font-weight: 700;
}

.slider-label-line span:last-child {
  font-family: 'Consolas', monospace;
  color: var(--lavender);
}

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

/* Features Bento Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 245, 255, 0.22);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: var(--shadow-cyan);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.16), rgba(189, 0, 255, 0.22));
  border: 1px solid rgba(0, 245, 255, 0.38);
  margin-bottom: 1.15rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  color: #fff;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.feature-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.feature-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  background: rgba(189, 0, 255, 0.16);
  color: var(--lavender);
  border: 1px solid rgba(215, 155, 255, 0.25);
}

/* Supported Games & Controllers */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid rgba(215, 155, 255, 0.22);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: all 0.2s;
}

.game-card:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
}

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

.game-name {
  font-weight: 800;
  font-size: 1.02rem;
  color: #fff;
}

.onnx-pill {
  font-family: 'Consolas', monospace;
  font-size: 0.72rem;
  color: var(--cyan);
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

.game-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Controllers Compatibility Strip */
.controllers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.controller-card {
  background: linear-gradient(145deg, rgba(18, 12, 36, 0.9), rgba(9, 6, 20, 0.9));
  border: 1px solid rgba(0, 245, 255, 0.28);
  border-radius: 16px;
  padding: 1.4rem;
}

.controller-card h4 {
  color: var(--cyan);
  font-size: 1.08rem;
  margin-bottom: 0.4rem;
}

.controller-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  border-top: 1px solid rgba(0, 245, 255, 0.18);
  background: #040309;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ==========================================================================
   AUTHENTIC MIND CORE MACRO EXTENSION REPLICA (1:1 INTERACTIVE UI)
   ========================================================================== */
.macro-showcase-grid {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 2rem;
  align-items: start;
}

.macro-ext-window {
  background: #07050b;
  border: 1.5px solid #6b21a8;
  border-radius: 6px;
  box-shadow:
    0 0 35px rgba(157, 0, 255, 0.35),
    0 15px 45px rgba(0, 0, 0, 0.85);
  font-family: 'Segoe UI', Tahoma, sans-serif;
  user-select: none;
  overflow: hidden;
}

.macro-ext-titlebar {
  height: 32px;
  background: #14111d;
  border-bottom: 1px solid #2d1f42;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.macro-ext-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
}

.macro-ext-title-left img {
  width: 18px;
  height: 18px;
  border-radius: 3px;
}

.macro-ext-winbtns {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #6b7280;
  font-size: 13px;
}

.macro-ext-winbtns span {
  cursor: pointer;
  transition: color 0.15s;
}

.macro-ext-winbtns span:hover {
  color: #00f5ff;
}

.macro-ext-body {
  padding: 10px 12px 10px 10px;
  background: #06040a;
  border: 1px solid #4c1d95;
  margin: 6px;
  position: relative;
}

/* Tree Node Structure */
.m-tree-root {
  position: relative;
}

.m-gate-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
}

.m-caret {
  color: #d1d5db;
  font-size: 9px;
  width: 12px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s;
}

.m-caret.collapsed {
  transform: rotate(-90deg);
}

/* Rectangular Cyan/White Gate Switch (Matches MainGate Toggle) */
.m-rect-switch {
  width: 28px;
  height: 14px;
  background: #374151;
  border: 1px solid #9ca3af;
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.m-rect-switch::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 11px;
  height: 10px;
  background: #ffffff;
  transition: transform 0.15s, background 0.15s;
}

.m-rect-switch.on {
  background: #00d4ff;
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.7);
}

.m-rect-switch.on::after {
  transform: translateX(13px);
  background: #ffffff;
}

.m-gate-label {
  color: #a855f7;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.35);
}

.m-gate-children {
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px dashed rgba(156, 163, 175, 0.32);
}

.m-gate-children.disabled-gate {
  opacity: 0.35;
  pointer-events: none;
}

.m-gate-children.collapsed-gate {
  display: none;
}

/* Language Toggle inside Gate 0 */
.m-lang-row {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin: 2px 6px 6px 0;
}

.m-lang-btn {
  width: 58px;
  height: 22px;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid #22d3ee;
  border-radius: 2px;
  cursor: pointer;
}

.m-lang-btn.active {
  background: #22d3ee;
  color: #0a0614;
}

.m-lang-btn.inactive {
  background: #0c0818;
  color: #22d3ee;
}

/* Section Headers inside Gate 0 */
.m-sec-header {
  color: #9d00ff;
  font-weight: 800;
  font-size: 15.5px;
  margin: 8px 0 6px 0;
}

.m-sub-header {
  color: #9d00ff;
  font-weight: 800;
  font-size: 12.5px;
  margin: 8px 0 6px 0;
}

.m-config-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}

.m-cfg-btn {
  height: 26px;
  background: rgba(18, 10, 36, 0.85);
  border: 1px solid #00f5ff;
  color: #00f5ff;
  font-weight: 700;
  font-size: 11.5px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
}

.m-cfg-btn:hover {
  background: #00f5ff;
  color: #090514;
}

.m-cfg-btn.kbm {
  background: #1a1230;
  color: #c084fc;
  border-color: #d79bff;
}

.m-cfg-btn.kbm:hover {
  background: #9d00ff;
  color: #fff;
}

/* Trigger Mapping Combos */
.m-trig-grid {
  display: grid;
  grid-template-columns: 95px 92px;
  row-gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}

.m-trig-label {
  color: #00f5ff;
  font-size: 12px;
  font-weight: 600;
}

.m-combo {
  height: 22px;
  background: #110c1d;
  color: #d79bff;
  border: 1px solid rgba(215, 155, 255, 0.42);
  border-radius: 3px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 0 6px;
  cursor: pointer;
  outline: none;
}

.m-combo-onnx { width: 170px; }
.m-combo-team { width: 215px; }
.m-combo-prio { width: 146px; }
.m-combo-med  { width: 102px; }
.m-combo-sm   { width: 92px; }

.m-combo:hover,
.m-combo:focus {
  border-color: #00f5ff;
}

.m-divider {
  width: 210px;
  height: 1px;
  background: rgba(0, 212, 255, 0.4);
  margin: 10px 0;
}

/* Option Row with (?) Help Badge on Right */
.m-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3.5px 0;
  gap: 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.m-item-row:hover {
  background: rgba(0, 245, 255, 0.05);
}

.m-item-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

/* Yellow Arrow ↳ and ▼ */
.m-arrow-sub {
  color: #facc15;
  font-size: 11px;
  font-weight: bold;
  margin-right: 2px;
}

.m-tri-down {
  color: #ffe600;
  font-size: 9px;
}

/* Purple Glowing Pill Switch (Matches CreateSwitch in Game_PRADAxHE4THER.cs) */
.m-pill-switch {
  width: 36px;
  height: 18px;
  border-radius: 9px;
  background: rgba(196, 181, 253, 0.35);
  border: none;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s, box-shadow 0.18s;
}

.m-pill-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f3eeff;
  transition: transform 0.18s;
}

.m-pill-switch.on {
  background: #a855f7;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.65);
}

.m-pill-switch.on::after {
  transform: translateX(18px);
}

.m-switch-text-purple {
  color: #a855f7;
  font-weight: 800;
  font-size: 13px;
}

.m-switch-text-cyan {
  color: #00f5ff;
  font-weight: 700;
  font-size: 12.5px;
}

/* Authentic Slider Row (Cyan track on left, white thumb, cyan text on right) */
.m-slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 115px;
  height: 4px;
  border-radius: 2px;
  background: #374151;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}

.m-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #00f5ff;
  box-shadow: 0 0 8px #00f5ff;
  cursor: pointer;
}

.m-slider-text {
  color: #00f5ff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* (?) Help Circle Button */
.m-help-btn {
  width: 18px;
  height: 18px;
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.16);
  border: 1.5px solid #22d3ee;
  color: #22d3ee;
  font-size: 11px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  text-shadow: 0 0 4px #22d3ee;
  transition: all 0.15s;
}

.m-help-btn:hover {
  background: #22d3ee;
  color: #ffffff;
  box-shadow: 0 0 10px #22d3ee;
}

/* Bottom Console Log Area */
.m-console-area {
  padding: 4px 6px 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.m-console-line {
  background: #081214;
  border: 1px solid #134e4a;
  border-radius: 3px;
  padding: 4px 8px;
  font-family: 'Consolas', monospace;
  font-size: 11.5px;
  color: #c084fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right Side: Live Visualizer + Interactive Option Inspector */
.macro-inspector-column {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.inspector-card {
  background: rgba(14, 9, 28, 0.92);
  border: 1.5px solid rgba(0, 245, 255, 0.35);
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: var(--shadow-cyan);
}

.inspector-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(189, 0, 255, 0.2);
  color: var(--lavender);
  border: 1px solid var(--purple);
  margin-bottom: 0.5rem;
}

.options-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.opt-doc-item {
  background: rgba(20, 14, 40, 0.78);
  border: 1px solid rgba(215, 155, 255, 0.22);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.18s;
}

.opt-doc-item:hover,
.opt-doc-item.active-doc {
  border-color: var(--cyan);
  background: rgba(0, 245, 255, 0.09);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
}

.opt-doc-item h4 {
  font-size: 0.9rem;
  color: var(--cyan);
  margin-bottom: 0.25rem;
}

.opt-doc-item p {
  font-size: 0.79rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* KBM Config Modal Overlay */
.kbm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.kbm-modal-backdrop.open {
  display: flex;
}

.kbm-modal-box {
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
  background: #0f0a1f;
  border: 1.5px solid #d79bff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.95);
}

/* Mobile Swipe Hint & Quick Inspector Drawer */
.mobile-swipe-hint {
  display: none;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(0, 245, 255, 0.08);
  border: 1px dashed rgba(0, 245, 255, 0.35);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.mobile-inspector-toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 950;
  background: rgba(11, 7, 24, 0.96);
  backdrop-filter: blur(16px);
  border: 1.5px solid var(--cyan);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  box-shadow:
    0 -8px 32px rgba(0, 0, 0, 0.85),
    0 0 25px rgba(0, 245, 255, 0.3);
  transform: translateY(130%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.mobile-inspector-toast.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.mobile-inspector-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(215, 155, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
}

.mobile-inspector-toast h4 {
  color: var(--cyan);
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
}

.mobile-inspector-toast p {
  color: #e2d9f3;
  font-size: 0.82rem;
  line-height: 1.42;
  margin-bottom: 0.45rem;
}

.mobile-inspector-tip {
  background: rgba(0, 245, 255, 0.08);
  border-left: 3px solid var(--cyan);
  padding: 0.4rem 0.65rem;
  border-radius: 5px;
  font-size: 0.76rem;
  color: var(--lavender);
}

/* ==========================================================================
   PROFESSIONAL MOBILE & TABLET RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1100px) {
  .macro-showcase-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .macro-ext-window {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    text-align: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .video-showcase-layout {
    grid-template-columns: 1fr;
  }
  /* Show Video Stage FIRST on Tablet/Mobile so player is immediately visible */
  .video-stage {
    order: -1;
  }
  .video-playlist {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .video-upload-box {
    grid-column: 1 / -1;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gates-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .navbar {
    padding: 0.65rem 1rem;
  }
  .nav-container {
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  /* Turn nav-links into a sleek horizontal scrollable quick-nav bar on mobile */
  .nav-links {
    display: flex;
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding: 0.45rem 0 0.15rem 0;
    border-top: 1px solid rgba(0, 245, 255, 0.14);
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links li {
    flex-shrink: 0;
  }
  .nav-links a {
    display: inline-block;
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(20, 14, 40, 0.85);
    border: 1px solid rgba(0, 245, 255, 0.25);
    white-space: nowrap;
  }
  .mobile-swipe-hint {
    display: block;
  }
}

@media (max-width: 680px) {
  .section {
    padding: 2.6rem 1rem;
  }
  .section-header {
    margin-bottom: 2rem;
  }
  .eyebrow {
    font-size: 0.68rem;
    padding: 0.3rem 0.75rem;
    letter-spacing: 0.08em;
    text-align: center;
    line-height: 1.35;
  }
  .hero {
    padding-top: 1.75rem;
    padding-bottom: 2.5rem;
  }
  .hero-title {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }
  .hero-subtitle {
    font-size: 0.96rem;
    margin-bottom: 1.5rem;
  }
  .hero-cta-group {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.8rem;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.2rem;
    font-size: 0.92rem;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .stat-card {
    padding: 0.8rem 0.65rem;
  }
  .stat-value {
    font-size: 1.25rem;
  }
  /* Dock the floating hero badge cleanly below the artwork on mobile */
  .hero-floating-badge {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(0, 245, 255, 0.35);
    padding: 0.85rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    text-align: left;
  }

  /* Video Showcase Mobile Refinements */
  .video-playlist {
    grid-template-columns: 1fr;
  }
  .video-stage-header {
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.7rem 0.9rem;
  }
  .window-dots {
    display: none;
  }
  .video-stage-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 0.95rem 1rem;
  }
  .stage-controls {
    width: 100%;
  }
  .stage-controls .mini-btn {
    flex: 1;
    text-align: center;
    padding: 0.55rem;
  }

  /* Simulator Topbar & Tabs on Mobile */
  .app-sim-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.8rem 1rem;
  }
  .app-sim-tabs {
    flex-direction: column;
    padding: 0.65rem 0.8rem;
    gap: 0.4rem;
  }
  .sim-tab {
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.85rem;
    font-size: 0.83rem;
    background: rgba(20, 14, 38, 0.75);
    border: 1px solid rgba(215, 155, 255, 0.18);
  }
  .sim-tab.active {
    border: 1.5px solid var(--gold);
    background: rgba(250, 204, 21, 0.12);
  }
  .sim-panel {
    padding: 0.85rem 0.65rem;
  }

  /* Macro Extension 1:1 Replica Mobile Adaptation */
  .macro-ext-body {
    margin: 4px;
    padding: 8px 7px;
  }
  .m-gate-children {
    margin-left: 4px;
    padding-left: 8px;
  }
  .m-config-btns {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .m-cfg-btn {
    height: 30px;
    font-size: 12px;
  }
  .m-trig-grid {
    grid-template-columns: 100px 1fr;
    max-width: 240px;
  }
  .m-divider {
    width: 100%;
  }
  .m-item-row {
    padding: 5px 2px;
    gap: 6px;
  }
  .m-item-left {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .m-slider-input {
    flex: 1;
    min-width: 90px;
    max-width: 135px;
    height: 5px;
  }
  .m-slider-input::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
  }
  .m-combo-onnx,
  .m-combo-team,
  .m-combo-prio,
  .m-combo-med,
  .m-combo-sm {
    width: auto;
    flex: 1;
    min-width: 105px;
    max-width: 175px;
    height: 26px;
    font-size: 12px;
  }
  .m-help-btn {
    width: 22px;
    height: 22px;
    border-radius: 11px;
    font-size: 12px;
  }

  /* Inspector & Bento Grids on Mobile */
  .inspector-card {
    padding: 1rem;
  }
  .options-catalog-grid,
  .features-grid,
  .games-grid,
  .controllers-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
  .feature-card,
  .controller-card {
    padding: 1.25rem;
  }
  .overclock-tester-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.95rem;
  }
  .hz-btn-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
  }
  .hz-btn {
    text-align: center;
    padding: 0.45rem 0.3rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 400px) {
  .brand-title {
    font-size: 1.05rem;
  }
  .brand-logo {
    width: 36px;
    height: 36px;
  }
  .lang-pill {
    padding: 0.28rem 0.6rem;
    font-size: 0.72rem;
  }
  .m-slider-input {
    min-width: 75px;
    max-width: 110px;
  }
}
