/* ==============================================
   一凡的留学之路 · 自定义样式
   注意：本项目用 Tailwind Play CDN 加载，它不会编译
   外部 CSS 文件里的 @apply。因此本文件全部使用原生 CSS 写法。
   ============================================== */

/* --- 基础 --- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* ==============================================
   伦敦 · 泰晤士河 + 大本钟 背景主题
   ============================================== */

/* html 做 fixed 背景，让全页面任何位置都有背景覆盖 */
html {
  background-image: url('../images/london-bg.webp');
  background-size: cover;
  background-position: center 45%;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* body 透明，让 html 背景透过来 */
body { background: transparent !important; }

/* 背景层主要用于暗色模式渐变蒙层 */
.grassland-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* 渐变蒙层：大幅减弱，让背景照片完全透出 */
.grassland-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.00) 30%,
      rgba(255, 255, 255, 0.05) 60%,
      rgba(255, 255, 255, 0.15) 100%);
}
html.dark .grassland-bg::after {
  background:
    linear-gradient(180deg,
      rgba(15, 23, 42, 0.20) 0%,
      rgba(15, 23, 42, 0.10) 30%,
      rgba(15, 23, 42, 0.20) 60%,
      rgba(15, 23, 42, 0.35) 100%);
}

/* 内容卡片半透明 + 模糊，让背景透过来 */
.card-glass {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html.dark .card-glass {
  background: rgba(15, 23, 42, 0.78) !important;
}

/* 让 rounded-2xl 卡片也变成玻璃质感（让背景照片大幅透出） */
.rounded-2xl.bg-white {
  background-color: rgba(255, 255, 255, 0.50) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
html.dark .rounded-2xl.bg-white {
  background-color: rgba(15, 23, 42, 0.50) !important;
}

/* 顶部导航半透明 */
header.sticky {
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html.dark header.sticky {
  background: rgba(15, 23, 42, 0.65) !important;
}

/* ==============================================
   导航链接（原 @apply px-3 py-2 rounded-lg text-slate-600 ... 展开）
   ============================================== */
.nav-link {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: #475569;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-link:hover { background-color: #f1f5f9; }
.nav-link.active {
  color: #2563eb;
  background-color: #eff6ff;
  font-weight: 600;
}
html.dark .nav-link { color: #cbd5e1; }
html.dark .nav-link:hover { background-color: #1e293b; }
html.dark .nav-link.active {
  color: #60a5fa;
  background-color: rgba(30, 58, 138, 0.3);
}

/* ==============================================
   时间线
   ============================================== */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, #3b82f6, #f59e0b);
  border-radius: 1px;
}
.timeline-dot {
  position: absolute;
  left: -0.15rem;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: white;
  border: 3px solid #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.timeline-dot.accent {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

/* --- 卡片悬停 --- */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.25);
}

/* --- 资讯卡片分类 ---
   颜色直接通过 Tailwind class 内联（见 data.js 的 CATEGORIES）
*/

/* --- 重要度指示器（原 @apply 展开）--- */
.importance-high   { background-color: #f43f5e; }
.importance-medium { background-color: #f59e0b; }
.importance-low    { background-color: #10b981; }

/* --- 渐变网格底 --- */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* --- 滚动条美化 --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.5); }

/* ==============================================
   进度条（原 @apply 展开）
   ============================================== */
.progress-bar {
  width: 100%;
  height: 0.5rem;
  background-color: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}
html.dark .progress-bar { background-color: #1e293b; }

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background-image: linear-gradient(to right, #3b82f6, #f59e0b);
  transition: width 0.7s ease;
}

/* --- 雷达图容器 --- */
.radar-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* --- 打印样式 --- */
@media print {
  .no-print { display: none !important; }
}

/* --- 动画类 --- */
.view-enter { animation: slideUp 0.4s ease-out; }

/* ==============================================
   资讯分类筛选按钮（原内联在 renderDashboard 里，
   导致直接访问 #/news 时无样式，现移入全局）
   ============================================== */
.cat-pill {
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
html.dark .cat-pill {
  background: #0f172a;
  color: #cbd5e1;
  border-color: #334155;
}
.cat-pill:hover { border-color: #3b82f6; color: #3b82f6; }
.cat-pill.active { background: #3b82f6; color: #ffffff; border-color: #3b82f6; }
html.dark .cat-pill.active { background: #2563eb; color: #ffffff; }

/* ==============================================
   Hero 跑马灯标题（中英文从右向左循环滚动）
   ============================================== */
.marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.marquee__track {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee-scroll {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}
