/* ===== 橙子动漫 全局样式 ===== */
:root {
  --bg: #f5f7fa;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-solid: #ffffff;
  --surface-2: #eef1f6;
  --text-primary: #1f2937;
  --text-secondary: #2c3e50;
  --text-muted: #4b5563;
  --brand: #0f2a43;
  --brand-dark: #0b2236;
  --accent: #d97706;
  --accent-light: #f59e0b;
  --border: rgba(209, 213, 219, 0.6);
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.1);
  --text-on-dark: #f1f5f9;
  --text-on-brand: #ffffff;
  --glass-blur: blur(12px);
  --gradient-banner: linear-gradient(135deg, #0f2a43 0%, #1a4a6e 40%, #2d6a8f 70%, #d97706 130%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.6) 100%);
  --gradient-accent: linear-gradient(135deg, #d97706, #f59e0b);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

[data-theme="dark"] {
  --bg: #0d1520;
  --surface: rgba(31, 41, 55, 0.85);
  --surface-solid: #1f2937;
  --surface-2: #273549;
  --text-primary: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #cbd5e1;
  --brand: #0f2a43;
  --brand-dark: #0a1f33;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --border: rgba(55, 65, 81, 0.8);
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.5);
  --text-on-dark: #f1f5f9;
  --text-on-brand: #ffffff;
  --gradient-banner: linear-gradient(135deg, #0a1f33 0%, #0f2a43 40%, #1a4a6e 70%, #d97706 130%);
  --gradient-card: linear-gradient(145deg, rgba(31,41,55,0.9) 0%, rgba(31,41,55,0.6) 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(ellipse at 20% 50%, rgba(15, 42, 67, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(217, 119, 6, 0.03) 0%, transparent 50%);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* 文字可读性强化 */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.2px;
}

p {
  color: var(--text-secondary);
  font-weight: 400;
}

a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, opacity 0.2s ease;
}

[data-theme="dark"] a { color: #60a5fa; }

a:hover {
  color: var(--accent);
  opacity: 0.9;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ===== 导航栏 ===== */
.navbar {
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  transition: background 0.3s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.5px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.02);
}

[data-theme="dark"] .logo { color: #fff; }

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s, transform 0.2s;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-toggle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 40px;
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-toggle:hover {
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15);
}

.btn-toggle:active {
  transform: scale(0.95);
}

.menu-icon {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.2s;
  padding: 4px 8px;
  border-radius: 8px;
}

.menu-icon:hover {
  transform: scale(1.1);
  background: var(--surface-2);
}

.mobile-menu {
  display: none;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
  transition: color 0.2s, padding-left 0.2s;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover {
  color: var(--accent);
  padding-left: 8px;
}

/* ===== Hero 首屏 ===== */
.hero {
  background: var(--gradient-banner);
  color: var(--text-on-dark);
  padding: 56px 0 72px;
  border-radius: 0 0 48px 48px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  max-width: 800px;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero p {
  color: #e2e8f0;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  max-width: 700px;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero .btn-primary {
  background: var(--gradient-accent);
  color: #0a0a0a;
  padding: 14px 32px;
  border-radius: 60px;
  font-weight: 700;
  display: inline-block;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero .btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(217, 119, 6, 0.4);
}

.hero .btn-primary:active {
  transform: translateY(-1px) scale(0.98);
}

/* ===== 卡片通用 ===== */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 40px 0 24px;
  border-left: 6px solid var(--accent);
  padding-left: 16px;
  position: relative;
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.card {
  background: var(--gradient-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(217, 119, 6, 0.3);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.card:hover h3 {
  color: var(--accent);
}

.card p {
  font-size: 0.95rem;
  margin-bottom: 8px;
  line-height: 1.7;
}

.card a {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  transition: all 0.2s;
}

.card a:hover {
  transform: translateX(4px);
}

/* ===== 文章列表 ===== */
.article-list {
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.article-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.article-item:last-child {
  border-bottom: none;
}

.article-item:hover {
  padding-left: 12px;
  background: rgba(217, 119, 6, 0.05);
  border-radius: 8px;
}

.article-item h4 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  transition: color 0.2s;
}

.article-item:hover h4 {
  color: var(--accent);
}

.article-item p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.article-item .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
  align-self: center;
}

@media (max-width: 600px) {
  .article-item {
    flex-direction: column;
    gap: 8px;
  }
  
  .article-item .meta {
    font-size: 0.85rem;
  }
}

/* ===== FAQ ===== */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

@media (max-width: 600px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

.faq-item {
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.faq-item:hover {
  border-color: rgba(217, 119, 6, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.faq-question {
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
}

.faq-question span {
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-question span {
  transform: rotate(180deg);
}

.faq-answer {
  margin-top: 12px;
  color: var(--text-secondary);
  display: none;
  line-height: 1.7;
  font-size: 0.95rem;
  animation: fadeInUp 0.3s ease;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ===== 表格 ===== */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  padding: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-primary);
  min-width: 600px;
}

th {
  background: var(--surface-2);
  padding: 14px 12px;
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  transition: background 0.2s;
}

tr:hover td {
  background: rgba(217, 119, 6, 0.03);
}

tr:last-child td {
  border-bottom: none;
}

/* ===== Footer ===== */
.footer {
  background: var(--brand-dark);
  color: var(--text-on-dark);
  padding: 48px 0 24px;
  margin-top: 60px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
}

.footer a, .footer p {
  color: #cbd5e1;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--accent-light);
}

.footer h4 {
  color: #fff !important;
  margin-bottom: 12px;
}

.footer .copyright {
  border-top: 1px solid #2d4a66;
  padding-top: 20px;
  margin-top: 20px;
  text-align: center;
}

.footer .copyright p {
  font-size: 0.9rem;
}

/* ===== 数字动画 ===== */
.stat-number {
  font-weight: 800;
  font-size: 2rem;
  color: var(--accent);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== 滚动动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 通用工具类 ===== */
.bg-surface {
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 28px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.mt-8 {
  margin-top: 32px;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  padding: 8px 20px;
  border-radius: 40px;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}

/* 返回顶部按钮 */
#backTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--gradient-accent);
  color: #000;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
  display: none;
  z-index: 999;
  transition: all 0.3s ease;
  animation: fadeIn 0.3s ease;
}

#backTop:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(217, 119, 6, 0.5);
}

#backTop:active {
  transform: translateY(-1px) scale(0.95);
}

/* ===== 响应式优化 ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  .nav-links {
    display: none;
  }
  
  .menu-icon {
    display: block;
  }
  
  .mobile-menu {
    display: block;
  }
  
  .hero {
    padding: 40px 0 56px;
    border-radius: 0 0 32px 32px;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .section-title {
    font-size: 1.4rem;
    margin: 32px 0 20px;
  }
  
  .grid-4 {
    gap: 12px;
  }
  
  .card {
    padding: 18px;
    border-radius: 16px;
  }
  
  .bg-surface {
    border-radius: 20px;
    padding: 16px;
  }
  
  #backTop {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.3rem;
  }
  
  .btn-toggle {
    padding: 6px 10px;
    font-size: 0.9rem;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .hero .btn-primary {
    padding: 10px 24px;
    font-size: 0.95rem;
  }
  
  .card h3 {
    font-size: 1.1rem;
  }
  
  .faq-item {
    padding: 14px;
  }
  
  .article-list {
    padding: 16px;
  }
}

/* 打印样式优化 */
@media print {
  .navbar, .footer, #backTop, .mobile-menu, .btn-toggle {
    display: none !important;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  .hero {
    background: #fff;
    color: #000;
    border-radius: 0;
  }
  
  .hero h1, .hero p {
    color: #000;
  }
}

/* 无障碍优化 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--brand), var(--accent));
  border-radius: 5px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* 焦点可见性 */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 选中文本颜色 */
::selection {
  background: var(--accent);
  color: #fff;
}

/* 文字链接下划线动画 */
.text-link {
  position: relative;
  display: inline-block;
}

.text-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.text-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* 卡片图片样式 */
.card-img {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}

.card-img img {
  transition: transform 0.3s ease;
}

.card:hover .card-img img {
  transform: scale(1.05);
}

/* 标签样式 */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(217, 119, 6, 0.1);
  color: var(--accent);
  border: 1px solid rgba(217, 119, 6, 0.2);
  transition: all 0.2s;
}

.tag:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}

/* 加载动画 */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 骨架屏加载效果 */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* 成功/错误提示 */
.notification {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 12px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-hover);
  border-left: 4px solid var(--accent);
  z-index: 9999;
  animation: slideInRight 0.3s ease;
  max-width: 350px;
}

.notification.success {
  border-left-color: #10b981;
}

.notification.error {
  border-left-color: #ef4444;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 动画工具类 */
.animate-float {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-pulse-slow {
  animation: pulseSlow 2s ease-in-out infinite;
}

@keyframes pulseSlow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* 渐变边框卡片 */
.gradient-border {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box,
              var(--gradient-accent) border-box;
}

/* 毛玻璃效果增强 */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .glass {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}