:root {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #0f172a;
  background-color: #f1f5f9;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top, #e0ecff, #f1f5f9);
}

header,
footer {
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.version-pill {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
}

footer {
  border-bottom: none;
  border-top: 1px solid #e2e8f0;
  justify-content: center;
  color: #64748b;
}

main {
  flex: 1;
  display: grid;
  gap: 1.5rem;
  padding: clamp(1rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.status-panel h1 {
  margin-top: 0;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.intro {
  color: #475569;
}

button {
  font: inherit;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

button.primary {
  background: linear-gradient(120deg, #2563eb, #7c3aed);
  color: #fff;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button:not(:disabled):active {
  transform: translateY(1px);
}

#status-message {
  margin: 1rem 0 0;
  color: #0f172a;
  font-weight: 600;
}

.result {
  margin-top: 1rem;
  padding: 1rem;
  min-height: 3.5rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  border: 1px dashed #cbd5f5;
  word-break: break-word;
  font-weight: 600;
  color: #0f172a;
}

.video-wrapper {
  position: relative;
  padding-top: 62%;
  border-radius: 1rem;
  overflow: hidden;
  background: #0f172a;
}

video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

#install-btn {
  background: transparent;
  border: 1px solid #2563eb;
  color: #2563eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    color: #e2e8f0;
    background-color: #020617;
  }
  body {
    background: radial-gradient(circle at top, #0f172a, #020617);
  }
  .panel {
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  }
  .intro,
  footer {
    color: #94a3b8;
  }
  .result {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f8fafc;
  }
  header,
  footer {
    background: #0b1120;
    border-color: rgba(255, 255, 255, 0.08);
  }
  .version-pill {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5f5;
  }
}
