* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
  background: #0f1115;
  color: #e8eaf0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 64px;
}
.container { width: 100%; max-width: 1200px; }
h1 { font-size: 1.5rem; margin-bottom: 8px; }
.sub { color: #9aa0ae; font-size: 0.95rem; margin-bottom: 24px; line-height: 1.6; }
.card {
  background: #181b22;
  border: 1px solid #2a2e39;
  border-radius: 12px;
  padding: 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.video-card {
  background: #181b22;
  border: 1px solid #2a2e39;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.video-card video {
  width: 100%;
  border-radius: 8px;
  background: #000;
  aspect-ratio: 16 / 9;
}
.video-label {
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
select, input[type="text"] {
  background: #0f1115;
  color: #e8eaf0;
  border: 1px solid #3a3f4c;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.95rem;
}
select:focus, input[type="text"]:focus { outline: 2px solid #4f7cff; border-color: transparent; }
button {
  background: #4f7cff;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
button:disabled { background: #3a3f4c; cursor: not-allowed; }
.error { color: #ff7a7a; font-size: 0.9rem; margin: 8px 0; min-height: 1.2em; }
.progress { color: #9aa0ae; font-size: 0.85rem; margin-bottom: 16px; }
.center { text-align: center; max-width: 520px; margin: 15vh auto 0; }
.center .card { display: flex; flex-direction: column; gap: 16px; }
.rank-note { font-size: 0.8rem; color: #9aa0ae; }
.answer-panel {
  background: #181b22;
  border: 1px solid #4f7cff;
  border-radius: 12px;
  padding: 20px;
  margin-top: 8px;
}
.answer-panel h2 { font-size: 1.2rem; margin-bottom: 12px; }
.answer-panel table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.answer-panel th, .answer-panel td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #2a2e39;
  font-size: 0.95rem;
}
.answer-panel th { color: #9aa0ae; font-weight: 500; }
.answer-panel code {
  background: #0f1115;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
}
