/* ===================================================================
   岸线 Shoreline — 考研英语学习应用 · 公共样式 style.css
   风格：白底 + 蓝绿主色 / 圆角卡片 / 轻阴影
   字体：ZCOOL XiaoWei（标题）+ Noto Sans SC（正文）+ Outfit（英文/数字）
   =================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  /* 主色 */
  --c-primary: #2f6fed;
  --c-primary-dark: #1d4fd4;
  --c-primary-light: #e8f0fe;
  --c-green: #34a853;
  --c-green-dark: #2a8a42;
  --c-green-light: #e8f6ec;

  /* 语义色 */
  --c-easy: #34a853;
  --c-easy-light: #e8f6ec;
  --c-medium: #ff9800;
  --c-medium-light: #fff5e6;
  --c-hard: #f44336;
  --c-hard-light: #fdeaea;
  --c-gold: #ffb300;
  --c-silver: #90a4ae;
  --c-bronze: #cd7f32;

  /* 中性色 */
  --c-bg: #f4f6fb;
  --c-bg-grad: linear-gradient(170deg, #eef2fb 0%, #f5f7fa 40%, #f0f5f0 100%);
  --c-card: #ffffff;
  --c-text: #1a2332;
  --c-text-2: #5c6b7a;
  --c-text-3: #9aa8b6;
  --c-border: #e4e9f0;
  --c-shadow: 0 2px 12px rgba(47, 111, 237, 0.08);
  --c-shadow-lg: 0 8px 28px rgba(47, 111, 237, 0.14);
  --c-shadow-green: 0 4px 16px rgba(52, 168, 83, 0.18);

  /* 尺寸 */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --nav-h: 56px;
  --topnav-h: 64px;
  --max-w: 480px;

  /* 字体 */
  --font-display: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --font-body: "Noto Sans SC", -apple-system, "PingFang SC", sans-serif;
  --font-en: "Outfit", "Noto Sans SC", sans-serif;
}

/* ---------- 重置 ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--c-bg-grad);
  color: var(--c-text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; outline: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* ---------- 公共容器 ---------- */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + 24px);
  min-height: 100vh;
}
@media (min-width: 768px) {
  .page-wrap {
    max-width: 960px;
    padding: 24px 32px 32px;
  }
}

/* ---------- 顶部导航（桌面端） ---------- */
.top-nav {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topnav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}
.top-nav .logo {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--c-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-nav .logo .dot {
  width: 10px; height: 10px;
  background: var(--c-green);
  border-radius: 50%;
}
.top-nav-links {
  display: flex;
  gap: 4px;
}
.top-nav-links a {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--c-text-2);
  font-weight: 500;
  transition: all .2s;
}
.top-nav-links a:hover,
.top-nav-links a.active {
  background: var(--c-primary-light);
  color: var(--c-primary);
}
@media (min-width: 768px) {
  .top-nav { display: flex; }
  .page-wrap { padding-top: calc(var(--topnav-h) + 24px); }
}

/* ---------- 底部导航（移动端） ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--c-border);
  display: flex;
  z-index: 100;
  max-width: var(--max-w);
  margin: 0 auto;
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--c-text-3);
  font-size: 11px;
  transition: color .2s;
}
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a.active { color: var(--c-primary); }
@media (min-width: 768px) { .bottom-nav { display: none; } }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(47, 111, 237, 0.3);
}
.btn-primary:hover { background: var(--c-primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(47,111,237,.36); }
.btn-primary:active { transform: translateY(0); }
.btn-green {
  background: var(--c-green);
  color: #fff;
  box-shadow: var(--c-shadow-green);
}
.btn-green:hover { background: var(--c-green-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border: 2px solid var(--c-primary);
}
.btn-outline:hover { background: var(--c-primary-light); }
.btn-disabled, .btn:disabled {
  background: #dfe4ea !important;
  color: #9aa8b6 !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}
.btn-block { display: flex; width: 100%; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--c-card);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 20px;
  transition: all .25s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--c-shadow-lg);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.tag-easy { background: var(--c-easy-light); color: var(--c-easy); }
.tag-medium { background: var(--c-medium-light); color: var(--c-medium); }
.tag-hard { background: var(--c-hard-light); color: var(--c-hard); }

/* ---------- 难度色条 ---------- */
.bar-easy { background: var(--c-easy); }
.bar-medium { background: var(--c-medium); }
.bar-hard { background: var(--c-hard); }

/* ---------- 分数条 ---------- */
.score-bar-track {
  width: 100%; height: 8px;
  background: #eef2f7;
  border-radius: 4px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .6s ease;
}

/* ---------- 置灰态 ---------- */
.disabled-overlay {
  opacity: .5;
  pointer-events: none;
  position: relative;
}
.disabled-overlay::after {
  content: "敬请期待";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ---------- 页面标题 ---------- */
.page-title {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--c-text);
  margin-bottom: 4px;
}
.page-subtitle {
  font-size: 13px;
  color: var(--c-text-3);
  margin-bottom: 20px;
}

/* ---------- 输入框 ---------- */
.input-field {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  font-size: 15px;
  background: #f8fafd;
  transition: all .2s;
}
.input-field:focus {
  border-color: var(--c-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.1);
}
textarea.input-field {
  height: auto;
  padding: 14px 16px;
  resize: vertical;
  min-height: 120px;
  line-height: 1.8;
}

/* ---------- 动画 ---------- */
@keyframes flipReveal {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.fade-up { animation: fadeUp .5s ease both; }
.fade-up:nth-child(1) { animation-delay: 0s; }
.fade-up:nth-child(2) { animation-delay: .08s; }
.fade-up:nth-child(3) { animation-delay: .16s; }
.fade-up:nth-child(4) { animation-delay: .24s; }
.fade-up:nth-child(5) { animation-delay: .32s; }
.fade-up:nth-child(6) { animation-delay: .40s; }

/* 加载圈 */
.loader {
  width: 28px; height: 28px;
  border: 3px solid var(--c-primary-light);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ---------- 工具类 ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.hidden { display: none !important; }
