*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05070a;
}

#wallpaper-root {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#bcs1-img {
  display: none;
}

#signal-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.control-strip {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 20;
  width: min(320px, calc(100vw - 28px));
  padding: 10px 12px 11px;
  box-sizing: border-box;
  border: 1px solid rgba(217, 119, 6, 0.32);
  border-radius: 8px;
  background: rgba(8, 10, 14, 0.78);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  color: rgba(255, 245, 230, 0.92);
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  cursor: default;
  user-select: none;
  pointer-events: auto;
}

.control-strip.is-hidden {
  display: none;
}

.control-strip__brand {
  margin-bottom: 8px;
  color: rgba(245, 208, 160, 0.95);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.control-strip__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.control-strip__row--stack {
  flex-direction: column;
  align-items: stretch;
}

.ctrl-btn {
  appearance: none;
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 5px;
  background: rgba(217, 119, 6, 0.14);
  color: rgba(255, 245, 230, 0.95);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 7px 10px;
  cursor: pointer;
}

.ctrl-btn:hover {
  border-color: rgba(245, 180, 90, 0.55);
  background: rgba(217, 119, 6, 0.26);
}

.ctrl-btn--primary {
  border-color: rgba(245, 180, 90, 0.5);
  background: rgba(120, 60, 10, 0.55);
}

.ctrl-btn--danger {
  border-color: rgba(255, 90, 110, 0.35);
  background: rgba(160, 40, 50, 0.4);
}

.ctrl-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.ctrl-label {
  flex: 0 0 auto;
  color: rgba(230, 200, 160, 0.8);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ctrl-select {
  flex: 1 1 auto;
  min-width: 0;
  appearance: none;
  border: 1px solid rgba(217, 119, 6, 0.32);
  border-radius: 5px;
  background: rgba(8, 10, 14, 0.95);
  color: rgba(255, 245, 230, 0.95);
  font: inherit;
  font-size: 11px;
  padding: 6px 8px;
  cursor: pointer;
}

.control-strip__status {
  color: rgba(230, 200, 160, 0.88);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.hidden {
  display: none !important;
}


/* Control-strip hint / status */
.control-strip__hint {
  margin-top: 0.55rem;
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: rgba(220, 230, 240, 0.55);
}

.control-strip__status.is-ok {
  color: rgba(120, 220, 160, 0.95);
}

.control-strip__status.is-warn {
  color: rgba(255, 190, 110, 0.95);
}

.control-strip__status.is-err {
  color: rgba(255, 140, 120, 0.95);
}


/* Stream Mode styles retained; display-only, unused without UI entry point */
body.stream-mode {
  cursor: none;
}

body.stream-mode #control-strip,
body.stream-mode .control-strip {
  display: none !important;
}

body.stream-mode #wallpaper-root,
body.stream-mode #signal-canvas {
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

/* Phone-only: hide/show existing control strip (desktop unchanged) */
.mobile-controls-toggle {
  display: none;
}

@media (max-width: 768px) {
  .mobile-controls-toggle {
    display: block;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 30;
    appearance: none;
    border: 1px solid rgba(217, 119, 6, 0.45);
    border-radius: 5px;
    background: rgba(8, 10, 14, 0.88);
    color: rgba(255, 245, 230, 0.95);
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 8px 10px;
    cursor: pointer;
    user-select: none;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-controls-toggle:active {
    background: rgba(217, 119, 6, 0.28);
  }

  .control-strip {
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
  }

  .control-strip.is-hidden {
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
  }
}
