*{box-sizing:border-box}
:root{
  --bg:#060606;
  --panel:#111;
  --gold:#f6c744;
  --gold-dark:#8f5d00;
  --line:rgba(246,199,68,.2);
  --muted:#858585;
  --danger:#ff5f61;
  --cyan:#5be7ff;
}
html,body{
  margin:0;
  min-height:100%;
  background:
    radial-gradient(circle at 50% 0,#241a07 0,#090909 34%,#050505 100%);
  color:#fff;
  font-family:Inter,Arial,sans-serif;
}
button{font:inherit}
.bound-app{min-height:100vh}
.bound-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:13px clamp(14px,4vw,56px);
  border-bottom:1px solid var(--line);
  background:rgba(5,5,5,.92);
}
.bound-brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:#fff;
  text-decoration:none;
}
.bound-logo{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border:1px solid rgba(246,199,68,.45);
  border-radius:12px;
  background:linear-gradient(145deg,var(--gold),var(--gold-dark));
  color:#111;
  font-weight:1000;
}
.bound-brand strong,.bound-brand small{display:block}
.bound-brand small{margin-top:2px;color:#777;font-size:10px}
.bound-status{display:flex;gap:9px;align-items:center}
.bound-status span{
  padding:6px 9px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:999px;
  color:#8c8c8c;
  font-size:8px;
  font-weight:900;
}
#linkStatus{display:flex;align-items:center;gap:6px}
#linkStatus i{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#49dd7f;
  box-shadow:0 0 10px rgba(73,221,127,.55);
}
#linkStatus.warning{color:#ffc45d;border-color:rgba(255,196,93,.22)}
#linkStatus.warning i{background:#ffc45d;box-shadow:0 0 10px rgba(255,196,93,.55)}
#linkStatus.danger{color:#ff7777;border-color:rgba(255,95,97,.25)}
#linkStatus.danger i{background:#ff5f61;box-shadow:0 0 10px rgba(255,95,97,.6)}
.bound-shell{width:min(1280px,calc(100% - 24px));margin:auto;padding:24px 0 60px}
.bound-intro{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,.75fr);
  gap:28px;
  align-items:center;
  min-height:680px;
  padding:clamp(26px,5vw,68px);
  border:1px solid var(--line);
  border-radius:26px;
  overflow:hidden;
  background:
    linear-gradient(135deg,rgba(246,199,68,.08),transparent 45%),
    rgba(12,12,12,.92);
}
.bound-kicker{
  color:var(--gold);
  font-size:9px;
  font-weight:1000;
  letter-spacing:.16em;
}
.bound-intro h1{
  margin:13px 0 18px;
  font-family:Georgia,serif;
  font-size:clamp(50px,8vw,104px);
  line-height:.9;
  letter-spacing:-.045em;
}
.bound-intro p{max-width:650px;color:#a4a4a4;line-height:1.75}
.bound-controls-card{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  max-width:580px;
  margin:23px 0;
}
.bound-controls-card>div{
  padding:14px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:13px;
  background:#090909;
}
.bound-controls-card b,.bound-controls-card span{display:block}
.bound-controls-card b{color:var(--gold);font-size:9px}
.bound-controls-card span{margin-top:6px;color:#7b7b7b;font-size:9px}
.bound-btn{
  min-height:44px;
  padding:0 19px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#151515;
  color:#fff;
  font-weight:1000;
  cursor:pointer;
}
.bound-btn.primary{
  background:linear-gradient(145deg,var(--gold),var(--gold-dark));
  color:#111;
}
.bound-intro-art{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:420px;
}
.bound-robot-preview{
  position:relative;
  z-index:2;
  display:grid;
  place-items:center;
  width:138px;
  height:190px;
  border:7px solid #242424;
  border-radius:28px 28px 18px 18px;
  background:linear-gradient(145deg,#2c2c2c,#0c0c0c);
  font-size:56px;
  font-weight:1000;
  box-shadow:0 28px 70px rgba(0,0,0,.6);
}
.bound-robot-preview::before{
  content:"";
  position:absolute;
  top:38px;
  width:72px;
  height:30px;
  border-radius:7px;
  background:#050505;
  box-shadow:inset 0 0 18px currentColor,0 0 20px currentColor;
}
.player-one{color:var(--gold);transform:rotate(-5deg)}
.player-two{color:var(--cyan);transform:rotate(5deg)}
.bound-preview-link{
  position:absolute;
  width:180px;
  height:7px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--gold),#fff,var(--cyan));
  box-shadow:0 0 26px rgba(246,199,68,.7);
}
.bound-game{display:block}
.bound-hud{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:14px;
  align-items:center;
  margin-bottom:12px;
  padding:12px 14px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:14px;
  background:#0c0c0c;
}
.bound-hud>div:first-child{min-width:180px}
.bound-hud small{display:block;color:#777;font-size:7px;font-weight:900;letter-spacing:.1em}
.bound-link-meter{
  height:7px;
  margin-top:6px;
  overflow:hidden;
  border-radius:999px;
  background:#050505;
}
.bound-link-meter i{
  display:block;
  width:100%;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#ff5f61,#ffc45d,#49dd7f);
  transition:width .08s linear;
}
.bound-hud-center{text-align:center}
.bound-hud-center strong,.bound-hud-center span{display:block}
.bound-hud-center strong{font-size:10px}
.bound-hud-center span{margin-top:4px;color:var(--gold);font-size:9px}
.bound-hud-actions{display:flex;justify-content:flex-end;gap:7px}
.bound-hud-actions button{
  min-height:32px;
  padding:0 10px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  background:#090909;
  color:#888;
  font-size:8px;
  cursor:pointer;
}
.bound-stage-wrap{
  position:relative;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:20px;
  background:#060606;
  box-shadow:0 25px 80px rgba(0,0,0,.55);
}
#boundCanvas{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:16/9;
  background:#080808;
  touch-action:none;
}
.bound-overlay{
  position:absolute;
  inset:0;
  z-index:10;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(0,0,0,.76);
  backdrop-filter:blur(7px);
}
.bound-overlay[hidden]{display:none!important}
.bound-overlay>div{
  width:min(430px,100%);
  padding:28px;
  border:1px solid rgba(246,199,68,.25);
  border-radius:18px;
  background:#101010;
  text-align:center;
}
.bound-overlay span{color:var(--gold);font-size:8px;font-weight:1000;letter-spacing:.13em}
.bound-overlay h2{margin:10px 0;font-size:34px}
.bound-overlay p{color:#8b8b8b;line-height:1.6}
.bound-mobile-controls{
  display:none;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:12px;
}
.bound-mobile-player{
  display:grid;
  grid-template-columns:28px repeat(3,1fr);
  gap:6px;
  align-items:center;
}
.bound-mobile-player>span{color:var(--gold);font-size:9px;font-weight:1000}
.bound-mobile-player button{
  min-height:48px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:10px;
  background:#111;
  color:#fff;
  touch-action:none;
}
@media(max-width:820px){
  .bound-intro{grid-template-columns:1fr;min-height:auto}
  .bound-intro-art{min-height:320px}
  .bound-hud{grid-template-columns:1fr auto}
  .bound-hud-center{grid-column:1/-1;grid-row:2}
  .bound-mobile-controls{display:grid}
}
@media(max-width:560px){
  .bound-topbar{padding:10px 12px}
  .bound-status span:first-child{display:none}
  .bound-shell{width:calc(100% - 12px);padding-top:10px}
  .bound-intro{padding:24px 16px;border-radius:18px}
  .bound-controls-card{grid-template-columns:1fr}
  .bound-intro-art{display:none}
  .bound-hud{grid-template-columns:1fr}
  .bound-hud>div:first-child{min-width:0}
  .bound-hud-actions{justify-content:flex-start}
  .bound-mobile-controls{grid-template-columns:1fr}
}


/* DOSMOS BOUND TOGETHER V0.2 — LEVELS, CHECKPOINT & MOVING PLATFORM */
#checkpointLabel{
  margin-top:4px;
  color:#6f6f6f;
  font-size:7px;
}

.bound-stage-wrap.is-level-transition{
  animation:boundLevelPulse .55s ease;
}

@keyframes boundLevelPulse{
  0%{box-shadow:0 25px 80px rgba(0,0,0,.55)}
  50%{box-shadow:0 0 60px rgba(246,199,68,.28)}
  100%{box-shadow:0 25px 80px rgba(0,0,0,.55)}
}

#linkMeter.warning{
  background:linear-gradient(90deg,#ff5f61,#ffc45d)!important;
}


/* DOSMOS BOUND TOGETHER V0.3 — ONLINE ROOM & REALTIME CO-OP */
.bound-start-actions{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
}

.bound-room-modal{
  position:fixed;
  inset:0;
  z-index:10000;
  display:grid;
  place-items:center;
  padding:18px;
}
.bound-room-modal[hidden]{display:none!important}
.bound-room-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.84);
  backdrop-filter:blur(9px);
}
.bound-room-dialog{
  position:relative;
  z-index:2;
  width:min(520px,100%);
  padding:26px;
  border:1px solid rgba(246,199,68,.25);
  border-radius:20px;
  background:
    radial-gradient(circle at 100% 0,rgba(246,199,68,.08),transparent 35%),
    #0c0c0c;
  box-shadow:0 35px 110px rgba(0,0,0,.75);
}
.bound-room-dialog h2{
  margin:8px 0 20px;
  font-size:28px;
}
.bound-room-dialog label{
  display:grid;
  gap:7px;
  margin-bottom:14px;
  color:#868686;
  font-size:9px;
}
.bound-room-dialog input{
  min-height:45px;
  padding:0 13px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:10px;
  background:#070707;
  color:#fff;
  outline:none;
  text-transform:none;
}
#boundRoomCodeInput{text-transform:uppercase;letter-spacing:.12em}
.bound-room-dialog input:focus{border-color:rgba(246,199,68,.35)}
.bound-room-close{
  position:absolute;
  top:12px;
  right:13px;
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:9px;
  background:#090909;
  color:#aaa;
  font-size:20px;
  cursor:pointer;
}
.bound-room-message{
  min-height:18px;
  margin:12px 0 0;
  color:#ff7a7a;
  font-size:9px;
}
.bound-online-players{
  display:grid;
  grid-template-columns:1fr 48px 1fr;
  gap:10px;
  align-items:center;
  margin:20px 0;
}
.bound-online-players article{
  padding:16px 10px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:13px;
  background:#090909;
  text-align:center;
  opacity:.5;
}
.bound-online-players article.is-ready{
  border-color:rgba(73,221,127,.22);
  background:rgba(73,221,127,.035);
  opacity:1;
}
.bound-online-players b,
.bound-online-players strong,
.bound-online-players span{display:block}
.bound-online-players b{color:var(--gold);font-size:10px}
.bound-online-players strong{margin-top:7px;font-size:11px}
.bound-online-players span{margin-top:5px;color:#6f6f6f;font-size:8px}
.bound-online-link{text-align:center;color:var(--gold);font-size:22px}
.bound-room-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:18px;
}
#boundWaitingHint{color:#808080;line-height:1.55}
.bound-online-badge{
  position:absolute;
  left:14px;
  top:14px;
  z-index:5;
  padding:7px 10px;
  border:1px solid rgba(73,221,127,.2);
  border-radius:999px;
  background:rgba(5,5,5,.75);
  color:#6fe09a;
  font-size:8px;
  font-weight:900;
  pointer-events:none;
}
@media(max-width:560px){
  .bound-start-actions{display:grid}
  .bound-online-players{grid-template-columns:1fr}
  .bound-online-link{transform:rotate(90deg)}
  .bound-room-actions{display:grid}
}


/* DOSMOS BOUND TOGETHER V0.4 — READY CHECK & SYNCED COUNTDOWN */
.bound-btn.ready{
  border-color:rgba(91,231,255,.22);
  color:#79eaff;
}

.bound-btn.ready.is-ready{
  border-color:rgba(73,221,127,.28);
  background:rgba(73,221,127,.08);
  color:#6fe09a;
}

.bound-online-players article.is-self-ready{
  box-shadow:0 0 0 1px rgba(73,221,127,.15),0 0 22px rgba(73,221,127,.08);
}

.bound-countdown{
  position:absolute;
  inset:0;
  z-index:20;
  display:grid;
  place-items:center;
  align-content:center;
  gap:8px;
  background:rgba(0,0,0,.7);
  backdrop-filter:blur(6px);
}

.bound-countdown[hidden]{display:none!important}

.bound-countdown span{
  color:#f6c744;
  font-family:Georgia,serif;
  font-size:clamp(80px,18vw,190px);
  font-weight:900;
  line-height:.8;
  text-shadow:0 0 45px rgba(246,199,68,.55);
  animation:boundCountdownPop .72s ease both;
}

.bound-countdown small{
  color:#fff;
  font-size:10px;
  font-weight:1000;
  letter-spacing:.18em;
}

@keyframes boundCountdownPop{
  0%{opacity:0;transform:scale(.55)}
  55%{opacity:1;transform:scale(1.12)}
  100%{opacity:1;transform:scale(1)}
}
