/* 高考英语考点学习平台 · 补充样式（桌面优先） */

:root {
  --ink-950: #162029;
  --accent: #0d9488;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html,
body {
  height: 100%;
}

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(20, 184, 166, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(70, 114, 140, 0.14), transparent 50%),
    linear-gradient(180deg, #f4f7f9 0%, #eef3f6 40%, #f7f9fb 100%);
  background-attachment: fixed;
}

.app-shell {
  min-height: 100vh;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.7rem;
  background:
    linear-gradient(145deg, #14b8a6 0%, #0f766e 55%, #324c60 100%);
  box-shadow: 0 8px 18px -10px rgba(15, 118, 110, 0.8);
  position: relative;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 0.4rem;
}

/* 顶部导航按钮 */
.nav-tab {
  height: 2.25rem;
  padding: 0 0.9rem;
  border-radius: 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #3a5c74;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-tab:hover {
  background: #eef3f6;
  color: #162029;
}

.nav-tab.is-active {
  background: #162029;
  color: #fff;
}

.nav-tab.is-active #wrong-count-badge,
.nav-tab.is-active span {
  background: rgba(45, 212, 191, 0.2);
  color: #99f6e4;
}

/* 视图切换 */
.view-panel {
  display: none;
  animation: fadeRise 0.35s var(--ease);
}

.view-panel.is-active {
  display: block;
}

@keyframes fadeRise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-panel {
  position: relative;
}

.hero-panel::before {
  content: '';
  position: absolute;
  inset: 1rem 1.25rem auto auto;
  width: min(280px, 40vw);
  height: 160px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.18), transparent 60%),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 10px,
      rgba(41, 55, 68, 0.04) 10px,
      rgba(41, 55, 68, 0.04) 11px
    );
  border-radius: 24px;
  pointer-events: none;
}

/* 按钮 */
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-collect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  padding: 0 1.1rem;
  border-radius: 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(15, 118, 110, 0.9);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -12px rgba(15, 118, 110, 0.95);
}

.btn-secondary {
  background: #fff;
  border: 1px solid #c5d5df;
  color: #324c60;
}

.btn-secondary:hover {
  border-color: #14b8a6;
  color: #0f766e;
  background: #f0fdfa;
}

.btn-ghost {
  background: transparent;
  color: #46728c;
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: #fff;
  border-color: #c5d5df;
  color: #162029;
}

.btn-sm {
  height: 2.1rem;
  padding: 0 0.85rem;
  font-size: 0.8125rem;
}

.btn-collect {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  border: 1px solid #c5d5df;
  background: #fff;
  color: #3a5c74;
}

.btn-collect:hover {
  border-color: #14b8a6;
  color: #0f766e;
}

.btn-collect.is-collected {
  background: #ecfdf5;
  border-color: #5eead4;
  color: #0f766e;
}

/* 侧边考点树 */
.sidebar {
  max-height: calc(100vh - 4rem);
  position: sticky;
  top: 4rem;
}

.sidebar.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  max-height: none;
  width: min(320px, 88vw);
  display: block !important;
  box-shadow: 12px 0 40px -20px rgba(22, 32, 41, 0.45);
  animation: slideIn 0.28s var(--ease);
}

@keyframes slideIn {
  from {
    transform: translateX(-12px);
    opacity: 0.6;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.tree-group + .tree-group {
  margin-top: 1rem;
}

.tree-group__label {
  padding: 0.35rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #628ea7;
}

.tree-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: center;
  text-align: left;
  padding: 0.65rem 0.7rem;
  border-radius: 0.75rem;
  margin-bottom: 0.25rem;
  border: 1px solid transparent;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.tree-item:hover {
  background: #f2f6f8;
}

.tree-item.is-active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(50, 76, 96, 0.08));
  border-color: rgba(20, 184, 166, 0.35);
}

.tree-item__cat {
  font-size: 0.65rem;
  font-weight: 600;
  color: #0f766e;
  background: rgba(20, 184, 166, 0.12);
  padding: 0.15rem 0.4rem;
  border-radius: 0.4rem;
  white-space: nowrap;
}

.tree-item__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #243442;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-item__count {
  font-size: 0.7rem;
  color: #97b4c5;
  white-space: nowrap;
}

/* 首页卡片 */
.home-topic-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(197, 213, 223, 0.9);
  box-shadow: 0 10px 30px -18px rgba(22, 32, 41, 0.25);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
  min-height: 168px;
}

.home-topic-card:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: 0 18px 36px -20px rgba(22, 32, 41, 0.35);
}

.home-topic-card__cat {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f766e;
  letter-spacing: 0.04em;
}

.home-topic-card__title {
  margin-top: 0.45rem;
  font-family: 'Noto Serif SC', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #162029;
}

.home-topic-card__desc {
  margin-top: 0.45rem;
  font-size: 0.875rem;
  color: #46728c;
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-topic-card__meta {
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: #97b4c5;
}

/* 详情区 */
.section-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.section-head h3 {
  font-family: 'Noto Serif SC', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #162029;
}

.section-count {
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e3ebf0;
  color: #3a5c74;
  font-size: 0.75rem;
  font-weight: 700;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  height: 1.75rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #c5d5df;
  color: #3a5c74;
  font-size: 0.75rem;
}

.content-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(197, 213, 223, 0.95);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  box-shadow: 0 8px 24px -18px rgba(22, 32, 41, 0.28);
}

.content-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #1f303c;
  margin-bottom: 0.55rem;
}

.content-card__body {
  font-size: 0.925rem;
  line-height: 1.7;
  color: #324c60;
}

.content-card__tip {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #115e59;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.content-card__tip span {
  display: inline-block;
  margin-right: 0.45rem;
  font-weight: 700;
  color: #0f766e;
}

.example-en {
  font-size: 1.02rem;
  line-height: 1.65;
  color: #162029;
  font-weight: 500;
}

.example-zh {
  margin-top: 0.4rem;
  font-size: 0.875rem;
  color: #628ea7;
}

/* 真题卡片 */
.q-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.q-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.q-chip {
  display: inline-flex;
  align-items: center;
  height: 1.5rem;
  padding: 0 0.55rem;
  border-radius: 0.4rem;
  background: #eef3f6;
  color: #3a5c74;
  font-size: 0.72rem;
  font-weight: 600;
}

.q-chip--point {
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
}

.practice-unit {
  padding: 1rem 1.05rem 1.15rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(197, 213, 223, 0.95);
  box-shadow: 0 10px 28px -22px rgba(22, 32, 41, 0.35);
}

.practice-unit__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.practice-unit__index {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: #162029;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.practice-unit__titles h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #162029;
  line-height: 1.35;
}

.practice-unit__titles p {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #628ea7;
}

.practice-unit__knowledge {
  margin-bottom: 0.85rem;
}

.practice-unit__knowledge .knowledge-card {
  box-shadow: none;
  background: #f7f9fb;
}

.practice-unit__block + .practice-unit__block {
  margin-top: 0.85rem;
}

.practice-unit__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #628ea7;
  margin-bottom: 0.45rem;
}

.practice-unit__examples {
  display: grid;
  gap: 0.65rem;
}

.practice-unit__examples .example-card {
  box-shadow: none;
  background: #fff;
}

.practice-unit__questions {
  display: grid;
  gap: 0.75rem;
}

.practice-unit__questions .question-card {
  box-shadow: none;
}

.q-stem {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #1f303c;
  font-weight: 500;
}

.q-options {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.45rem;
}

.q-options li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  background: #f7f9fb;
  border: 1px solid #e3ebf0;
  font-size: 0.9rem;
  color: #324c60;
  line-height: 1.5;
}

.q-opt-label {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  background: #fff;
  border: 1px solid #c5d5df;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f766e;
}

.q-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.95rem;
}

.q-answer,
.q-analysis {
  margin-top: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.75rem;
  animation: fadeRise 0.25s var(--ease);
}

.q-answer {
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  color: #115e59;
}

.q-answer__text {
  font-size: 0.925rem;
  font-weight: 600;
  line-height: 1.65;
}

.q-analysis {
  background: #f8fafc;
  border: 1px solid #dbe4ea;
  color: #324c60;
  font-size: 0.9rem;
  line-height: 1.65;
}

.q-panel-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  opacity: 0.75;
}

.is-hidden {
  display: none !important;
}

.empty-inline,
.empty-state {
  padding: 2.5rem 1.25rem;
  text-align: center;
  border: 1px dashed #c5d5df;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  color: #628ea7;
  font-size: 0.9rem;
}

.wrong-item + .wrong-item {
  margin-top: 1.25rem;
}

.wrong-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  padding: 0 0.15rem;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%) translateY(12px);
  background: #162029;
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  box-shadow: 0 16px 40px -16px rgba(22, 32, 41, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  z-index: 60;
  max-width: min(90vw, 360px);
  text-align: center;
}

.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 主栏滚动更顺滑 */
main {
  max-height: calc(100vh - 4rem);
}

/* 宽屏阅读舒适宽度 */
@media (min-width: 1280px) {
  #view-topic .px-5,
  #view-wrongbook .px-5 {
    padding-left: 2.75rem;
    padding-right: 2.75rem;
  }

  .question-card .q-options {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1023px) {
  main {
    max-height: none;
  }
}
