@keyframes bounce-in {
  0% { transform: translate(-50%, -20px); opacity: 0; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}
.animate-bounce-in { animation: bounce-in 0.45s ease-out; }

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fade-in-up 0.5s ease-out both; }

.hero-gradient {
  background: linear-gradient(135deg, #0f1b3d 0%, #152552 50%, #1e3a8a 100%);
}
.hero-grid::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(99,102,241,0.2), transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(59,130,246,0.15), transparent 40%);
  pointer-events: none;
}

.card-hover {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -18px rgba(15,27,61,0.35);
}

.prose-mini p { margin-bottom: 0.5rem; }

/* scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #6d7dfb; }

/* theme */
.dark-theme {
  color-scheme: dark;
}

.dark-theme body.theme-aware-body {
  background: #0b1220;
  color: #d7deea;
}

.dark-theme .bg-slate-50 {
  background-color: #0b1220 !important;
}

.dark-theme .bg-white,
.dark-theme .bg-white\/90 {
  background-color: #111a2e !important;
}

.dark-theme .text-slate-800 { color: #e5ebf7 !important; }
.dark-theme .text-slate-700 { color: #d7deea !important; }
.dark-theme .text-slate-600 { color: #b7c2d8 !important; }
.dark-theme .text-slate-500,
.dark-theme .text-slate-400 { color: #94a3be !important; }

.dark-theme .border-slate-200,
.dark-theme .border-slate-100 {
  border-color: #24314d !important;
}

.dark-theme .hover\:bg-slate-100:hover,
.dark-theme .hover\:bg-slate-50:hover,
.dark-theme .bg-slate-100 {
  background-color: #1a2740 !important;
}

.dark-theme input,
.dark-theme select,
.dark-theme textarea {
  background-color: #0f172a;
  color: #e5ebf7;
  border-color: #24314d;
}

.dark-theme .visa-rule-card {
  background: linear-gradient(135deg, #111a2e 0%, #16233d 100%) !important;
  border-color: #2a3b5f !important;
}

/* 海外驾照列表/空状态：白底渐变在深色模式下被全局 .text-slate-* 反色后会出现「浅底亮字」不可读，强制与签证卡片一致的深色面 */
.dark-theme .driving-license-card {
  background: linear-gradient(135deg, #111a2e 0%, #16233d 100%) !important;
  border-color: #2a3b5f !important;
}
.dark-theme .driving-license-card:hover {
  border-color: #3b4a6a !important;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.5);
}

.dark-theme .pitfall-card {
  background: linear-gradient(135deg, #111a2e 0%, #16233d 100%) !important;
  border-color: #2a3b5f !important;
}
.dark-theme .pitfall-card:hover {
  border-color: #3b4a6a !important;
}

/* 手机端顶部展开菜单：避免 body 或 .dark-theme 全局字色与底分不清（浅字叠浅底） */
#mobile-menu.mobile-menu-panel {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.dark-theme #mobile-menu.mobile-menu-panel {
  background: #0b1220 !important;
  border-color: #223047 !important;
}
.dark-theme #mobile-menu .mobile-menu-hint {
  color: #94a3b8 !important;
}
.dark-theme #mobile-menu .mobile-menu-ctrl,
.dark-theme #mobile-menu button#theme-toggle-mobile {
  background: #111a2e !important;
  color: #e2e8f0 !important;
  border-color: #2a3b5f !important;
}
.dark-theme header .mobile-header-icon {
  color: #e2e8f0 !important;
}
/* 与全局 .dark-theme .text-slate-800 解耦，深底上保证可读 */
.dark-theme #mobile-menu a.mobile-menu-item {
  color: #e2e8f0 !important;
}
.dark-theme #mobile-menu a.mobile-menu-item:hover {
  color: #f8fafc !important;
  background: rgba(99, 102, 241, 0.12) !important;
}
.dark-theme #mobile-menu a.mobile-menu-item.bg-brand-600 {
  color: #fff !important;
  background: #1e3a8a !important;
}
.dark-theme #mobile-menu a.mobile-menu-item.bg-brand-100,
.dark-theme #mobile-menu a.mobile-menu-item.bg-brand-100.text-brand-800 {
  color: #c4d0ff !important;
  background: rgba(30, 58, 138, 0.35) !important;
}
.dark-theme #mobile-menu a.mobile-menu-item.bg-brand-100.text-white {
  color: #fff !important;
  background: #1e3a8a !important;
}

.dark-theme .visa-rule-card .bg-amber-50 {
  background-color: #2f2a1d !important;
  color: #f5d28a !important;
  border-color: #5a4b2f !important;
}

.dark-theme .visa-rule-card .bg-emerald-50 {
  background-color: #163427 !important;
  color: #9be4c0 !important;
}

@keyframes theme-icon-spin {
  0% { transform: rotate(-20deg) scale(0.92); opacity: 0.7; }
  100% { transform: rotate(0deg) scale(1); opacity: 1; }
}

.theme-icon-spin {
  animation: theme-icon-spin 220ms ease-out;
}
