/* =========================================================
   GAMMERS STYLE — PROBADOR DE CONTROLES
   VERSIÓN SIMPLIFICADA · PRUEBA EN TIEMPO REAL
   CSS ANTES DEL HTML
   ========================================================= */

.gsct2-app,
.gsct2-app * {
  box-sizing: border-box;
}

.gsct2-app[hidden],
.gsct2-app [hidden] {
  display: none !important;
}

.gsct2-app {
  --red: #ff3347;
  --red-soft: #ff7887;
  --cyan: #20d5f3;
  --cyan-soft: #7aedff;
  --green: #45e29a;
  --amber: #ffc45f;
  --white: #ffffff;
  --text: #c7d8e1;
  --muted: #91a6b4;
  --panel: rgba(255,255,255,.055);
  --border: rgba(255,255,255,.105);
  --dark: #030a15;

  position: relative;
  isolation: isolate;
  width: 100%;
  overflow: hidden;
  color: var(--white);
  font-family: "Poppins", Arial, sans-serif;
  background:
    radial-gradient(circle at 8% 4%, rgba(255,51,71,.17), transparent 27%),
    radial-gradient(circle at 94% 12%, rgba(32,213,243,.18), transparent 31%),
    radial-gradient(circle at 50% 100%, rgba(32,213,243,.08), transparent 35%),
    linear-gradient(125deg, #030812 0%, #06172a 55%, #082d3b 100%);
}

.gsct2-app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .16;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(32,213,243,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,51,71,.07) 1px, transparent 1px),
    radial-gradient(circle, rgba(32,213,243,.28) 1px, transparent 1.5px);
  background-size: 72px 72px, 72px 72px, 36px 36px;
}

.gsct2-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(38px, 4.2vw, 58px) 24px 68px;
}

.gsct2-btn,
.gsct2-smallbtn,
.gsct2-select {
  font-family: inherit;
}

.gsct2-btn,
.gsct2-smallbtn,
.gsct2-select,
.gsct2-app a {
  -webkit-tap-highlight-color: transparent;
}

.gsct2-btn:focus-visible,
.gsct2-smallbtn:focus-visible,
.gsct2-select:focus-visible {
  outline: 2px solid var(--cyan-soft);
  outline-offset: 3px;
}

.gsct2-btn {
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff !important;
  text-decoration: none !important;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 760;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.gsct2-btn:hover {
  transform: translateY(-2px);
}

.gsct2-btn:disabled,
.gsct2-smallbtn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.gsct2-btn--primary {
  background: linear-gradient(105deg, #ff3046, #ff6677);
  box-shadow: 0 12px 26px rgba(255,51,71,.22);
}

.gsct2-btn--primary:hover {
  box-shadow: 0 16px 32px rgba(255,51,71,.30);
}

.gsct2-btn--ghost {
  border-color: rgba(32,213,243,.32);
  background: rgba(32,213,243,.06);
}

.gsct2-btn--ghost:hover {
  border-color: rgba(32,213,243,.65);
  background: rgba(32,213,243,.11);
}

/* HERO COMPACTO */
.gsct2-hero {
  display: grid;
  grid-template-columns: minmax(0,1.04fr) minmax(330px,.96fr);
  gap: clamp(28px, 4.2vw, 58px);
  align-items: center;
  margin-bottom: 22px;
}

.gsct2-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--cyan-soft);
  font-size: 10px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.gsct2-eyebrow::before {
  content: "";
  width: 30px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--cyan));
  box-shadow: 0 0 14px rgba(32,213,243,.42);
}

.gsct2-title {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 4.2vw, 58px);
  line-height: 1.02;
  font-weight: 840;
  letter-spacing: -2.5px;
}

.gsct2-title span {
  color: transparent;
  background: linear-gradient(100deg, var(--red), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
}

.gsct2-lead {
  max-width: 690px;
  margin: 16px 0 0;
  color: var(--text);
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.7;
}

.gsct2-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.gsct2-hero-card {
  position: relative;
  isolation: isolate;
  min-height: 255px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 25px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(32,213,243,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,51,71,.034) 1px, transparent 1px),
    radial-gradient(circle at 50% 55%, rgba(32,213,243,.12), transparent 52%),
    linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
  background-size: 34px 34px, 34px 34px, auto, auto;
  box-shadow: 0 22px 55px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(10px);
}

.gsct2-hero-card::before {
  content: "";
  position: absolute;
  inset: 17px;
  z-index: 0;
  border: 1px solid rgba(32,213,243,.10);
  border-radius: 18px;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 50% 54%,
      rgba(32,213,243,.13) 0%,
      rgba(71,110,255,.08) 34%,
      transparent 68%
    );
}

.gsct2-hero-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 8%;
  right: 8%;
  top: 25%;
  height: 1px;
  opacity: .25;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--red), transparent);
  box-shadow: 0 0 12px rgba(32,213,243,.28);
  animation: gsct2-scan 6s ease-in-out infinite;
}

.gsct2-hero-image {
  position: relative;
  z-index: 3;
  width: min(92%, 520px);
  max-height: 232px;
  height: auto;
  object-fit: contain;
  display: block;
  transform-origin: 50% 55%;
  filter:
    drop-shadow(0 20px 20px rgba(0,0,0,.34))
    drop-shadow(-12px 0 18px rgba(32,213,243,.18))
    drop-shadow(12px 0 18px rgba(74,121,255,.14));
  animation: gsct2-hero-float 5.4s ease-in-out infinite;
  will-change: transform;
}

/* ESTADO */
.gsct2-statusbar {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
}

.gsct2-statusitem {
  min-width: 0;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(4,14,27,.78);
}

.gsct2-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #6b7d88;
  box-shadow: 0 0 0 4px rgba(107,125,136,.10);
}

.gsct2-dot.is-good {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(69,226,154,.10), 0 0 15px rgba(69,226,154,.38);
}

.gsct2-dot.is-warn {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255,196,95,.10), 0 0 15px rgba(255,196,95,.30);
}

.gsct2-dot.is-bad {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255,51,71,.10), 0 0 15px rgba(255,51,71,.30);
}

.gsct2-statusitem strong {
  display: block;
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
}

.gsct2-statusitem span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

/* CONSOLA */
.gsct2-console {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 25px;
  background: rgba(3,11,22,.78);
  box-shadow: 0 26px 65px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(12px);
}

.gsct2-toolbar {
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(220px,1fr) minmax(160px,.42fr) auto auto;
  gap: 9px;
  align-items: center;
  background: rgba(255,255,255,.032);
}

.gsct2-select {
  width: 100%;
  min-height: 44px;
  padding: 9px 38px 9px 13px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  color: #fff;
  background: #09182a;
  font-size: 11px;
}

.gsct2-select option {
  color: #fff;
  background: #09182a;
}

.gsct2-smallbtn {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid rgba(32,213,243,.25);
  border-radius: 12px;
  color: #e8f8fb;
  background: rgba(32,213,243,.055);
  cursor: pointer;
  font-size: 10px;
  font-weight: 730;
  transition: border-color 180ms ease, background 180ms ease;
}

.gsct2-smallbtn:hover {
  border-color: rgba(32,213,243,.58);
  background: rgba(32,213,243,.10);
}

.gsct2-waiting {
  min-height: 300px;
  padding: 42px 24px;
  display: grid;
  place-items: center;
  text-align: center;
}

.gsct2-waiting-inner {
  max-width: 620px;
}

.gsct2-waiting-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 17px;
  border: 1px solid rgba(32,213,243,.28);
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: rgba(32,213,243,.065);
  box-shadow: 0 0 28px rgba(32,213,243,.08);
}

.gsct2-waiting-icon svg {
  width: 36px;
  height: 36px;
}

.gsct2-waiting h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(23px,2.6vw,34px);
  line-height: 1.2;
}

.gsct2-waiting p {
  margin: 11px auto 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}

.gsct2-waiting-note {
  color: #8edfee !important;
  font-size: 10px !important;
}

.gsct2-dashboard {
  padding: 17px;
}

/* SOLO NOMBRE DEL CONTROL */
.gsct2-devicebar {
  margin-bottom: 16px;
}

.gsct2-devicecard {
  min-width: 0;
  padding: 17px 20px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--panel);
}

.gsct2-devicecard span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.gsct2-devicecard strong {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: clamp(17px,1.65vw,23px);
  line-height: 1.35;
  font-weight: 760;
}

/* PANELES PRINCIPALES */
.gsct2-grid {
  display: grid;
  grid-template-columns: minmax(390px,1.02fr) minmax(0,.98fr);
  gap: 15px;
}

.gsct2-panel,
.gsct2-vibration-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: 21px;
  background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.022));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.gsct2-panel-title,
.gsct2-vibration-card h3 {
  margin: 0;
  color: #fff;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 770;
}

.gsct2-panel-copy,
.gsct2-vibration-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

/* CONTROL VISUAL */
.gsct2-controller {
  position: relative;
  isolation: isolate;
  min-height: 410px;
  margin-top: 14px;
  padding: 54px 18px 16px;
  overflow: hidden;
  border: 1px solid rgba(125,221,245,.16);
  border-radius: 21px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(32,213,243,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32,213,243,.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 48%, rgba(32,213,243,.10), transparent 56%),
    linear-gradient(145deg, rgba(12,32,51,.94), rgba(4,15,28,.96));
  background-size: 38px 38px, 38px 38px, auto, auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 60px rgba(32,213,243,.03);
}

.gsct2-controller::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 15px;
  border: 1px solid rgba(32,213,243,.10);
  border-radius: 17px;
  pointer-events: none;
}

.gsct2-controller::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 7%;
  right: 7%;
  top: 20%;
  height: 1px;
  opacity: .25;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--red), transparent);
  box-shadow: 0 0 13px rgba(32,213,243,.25);
  animation: gsct2-scan 6s ease-in-out infinite;
}

.gsct2-profile-badge {
  position: absolute;
  z-index: 5;
  top: 19px;
  left: 20px;
  min-height: 35px;
  padding: 7px 11px;
  border: 1px solid rgba(32,213,243,.19);
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(3,13,25,.78);
  backdrop-filter: blur(8px);
}

.gsct2-profile-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #738691;
  box-shadow: 0 0 0 4px rgba(115,134,145,.08);
}

.gsct2-profile-dot.is-connected {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(69,226,154,.09), 0 0 13px rgba(69,226,154,.38);
}

.gsct2-profile-badge span {
  display: block;
  color: #849aa8;
  font-size: 7px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: .75px;
  text-transform: uppercase;
}

.gsct2-profile-badge strong {
  display: block;
  margin-top: 1px;
  color: #fff;
  font-size: 9px;
  line-height: 1.35;
  font-weight: 750;
}

.gsct2-controller-svg-host {
  position: relative;
  z-index: 3;
  width: min(100%,650px);
  min-height: 310px;
  display: grid;
  place-items: center;
}

.gsct2-controller-svg-host svg {
  width: 100%;
  height: auto;
  max-height: 365px;
  display: block;
  overflow: visible;
  filter:
    drop-shadow(0 24px 20px rgba(0,0,0,.30))
    drop-shadow(-8px 0 13px rgba(32,213,243,.055))
    drop-shadow(8px 0 13px rgba(255,51,71,.05));
}

.gsct2-controller-svg-host [data-button],
.gsct2-controller-svg-host [data-stick] {
  transition: opacity 100ms ease, filter 100ms ease;
}

/* BOTONES EN TIEMPO REAL */
.gsct2-button-grid {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 6px;
  margin-top: 13px;
}

.gsct2-button-chip {
  min-width: 0;
  padding: 8px 4px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 9px;
  text-align: center;
  color: #91a7b4;
  background: rgba(255,255,255,.022);
  font-size: 7.5px;
  line-height: 1.3;
  transition: border-color 100ms ease, background 100ms ease, color 100ms ease, box-shadow 100ms ease;
}

.gsct2-button-chip.is-active {
  color: #fff;
  border-color: rgba(32,213,243,.58);
  background: rgba(32,213,243,.13);
  box-shadow: 0 0 11px rgba(32,213,243,.14);
}

/* JOYSTICKS */
.gsct2-sticks {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 11px;
  margin-top: 14px;
}

.gsct2-stickcard {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 15px;
  background: rgba(4,14,26,.52);
}

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

.gsct2-stickhead strong {
  color: #fff;
  font-size: 10.5px;
  line-height: 1.4;
}

.gsct2-stickhead span {
  color: var(--muted);
  font-size: 8px;
}

.gsct2-canvas-wrap {
  position: relative;
  margin-top: 10px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 15px;
  background: radial-gradient(circle, rgba(32,213,243,.06), rgba(2,9,18,.92) 70%);
}

.gsct2-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.gsct2-axis-values {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 7px;
  margin-top: 8px;
}

.gsct2-axis-value,
.gsct2-axis-chip {
  padding: 8px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 9px;
  background: rgba(255,255,255,.02);
}

.gsct2-axis-value span,
.gsct2-axis-chip span {
  display: block;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.gsct2-axis-value strong,
.gsct2-axis-chip strong {
  display: block;
  margin-top: 3px;
  color: #fff;
  font-family: Consolas, monospace;
  font-size: 10px;
}

.gsct2-triggerbox {
  display: grid;
  gap: 8px;
  margin-top: 11px;
}

.gsct2-triggerrow {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) 50px;
  gap: 8px;
  align-items: center;
}

.gsct2-triggerrow span {
  font-size: 8px;
  font-weight: 750;
}

.gsct2-triggerbar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.075);
}

.gsct2-triggerbar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,var(--cyan),var(--red));
}

.gsct2-triggerrow strong {
  color: #fff;
  font-family: Consolas, monospace;
  font-size: 9px;
  text-align: right;
}

.gsct2-axisraw {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 6px;
  margin-top: 11px;
}

/* VIBRACIÓN */
.gsct2-vibration-card {
  margin-top: 15px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 18px;
  align-items: center;
}

.gsct2-vibration-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gsct2-vibration-result {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.gsct2-result-good {
  color: #79efb7 !important;
}

.gsct2-result-warn {
  color: #ffd17c !important;
}

.gsct2-mini-note {
  margin-top: 15px;
  padding: 12px 14px;
  border-left: 3px solid var(--cyan);
  border-radius: 0 11px 11px 0;
  color: #9db1bd;
  background: rgba(32,213,243,.045);
  font-size: 9.5px;
  line-height: 1.6;
}

#gst2-controller-library {
  display: none;
}

@keyframes gsct2-scan {
  0%,100% { top: 20%; opacity: 0; }
  20% { opacity: .25; }
  50% { top: 78%; opacity: .29; }
  80% { opacity: .18; }
}

@keyframes gsct2-hero-float {
  0%,100% {
    transform: translate3d(0, 0, 0) rotate(-0.4deg);
  }
  50% {
    transform: translate3d(0, -7px, 0) rotate(0.4deg);
  }
}

@media (max-width: 1100px) {
  .gsct2-hero,
  .gsct2-grid {
    grid-template-columns: 1fr;
  }

  .gsct2-hero-card {
    min-height: 235px;
  }
}

@media (max-width: 900px) {
  .gsct2-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .gsct2-statusbar {
    grid-template-columns: 1fr;
  }

  .gsct2-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .gsct2-select {
    grid-column: 1 / -1;
  }

  .gsct2-vibration-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .gsct2-shell {
    padding: 34px 14px 54px;
  }

  .gsct2-title {
    font-size: clamp(36px,11.5vw,50px);
    letter-spacing: -1.8px;
  }

  .gsct2-hero-card {
    min-height: 210px;
  }

  .gsct2-hero-image {
    width: min(94%,460px);
    max-height: 188px;
  }

  .gsct2-toolbar {
    grid-template-columns: 1fr;
  }

  .gsct2-select {
    grid-column: auto;
  }

  .gsct2-dashboard {
    padding: 11px;
  }

  .gsct2-panel,
  .gsct2-vibration-card {
    padding: 15px;
  }

  .gsct2-controller {
    min-height: 330px;
    padding: 52px 8px 12px;
  }

  .gsct2-controller-svg-host {
    min-height: 250px;
  }

  .gsct2-sticks {
    grid-template-columns: 1fr;
  }

  .gsct2-button-grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }

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

  .gsct2-btn,
  .gsct2-smallbtn {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .gsct2-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .gsct2-hero {
    gap: 20px;
  }

  .gsct2-title {
    font-size: 38px;
  }

  .gsct2-hero-card {
    min-height: 185px;
    border-radius: 20px;
  }

  .gsct2-hero-image {
    width: min(96%, 390px);
    max-height: 158px;
  }

  .gsct2-statusitem {
    padding: 11px 12px;
  }

  .gsct2-devicecard strong {
    font-size: 17px;
  }

  .gsct2-controller {
    min-height: 300px;
  }

  .gsct2-profile-badge {
    left: 13px;
    top: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gsct2-app *,
  .gsct2-app *::before,
  .gsct2-app *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Estado de carga/fallo de la biblioteca visual externa. */
.gsct2-template-note {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 6;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid rgba(255,196,95,.24);
  border-radius: 10px;
  color: #ffd995;
  background: rgba(25,18,5,.82);
  font-size: 9px;
  line-height: 1.45;
}
