:root {
  --bg1: #2a0b5a;
  --bg2: #5b1aa8;
  --text: #ffffff;
  --green: #12b76a;
  --green-dark: #0a8a52;
  --yellow: #ffd500;
  --yellow-dark: #e6c100;
  --card: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.2);
}
* {
  box-sizing: border-box;
}
html, body {
  height: 100%;
}
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(1200px 600px at 30% 20%, #7e2aff 0%, #4c1d95 35%, #2a0b5a 70%), linear-gradient(135deg, var(--bg1), var(--bg2));
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
}
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.6px;
  font-size: 20px;
}
.nav-actions {
  display: flex;
  gap: 8px;
}
.app-main {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 160px);
}
.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 800px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 16px;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  background: var(--card-hover);
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.subtle {
  opacity: 0.9;
  font-size: 13px;
}
.parts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.part {
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: linear-gradient(180deg, rgba(18,183,106,0.18), rgba(18,183,106,0.08));
  color: var(--text);
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
}
.part:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255,213,0,0.22), rgba(255,213,0,0.1));
  border-color: rgba(255,213,0,0.6);
}
.app-footer {
  position: sticky;
  bottom: 0;
  backdrop-filter: blur(8px);
  background: linear-gradient(0deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
  border-top: 1px solid var(--border);
  padding: 14px 20px;
}
.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.btn {
  border: none;
  border-radius: 1000px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.2s ease;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-green {
  background: linear-gradient(180deg, var(--green), var(--green-dark));
  color: var(--text);
  box-shadow: 0 6px 16px rgba(18,183,106,0.35);
}
.btn-green:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.btn-yellow {
  background: linear-gradient(180deg, var(--yellow), var(--yellow-dark));
  color: #2a1a2f;
  box-shadow: 0 6px 16px rgba(255,213,0,0.35);
}
.btn-yellow:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.quiz {
  display: grid;
  gap: 14px;
}
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
}
.quiz-title {
  font-weight: 700;
}
.progress {
  font-weight: 600;
}
.question-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 16px;
}
.question-text {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.options {
  display: grid;
  gap: 10px;
}
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.18s ease, background 0.18s ease;
}
.option:hover {
  transform: translateY(-1px);
  border-color: rgba(255,213,0,0.6);
  background: linear-gradient(180deg, rgba(255,213,0,0.12), rgba(255,213,0,0.06));
}
.option input {
  width: 18px;
  height: 18px;
}
.option.correct {
  border-color: rgba(18,183,106,0.8);
  background: linear-gradient(180deg, rgba(18,183,106,0.18), rgba(18,183,106,0.08));
}
.option.wrong {
  border-color: rgba(255,213,0,0.8);
  background: linear-gradient(180deg, rgba(255,213,0,0.22), rgba(255,213,0,0.1));
}
.explanation {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 12px;
}
.score-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 16px;
}
.score {
  font-size: 20px;
  font-weight: 800;
}
.list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}
.muted {
  opacity: 0.8;
}
.user-card {
  display: grid;
  gap: 10px;
}
.name-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
  color: var(--text);
  font-weight: 600;
}
.progress-card {
  margin-top: 12px;
}
