* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #ffffff;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  flex: 1;
  width: 100%;
}

h1 {
  font-size: 1.35rem;
  margin: 0 0 8px;
  color: #0f172a;
}

.sub {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

label {
  display: block;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 6px;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 1rem;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  flex: 1;
  min-width: 120px;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

button.primary {
  background: #2563eb;
  color: #fff;
}

button.secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

button.danger {
  background: #dc2626;
  color: #fff;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.status {
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #475569;
}

.status.error {
  color: #dc2626;
}

.status.ok {
  color: #16a34a;
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
}

#localPlayer {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

#qrcode canvas,
#qrcode img {
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  border: 1px solid #e2e8f0;
}

.link {
  word-break: break-all;
  font-size: 0.85rem;
  color: #2563eb;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.site-footer {
  text-align: center;
  padding: 16px;
  font-size: 0.8rem;
  color: #94a3b8;
  border-top: 1px solid #f1f5f9;
}

.site-footer a {
  color: #94a3b8;
  text-decoration: none;
}

.site-footer a:hover {
  color: #64748b;
}
