
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  color-scheme: dark;
  --bg: #05090d;
  --panel: #101820;
  --panel2: #151f29;
  --line: #263744;
  --text: #f3f7fa;
  --muted: #9aabb8;
  --cyan: #d6ad55;
  --green: #f2d27a;
  --red: #ff647c;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: radial-gradient(ellipse at 50% -20%, #12313b 0%, transparent 48%), var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  min-height: 100vh;
}

.topbar {
  height: 76px;
  border-bottom: 1px solid #1b2a34;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(22px, calc((100% - 1120px)/2));
  background: #05090dcc;
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 39px;
  height: 39px;
  display: block;
  object-fit: contain;
  border-radius: 6px;
  flex: 0 0 39px;
}

.brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: 2px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.8px;
  margin-top: 3px;
}

.status-pill, .small-tag {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 11px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #75838c;
}

.status-pill.connected i {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.container {
  max-width: 1120px;
  margin: auto;
  padding: 42px 22px 28px;
}

.hero {
  text-align: center;
  margin: 12px auto 30px;
  max-width: 650px;
  position: relative;
}

.hero-logo {
  position: absolute;
  width: 112px;
  height: 112px;
  object-fit: contain;
  left: -132px;
  top: 50%;
  transform: translateY(-50%);
}

.eyebrow {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.hero h1 {
  font-size: clamp(36px, 7vw, 58px);
  letter-spacing: -2px;
  margin: 12px 0;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--cyan), var(--green));
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.panel {
  background: linear-gradient(145deg, #121d26, #0c131a);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 23px;
  box-shadow: 0 18px 50px #0003;
}

.connect-panel {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 20px;
}

.connect-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #14323a;
  display: grid;
  place-items: center;
  font-size: 26px;
}

.connect-copy { flex: 1; }

.connect-copy h2, .section-heading h2 {
  font-size: 17px;
  margin: 0 0 5px;
}

.connect-copy p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.profile-label {
  color: var(--cyan) !important;
  margin-top: 5px !important;
  font-size: 10px !important;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
}

.primary-button, .secondary-button {
  border-radius: 10px;
  padding: 12px 17px;
  font-weight: 800;
  font-size: 12px;
  transition: .2s;
}

.primary-button {
  background: linear-gradient(100deg, #a8792a, #f4d889);
  color: #061015;
}

.primary-button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.secondary-button {
  background: #1b2b36;
  border: 1px solid #38505e;
  color: var(--text);
}

button:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}

.tester-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 20px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: 21px;
  margin-top: 5px;
}

.small-tag {
  font-size: 9px;
  letter-spacing: 1px;
  padding: 7px 10px;
}

.controller-layout {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  padding: 5px 0 23px;
}

.cluster-label, .group-name {
  display: block;
  color: #8194a1;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.3px;
  margin-bottom: 13px;
}

.dpad {
  width: 112px;
  height: 112px;
  display: grid;
  grid-template: repeat(3, 1fr)/repeat(3, 1fr);
  gap: 4px;
  align-items: center;
  justify-items: center;
}

.test-button {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid #354956;
  background: #1b2933;
  color: #b9c8d1;
  font-weight: 800;
  font-size: 12px;
  transition: background .12s, border .12s, box-shadow .12s;
}

.test-button.active {
  background: #59421c;
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 0 15px #e8c56b55;
}

.test-button.tested {
  background: #3e3019;
  border: 1px solid var(--green);
  color: var(--green);
  box-shadow: inset 0 0 8px #f2d27a18;
}

.test-button.tested.active {
  background: #8a6425;
  border-color: #8affb5;
  color: #fff;
  box-shadow: 0 0 17px #f2d27a66;
}

.dpad .test-button {
  width: 32px;
  height: 32px;
}

.dpad .test-button[data-button="12"] { grid-area: 1/2; }
.dpad .test-button[data-button="14"] { grid-area: 2/1; }
.dpad .test-button[data-button="15"] { grid-area: 2/3; }
.dpad .test-button[data-button="13"] { grid-area: 3/2; }

.dpad-center {
  grid-area: 2/2;
  color: #70818d;
}

.face-buttons {
  width: 126px;
  height: 112px;
  position: relative;
}

.face {
  position: absolute;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 17px;
}

.triangle { top: 0; left: 46px; }
.square { top: 38px; left: 0; }
.circle { top: 38px; right: 0; }
.cross { bottom: 0; left: 46px; }

.button-groups {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  display: grid;
  gap: 14px;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.button-row .group-name {
  width: 100%;
  margin: 0 0 1px;
}

.wide {
  min-width: 52px;
  height: 30px;
  font-size: 10px;
}

.touchpad-button {
  min-width: 130px;
}

.trigger-wrap {
  display: grid;
  grid-template-columns: 48px minmax(45px, 1fr) 34px;
  gap: 7px;
  align-items: center;
  flex: 1;
  min-width: 130px;
}

.trigger-wrap .wide { min-width: 0; }

.meter {
  height: 6px;
  border-radius: 8px;
  background: #253640;
  overflow: hidden;
}

.meter i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.trigger-wrap small {
  color: var(--muted);
  font-size: 10px;
}

.hint, .disclaimer {
  font-size: 10px;
  line-height: 1.55;
  color: #82939e;
  margin: 18px 0 0;
}

.sticks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.stick-test h3 {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 10px;
  letter-spacing: 1px;
  margin: 0 0 10px;
}

.stick-test h3 span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
}

.stick-area {
  aspect-ratio: 1;
  max-width: 190px;
  margin: auto;
  border: 1px solid #38505e;
  border-radius: 50%;
  background:
    radial-gradient(circle, #1b2b35 0 2px, transparent 3px),
    linear-gradient(90deg, transparent 49.7%, #344956 50%, transparent 50.3%),
    linear-gradient(transparent 49.7%, #344956 50%, transparent 50.3%),
    radial-gradient(circle, transparent 49%, #304653 50%, transparent 51%);
  position: relative;
  overflow: hidden;
}

.crosshair {
  position: absolute;
  inset: 25%;
  border: 1px dashed #304653;
  border-radius: 50%;
  pointer-events: none;
}

.circularity-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.stick-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 15px #18d7e8aa;
  transform: translate(-50%, -50%);
  transition: left .035s, top .035s;
  z-index: 3;
}

.circularity-button {
  display: block;
  width: 100%;
  max-width: 190px;
  margin: 12px auto 0;
  padding: 10px;
  font-size: 10px;
}

.circularity-result {
  min-height: 34px;
  margin: 9px auto 0;
  max-width: 210px;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.circularity-hint {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  margin: 12px 0 0;
  text-align: center;
}

.drift-box {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 17px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.drift-box strong { font-size: 12px; }

.drift-box p {
  font-size: 10px;
  color: var(--muted);
  margin: 5px 0 0;
  line-height: 1.4;
}

.drift-box button {
  white-space: nowrap;
  padding: 10px 12px;
  font-size: 10px;
}

.result-line {
  font-size: 11px;
  color: var(--muted);
  margin-top: 13px;
  min-height: 16px;
}

.report-panel { margin-top: 20px; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.summary-grid div {
  background: #0b141b;
  border: 1px solid #22333e;
  border-radius: 12px;
  padding: 15px;
}

.summary-grid strong, .summary-grid small { display: block; }

.summary-grid strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.summary-grid small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}

.report-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.disclaimer { margin-top: 15px; }

/* AGENDA BUCEONET */

.agenda-panel {
  margin-top: 20px;
}

.agenda-description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: -10px 0 18px;
}

.agenda-status {
  color: var(--cyan);
  font-size: 11px;
  margin-bottom: 15px;
}

.agenda-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.agenda-day {
  min-width: 0;
  padding: 12px 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0b141b;
  color: var(--text);
  text-align: center;
}

.agenda-day strong,
.agenda-day small {
  display: block;
}

.agenda-day strong {
  font-size: 11px;
}

.agenda-day small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}

.agenda-day.selected {
  border-color: var(--cyan);
  background: #12313b;
  box-shadow: 0 0 12px #18d7e822;
}

.agenda-day:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.agenda-slots-container {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.agenda-slots-container h3 {
  font-size: 14px;
  margin: 0 0 14px;
}

.agenda-slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.agenda-slot {
  padding: 12px 5px;
  border-radius: 9px;
  border: 1px solid var(--green);
  background: #103a2b;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.agenda-slot.busy {
  border-color: #74404b;
  background: #321b24;
  color: #ff8495;
  cursor: not-allowed;
  text-decoration: line-through;
  opacity: .8;
}

.agenda-slot:disabled {
  cursor: not-allowed;
}

.agenda-closed {
  color: var(--red);
  font-size: 12px;
}

.agenda-note {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

footer {
  text-align: center;
  color: #71828d;
  font-size: 9px;
  letter-spacing: 1.5px;
  padding: 28px 0 8px;
}

footer span {
  color: var(--cyan);
  padding: 0 5px;
}

@media(max-width:760px) {
  .hero {
    max-width: 100%;
    padding-left: 82px;
    min-height: 76px;
    text-align: left;
  }
  .hero-logo {
    width: 68px;
    height: 68px;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  .container { padding: 30px 14px 20px; }
  .topbar { padding: 0 14px; height: 67px; }
  .status-pill { font-size: 9px; padding: 7px 9px; }
  .tester-grid { grid-template-columns: 1fr; }
  .connect-panel { flex-wrap: wrap; }
  .connect-copy { min-width: calc(100% - 75px); }
  .connect-panel>.primary-button { width: 100%; }
  .panel { padding: 18px; }
  .sticks { gap: 10px; }
  .stick-area { max-width: 155px; }
  .circularity-button { max-width: 155px; }
  .drift-box {
    align-items: flex-start;
    flex-direction: column;
  }
  .drift-box button { width: 100%; }

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

  .agenda-slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media(max-width:390px) {
  .brand strong { font-size: 13px; }
  .brand small { font-size: 8px; }
  .status-pill { max-width: 145px; }
  .controller-layout { gap: 8px; }
  .stick-area { max-width: 130px; }
  .circularity-button { max-width: 130px; }
  .trigger-wrap {
    grid-template-columns: 42px minmax(35px, 1fr) 30px;
  }

  .agenda-days {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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