@charset "UTF-8";

header{
}

body{
}
main{
}
#ball{
position: absolute;
}
.vertical_progress {
  margin-block-end: 20px;
  writing-mode: vertical-lr;
  direction: rtl;
}
video {
  }
#screen{
}

footer{
}
#triangle{
  position: absolute;
  display: inline-block;
  height: 10px;
  width: 20px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: black;
  transform:rotate(0deg);
  transform-origin: 50% 100%;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}
.juuji,.juuji_ue,.juuji_sita,.juuji_hidari,.juuji_migi{
  position: absolute;
  display: inline-block;
  height: 21px;
  width: 21px;
  clip-path: polygon(100% 0, 100% 100%, 0 100% ,0 0);
  background: black;
  top: -120px;
  right: 0;
  bottom: 0;
  left: -180px;
  margin: auto;
}
.juuji_ue{
  top: -160px;
  left: -180px;
}
.juuji_sita{
  top: -80px;
  left: -180px;
}
.juuji_hidari{
  top: -120px;
  left: -220px;
}
.juuji_migi{
  top: -120px;
  left: -140px;
}

.analog_l_back,.analog_r_back,.analog_l , .analog_r{
  position: absolute;
  display: inline-block;
  height: 80px;
  width: 80px;
  top: 40px;
  right: 0;
  bottom: 0;
  margin: auto;
}
.analog_l_back,.analog_r_back{
  clip-path: circle(35px);
  background-color: gray;
  z-index:30 ;
}
.analog_l_back{
  left: -120px;
}
.analog_r_back{
  left: 120px;
}
.analog_l_back::after , .analog_r_back::after {
  content: "";
  position: absolute;
  height: 80px;
  width: 80px;
  clip-path: circle(33px);
  background-color: whitesmoke;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}

.analog_l , .analog_r{
  text-align: center;
  line-height: 80px;
  clip-path: circle(25px);
  font-weight: bold;
  background-color: #d1d5db;
  color: #111;
  z-index:50 ;
}
.analog_l{
  left: -120px;
}
.analog_r{
  left: 120px;
}
.analog_l_y_progress,
.analog_l_x_progress,
.analog_r_x_progress,
.analog_r_y_progress{
  position:absolute;
  right: 0;
  bottom: 0;
  margin: auto;
  /* accent-color:red; */
}
.analog_l_y_progress{
  height: 60px;
  top: 35px;
  left: -200px;
}
.analog_l_x_progress{
  width: 60px;
  top: 120px;
  left: -120px;
}

.analog_r_y_progress{
  height: 60px;
  top: 35px;
  left: 200px;
}
.analog_r_x_progress{
  width: 60px;
  top: 120px;
  left: 120px;
}

.button_y,.button_x,.button_b,.button_a,.button_menu{
  position: absolute;
  display: inline-block;
  text-align: center;
  line-height: 33px;
  height: 33px;
  width: 33px;
  clip-path: circle(13px);
  color: black;
  font-weight: bold;
  background-color: cadetblue;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}

.button_y{
  top: -170px;
  left: 200px;
}
.button_x{
  top: -125px;
  left: 150px;
}
.button_b{
  top: -125px;
  left: 250px;
}
.button_a{
  top: -80px;
  left: 200px;
}

.button_back,.button_start{
  position: absolute;
  display: inline-block;
  text-align: center;
  line-height: 25px;
  height: 25px;
  width: 30px;
  clip-path: inset(3px 3px round 3px);
  color: black;
  font-weight: bold;
  background-color: cadetblue;
  top: -120px;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}

.button_back{
  left: -50px;
}
.button_start{
  left: 50px;
}


.controller_body{
  margin-top: 1em;
  position: relative;
  height:300px;
  width:500px;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;  
/*
inset()
内部の長方形を定義します。

circle()
半径と中心位置を使用して円を定義します。

ellipse()
2つの半径と位置を指定して楕円を定義します。

polygon()
SVG の塗りつぶし規則と頂点のセットを用いて多角形を定義します。

path()
SVG の塗りつぶし規則と SVG のパス定義を用いて形状を定義します。

rect()
参照ボックスの縁からの指定距離を使用して長方形を定義します。

shape()
オプションの SVG 塗りつぶしルールと、行、曲線、円弧用の図形コマンドを使用して図形を定義します。

xywh()
参照ボックスの上端と左端からの指定距離、および長方形の幅と高さを指定して、長方形を定義します。
*/

  /* position: absolute;
  display: inline-block;
  height: 100px;
  width: 200px;
  clip-path: polygon(50% 0, 100% 20%, 80% 100%,20% 100%,0 20%); */
  /* clip-path: polygon(50% 0, 100% 20%, 80% 100%,20% 100%,0 20% ,round 15px); */
  /* background: black;
  transform:rotate(0deg);
  transform-origin: 50% 100%; */
}
.controller_body svg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;  
}
.button_l1,.button_r1{
  position: absolute;
  display: inline-block;
  text-align: center;
  line-height: 30px;
  height: 30px;
  width: 80px;
  clip-path: inset(3px 3px round 3px);
  color: black;
  font-weight: bold;
  background-color: cadetblue;
  top: -250px;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;  
}
.button_l1{
  left: -180px;
}
.button_r1{
  left: 180px;
}

.button_l2,.button_r2{
  position: absolute;
  display: inline-block;
  text-align: center;
  line-height: 30px;
  height: 30px;
  width: 80px;
  clip-path: inset(3px 3px round 3px);
  color: black;
  font-weight: bold;
  background-color: cadetblue;
  /* background: linear-gradient(0deg,red 0%,red 50%,white 50%,white 100%); */
  top: -300px;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;  
}
.button_l2{
  left: -180px;
}
.button_r2{
  left: 180px;
}

.controller_analog{
  position: relative;
  height:300px;
  width:400px;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}
.controller_analog_l,
.controller_analog_r{
  position: absolute;
  display: inline-block;
  height: 150px;
  width: 150px;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  z-index:30;
}
.controller_analog_l{
  left: -200px;
}
.controller_analog_r{
  left: 200px;
}
.analog_l_body,
.analog_r_body,
.controller_analog_l_back,
.controller_analog_r_back,
.controller_analog_l_back::after ,
.controller_analog_r_back::after{
  position: absolute;
  display: inline-block;
  height: 150px;
  width: 150px;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}
.analog_l_body,
.analog_r_body{
  z-index:60 ;
}

.controller_analog_l_back,
.controller_analog_r_back{
  clip-path: circle(74px);
  background-color: gray;
  z-index:40 ;
}
.controller_analog_l_back::after ,
.controller_analog_r_back::after {
  content: "";
  clip-path: circle(73px);
  background-color: whitesmoke;
}

.analog_l_center,
.analog_r_center,
.analog_l_point,
.analog_r_point{
  position: absolute;
  height: 10px;
  width: 10px;
  clip-path: circle(2px);
  background-color: black;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}
.analog_l_point
{
}
.analog_r_point{
}
.l_point_value,
.r_point_value{
  position: absolute;
  bottom: -40px;
}

.analog_l_vector,
.analog_r_vector{
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}

.controller_progress{
  position: relative;
  height:300px;
  width:400px;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}
.controller_l2,
.controller_r2{
  position: absolute;
  height: 150px;
  width: 150px;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}
.controller_l2{
  left: -200px;
}
.controller_r2{
  left: 200px;
}
.l2_progress,
.r2_progress{
  position: absolute;
  width:80px;
  accent-color:red;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}
.l2_progress_value,
.r2_progress_value{
  position: absolute;
  bottom: -50px;
}

.controller {
  margin: 2rem auto;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  overflow-x: auto;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.buttons .button {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #eee;
}

.buttons .button.pressed {
  background: #222;
  color: #42f593;
}

.axes {
  margin-top: 1rem;
}

.axes label {
  display: block;
  margin-bottom: 8px;
}

.axes progress {
  width: 100%;
}

.controller_vibration {
  text-align: center;
  margin: 1rem 0;
}

.controller_vibration .button {
  margin: 4px;
}

.controller_body {
  transform-style: preserve-3d;
  transition: transform 0.05s linear;
}

@media (max-width: 600px) {
  .controller_body,
  .controller_analog,
  .controller_progress {
    transform: scale(0.7);
    transform-origin: top center;
  }

  .controller_body {
    margin-bottom: -80px;
  }

  .controller_analog,
  .controller_progress {
    margin-bottom: -90px;
  }
}
.analog_l_back,
.analog_r_back {
  pointer-events: none;
}

.analog_l,
.analog_r {
  pointer-events: none;
}

.controller-xbox {
  border-color: #107c10;
}

.controller-playstation {
  border-color: #1f4ed8;
}

.controller-nintendo-switch {
  border-color: #e60012;
}

.controller-unknown {
  border-color: #999;
}

body {
  background: #f4f6f8;
  color: #222;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 12px;
}

#con {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #222;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

#con:hover {
  opacity: 0.85;
}

.controller {
  margin: 24px auto;
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.controller h1 {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #f8fafc;
  font-size: 18px;
  line-height: 1.5;
  word-break: break-all;
}

.controller_body {
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.9), transparent 45%),
    linear-gradient(180deg, #f9fafb, #eef2f7);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

.button_a,
.button_b,
.button_x,
.button_y,
.button_menu,
.button_back,
.button_start,
.button_l1,
.button_l2,
.button_r1,
.button_r2,
.analog_l,
.analog_r {
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
  transition: background-color .08s ease, box-shadow .08s ease, transform .08s ease;
}

.button_a[style*="red"],
.button_b[style*="red"],
.button_x[style*="red"],
.button_y[style*="red"],
.button_menu[style*="red"],
.button_back[style*="red"],
.button_start[style*="red"],
.button_l1[style*="red"],
.button_l2[style*="red"],
.button_r1[style*="red"],
.button_r2[style*="red"],
.analog_l[style*="red"],
.analog_r[style*="red"],
.juuji_ue[style*="red"],
.juuji_sita[style*="red"],
.juuji_hidari[style*="red"],
.juuji_migi[style*="red"] {
  box-shadow: 0 0 0 4px rgba(255,0,0,.16), 0 0 18px rgba(255,0,0,.5);
  transform: scale(1.08);
}

.controller_analog,
.controller_progress {
  margin-top: 24px;
  border-radius: 20px;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

.l_point_value,
.r_point_value,
.l2_progress_value,
.r2_progress_value {
  min-width: 150px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-family: monospace;
  text-align: center;
}

.buttons,
.axes,
.controller_vibration {
  margin-top: 20px;
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
}

.buttons .button {
  min-width: 110px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  font-family: monospace;
  text-align: center;
}

.buttons .button.pressed {
  border-color: #ef4444;
  background: #111827;
  color: #42f593 !important;
}

.axes label {
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff;
}

progress {
  accent-color: #ef4444;
}

.controller_vibration {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.controller_vibration .button {
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  cursor: pointer;
}

.controller_vibration .button:hover {
  opacity: .85;
}

#hid_raw_hex,
#hid_raw_dec {
  width: 100%;
  margin-top: 12px;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #111827;
  color: #42f593;
  resize: vertical;
  box-sizing: border-box;
}

.hid-raw-header {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.hid-mode {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: #e5e7eb;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
}

.hid-mode.active {
  background: #111827;
  color: #fff;
}

.hid-raw-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(90px, 1fr));
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: #111827;
  overflow-x: auto;
}

.hid-byte {
  padding: 8px;
  border-radius: 8px;
  background: #1f2937;
  color: #42f593;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.hid-byte.changed {
  background: #7f1d1d;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .5);
}

.hid-offset {
  display: block;
  color: #9ca3af;
  font-size: 11px;
}

.hid-value {
  display: block;
  font-weight: 700;
}

@media (max-width: 700px) {
  .hid-raw-grid {
    grid-template-columns: repeat(4, minmax(80px, 1fr));
  }
}

#input_history_canvas {
  width: 100%;
  height: 260px;
  border-radius: 16px;
  background: #111827;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(34,211,238,.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(168,85,247,.16), transparent 36%),
    #050816;
  color: #e5e7eb;
}

.app-shell {
  max-width: none;
  min-height: 100vh;
  padding: 16px;
  display: grid;
  grid-template-columns: 280px minmax(520px, 1fr) 360px;
  gap: 16px;
}

.app-pane {
  min-height: calc(100vh - 32px);
}

.panel,
.controller {
  border: 1px solid rgba(148,163,184,.25);
  border-radius: 22px;
  background: rgba(15,23,42,.72);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 20px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(14px);
}

.panel {
  padding: 16px;
  margin-bottom: 16px;
}

.panel h2,
.controller h1 {
  margin: 0 0 12px;
  color: #67e8f9;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.center-pane {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.controller {
  width: 100%;
  padding: 20px;
}

.controller_body {
  background:
    linear-gradient(135deg, rgba(34,211,238,.08), rgba(168,85,247,.08)),
    rgba(2,6,23,.75);
  border: 1px solid rgba(103,232,249,.18);
  box-shadow:
    inset 0 0 40px rgba(34,211,238,.08),
    0 0 40px rgba(34,211,238,.08);
}

#con,
.hid-mode,
.controller_vibration .button {
  border: 1px solid rgba(103,232,249,.35);
  background: linear-gradient(135deg, #0891b2, #7c3aed);
  color: white;
  box-shadow: 0 0 18px rgba(34,211,238,.25);
}

.hid-raw-grid {
  max-height: 420px;
  overflow: auto;
  background: rgba(2,6,23,.9);
  border: 1px solid rgba(103,232,249,.2);
}

.hid-byte {
  background: rgba(15,23,42,.95);
  border: 1px solid rgba(148,163,184,.18);
  color: #67e8f9;
}

.hid-byte.changed {
  background: rgba(127,29,29,.85);
  color: #fff;
  box-shadow: 0 0 18px rgba(239,68,68,.45);
}

#input_history_canvas {
  background: rgba(2,6,23,.9);
  border: 1px solid rgba(103,232,249,.2);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-pane {
    min-height: auto;
  }
}

.gyro-controls {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.gyro-controls button {
  border: 1px solid rgba(103,232,249,.35);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(15,23,42,.9);
  color: #e5e7eb;
  cursor: pointer;
}

.gyro-controls button.active {
  background: linear-gradient(135deg, #0891b2, #7c3aed);
  color: white;
  box-shadow: 0 0 18px rgba(34,211,238,.35);
}

.controller_3d {
  transform-style: preserve-3d;
  transform-origin: center center;
}

.controller_face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  border-radius: 24px;
}

.controller_front {
  z-index: 2;
}

.controller_back {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotateY(180deg);
  background:
    linear-gradient(135deg, rgba(239,68,68,.22), rgba(124,58,237,.2)),
    rgba(15,23,42,.96);
  border: 1px solid rgba(239,68,68,.35);
  box-shadow:
    inset 0 0 40px rgba(239,68,68,.12),
    0 0 40px rgba(239,68,68,.18);
}

.controller_back_label {
  color: #fecaca;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: .18em;
}
.tool-intro {
  margin: 24px auto;
  padding: 28px;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(34,211,238,.06), rgba(168,85,247,.08)),
    rgba(15,23,42,.78);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 20px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(14px);
}

.tool-intro h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 800;
  color: #67e8f9;
}

.tool-lead {
  margin: 0;
  line-height: 1.8;
  color: #cbd5e1;
}

.tool-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tool-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(2,6,23,.72);
  border: 1px solid rgba(103,232,249,.14);
}

.tool-card h2 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #67e8f9;
}

.tool-card p {
  margin: 0;
  line-height: 1.8;
  color: #cbd5e1;
}

.feature-list {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-list span {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15,23,42,.95);
  border: 1px solid rgba(103,232,249,.18);
  color: #67e8f9;
  font-size: 13px;
}

@media (max-width: 900px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}