:root {
  color-scheme: dark;
  --fg: #f7f4ee;
  --muted: #c9c4ba;
  --line: rgba(255, 255, 255, 0.22);
  --panel: rgba(18, 18, 18, 0.58);
  --panel-strong: rgba(18, 18, 18, 0.74);
  --accent: #d71920;
  --accent-dark: #a90f15;
  --ok: #62d389;
  --warn: #f2c16b;
  --bad: #ff7479;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: #111;
  color: var(--fg);
  font: 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(8, 8, 8, 0.68), rgba(8, 8, 8, 0.36) 44%, rgba(8, 8, 8, 0.52)),
    url("assets/hero-headphones.png") center / cover no-repeat;
}

.overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.08), transparent 36%);
  pointer-events: none;
}

.control-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

.intro,
.pairing-note {
  margin: 12px 0 0;
  color: var(--muted);
}

.device-box {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

#deviceName {
  display: block;
  overflow: hidden;
  max-width: 250px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg);
  cursor: pointer;
}

button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.15);
}

button:disabled {
  color: rgba(255, 255, 255, 0.52);
  cursor: not-allowed;
}

.primary {
  width: 100%;
  margin-top: 14px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 760;
}

.primary:hover:not(:disabled) {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.log {
  display: grid;
  gap: 8px;
  max-height: 132px;
  overflow: auto;
  margin-top: 16px;
}

.log-entry {
  padding: 9px 10px;
  border-left: 3px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
  color: var(--muted);
}

.log-entry.ok {
  border-left-color: var(--ok);
}

.log-entry.warn {
  border-left-color: var(--warn);
}

.log-entry.bad {
  border-left-color: var(--bad);
}

@media (max-width: 560px) {
  .hero {
    align-items: end;
    padding: 16px;
  }

  .control-panel {
    padding: 20px;
  }

  h1 {
    font-size: 28px;
  }

  .device-box {
    grid-template-columns: 1fr;
  }

  #deviceName {
    max-width: 100%;
  }
}
