/* Add styles here */
:root {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans KR", sans-serif;
  --bg: #0b1020;
  --text: #eef2ff;
  --text-sub: rgba(238,242,255,0.8);
  --card-bg: rgba(255,255,255,0.06);
  --card-border: rgba(255,255,255,0.12);
  --btn-bg: #a5b4fc;
  --btn-text: #0b1020;
  --set-bg: rgba(255,255,255,0.05);
  --set-border: rgba(255,255,255,0.12);
  --set-title-text: rgba(238,242,255,0.85);
  --ball-bg: rgba(255,255,255,0.10);
  --ball-border: rgba(255,255,255,0.18);
  --meta-text: rgba(238,242,255,0.65);
  --history-title: rgba(238,242,255,0.9);
  --history-text: rgba(238,242,255,0.75);
}
body.light-mode {
  --bg: #f0f2f5;
  --text: #1c1e21;
  --text-sub: rgba(28,30,33,0.8);
  --card-bg: #ffffff;
  --card-border: #dcdfe6;
  --btn-bg: #4267b2;
  --btn-text: #ffffff;
  --set-bg: #f0f2f5;
  --set-border: #dcdfe6;
  --set-title-text: #1c1e21;
  --ball-bg: #ffffff;
  --ball-border: #dcdfe6;
  --meta-text: rgba(28,30,33,0.65);
  --history-title: #1c1e21;
  --history-text: rgba(28,30,33,0.75);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  transition: background .2s ease, color .2s ease;
}
.wrap { max-width: 820px; margin: 0 auto; padding: 48px 20px; }
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
  transition: background .2s ease, border-color .2s ease;
}
h1 { margin: 0 0 10px; font-size: 28px; }
p { margin: 0 0 18px; color: var(--text-sub); line-height: 1.5; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
button {
  cursor: pointer;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  color: var(--btn-text);
  background: var(--btn-bg);
  transition: transform .08s ease, filter .2s ease, opacity .2s ease;
}
button:hover { filter: brightness(1.05); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

/* 5세트 컨테이너 */
.sets { margin-top: 18px; display: grid; gap: 12px; }
.set {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--set-bg);
  border: 1px solid var(--set-border);
  transition: background .2s ease, border-color .2s ease;
}
.set-title {
  min-width: 70px;
  font-weight: 800;
  color: var(--set-title-text);
}

.balls { display: flex; gap: 10px; flex-wrap: wrap; }
.ball {
  width: 50px; height: 50px;
  border-radius: 999px;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 800;
  background: var(--ball-bg);
  border: 1px solid var(--ball-border);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.05);
  transform: scale(0.9);
  opacity: 0;
  animation: pop .35s ease forwards;
  transition: background .2s ease, border-color .2s ease;
}
@keyframes pop { to { transform: scale(1); opacity: 1; } }

.meta { margin-top: 14px; font-size: 13px; color: var(--meta-text); }
.history { margin-top: 18px; }
.history h2 { font-size: 16px; margin: 0 0 10px; color: var(--history-title); }
.history ul { margin: 0; padding-left: 18px; color: var(--history-text); }
.history li { margin: 6px 0; }
.tag { display: inline-block; margin-left: 8px; font-size: 12px; opacity: .7; }