:root {
  --bg: #f5f6f7;
  --card: #ffffff;
  --text: #1f2a37;
  --muted: #5b6470;
  --brand: #0e7490;
  --accent: #fb923c;
  --border: #d9dee5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #eef6ff, #fff8ed);
  color: var(--text);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(92vw, 420px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

h1 {
  margin: 0 0 10px;
  font-size: 32px;
}

h2 {
  margin-top: 0;
  font-size: 26px;
}

.muted {
  color: var(--muted);
  font-size: 18px;
}

.alert {
  background: #ffe8e8;
  border: 1px solid #f3b1b1;
  color: #922;
  padding: 10px;
  border-radius: 8px;
  margin: 8px 0 14px;
  font-size: 18px;
}

.form,
.inline-form {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 18px;
}

input,
select,
button {
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 18px;
  padding: 8px 12px;
}

button[type="button"] {
  margin-top: 8px;
  background: var(--accent);
  border-color: var(--accent);
}

button {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 700;
}

button:hover {
  filter: brightness(1.05);
  cursor: pointer;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.user-tools {
  display: flex;
  gap: 14px;
  font-size: 18px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.result,
.list {
  margin-top: 12px;
  font-size: 18px;
}

.list {
  display: grid;
  gap: 10px;
  padding-left: 20px;
}

.exercise-list details {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: #fcfdff;
}

summary {
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}

.danger-btn {
  min-height: 34px;
  margin-left: 8px;
  padding: 4px 10px;
  background: #ef4444;
  border-color: #ef4444;
  font-size: 16px;
}

.pose-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 18px;
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #eef2f7;
}

#pose-video,
#pose-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#pose-video {
  object-fit: cover;
}

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .muted, .user-tools, input, select, button, .result, .list, label { font-size: 17px; }
  .topbar { flex-direction: column; align-items: flex-start; }
}
