/* Testlar, uy vazifa, o'quvchi bosh sahifasi va kichik ekranlar uchun moslashuv. */
/* ---- Testlar ---- */
.questions {
  display: grid;
  gap: 24px;
}

.question {
  display: grid;
  gap: 12px;
}

.question-text {
  display: flex;
  gap: 12px;
  font-weight: 550;
  font-size: 15.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.question-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
}

.options {
  display: grid;
  gap: 8px;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}

.option.is-choice {
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.option.is-choice:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.option.is-choice input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--accent);
}

.option.is-choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option.is-correct {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 550;
}

.option.is-wrong {
  border-color: transparent;
  background: var(--red-soft);
  color: var(--red);
}

.option-tag {
  margin-left: auto;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  opacity: 0.85;
}

.editor-question {
  display: grid;
  gap: 12px;
}

.editor-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-head h3 {
  flex: 1;
}

.editor-options {
  display: grid;
  gap: 8px;
}

.editor-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-option input[type='radio'] {
  width: 20px;
  height: 20px;
  flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}

.add-question {
  height: 48px;
  border-style: dashed;
  background: transparent;
}

.save-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.save-bar.sticky {
  position: sticky;
  bottom: 16px;
  justify-content: space-between;
  padding: 12px 12px 12px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.result {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
}

.result-ring {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0);
}

.result-ring strong {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--surface);
  font-size: 19px;
  font-weight: 650;
}

/* ---- Uy vazifa ---- */
.hw-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.block {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.block.answer {
  background: var(--accent-soft);
  border-color: transparent;
}

.block.returned {
  background: var(--red-soft);
  border-color: transparent;
}

.block-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.grade-row {
  grid-template-columns: 150px 1fr;
  align-items: start;
}

/* ---- O'quvchi bosh sahifasi ---- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #062a21;
  box-shadow: 0 18px 40px -18px rgba(6, 42, 33, 0.55);
  color: #eafff6;
  flex-wrap: wrap;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  background:
    radial-gradient(50% 120% at 100% 0%, rgba(52, 211, 153, 0.36), transparent 70%),
    radial-gradient(40% 90% at 0% 100%, rgba(250, 204, 21, 0.12), transparent 70%);
}

.hero::after {
  background-image:
    linear-gradient(rgba(234, 255, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 255, 246, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(60% 120% at 90% 0%, #000, transparent 75%);
  mask-image: radial-gradient(60% 120% at 90% 0%, #000, transparent 75%);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7ee2bd;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-title,
.hero h2 {
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: rgba(234, 255, 246, 0.85);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero .badge {
  background: rgba(255, 255, 255, 0.14);
  border-color: transparent;
  color: #fff;
}

.hero-notes,
.hero .muted {
  color: rgba(234, 255, 246, 0.72);
  font-size: 14px;
}

.hero-join {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
  color: #062a21;
}

.hero-join:hover {
  background: #e6fff5;
  border-color: #e6fff5;
}

.hero.is-live .hero-join {
  background: #34d399;
  border-color: #34d399;
  color: #05251a;
}

.hero-offline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(234, 255, 246, 0.85);
  font-weight: 550;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34d399;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}

@media (max-width: 1000px) {
  .week {
    grid-template-columns: minmax(0, 1fr);
  }

  .day {
    min-height: 0;
  }

  .day-head {
    justify-content: flex-start;
    gap: 10px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .row-side .badge + .btn,
  .lesson-row .avatar {
    display: none;
  }

  .hero {
    padding: 22px;
  }

  .hero-join {
    width: 100%;
  }

  .grade-row {
    grid-template-columns: 1fr;
  }

  .save-bar.sticky {
    bottom: 84px;
  }

  .profile-stats {
    width: 100%;
    justify-content: space-between;
  }
}
