/* ===== 芒果传媒 品牌主视觉核心样式 ===== */
:root {
  --mango-primary: #ff7a1a;
  --mango-secondary: #ffb347;
  --mango-accent: #ffd700;
  --mango-deep: #e85d04;
  --mango-gradient: linear-gradient(135deg, #ff7a1a 0%, #ffb347 50%, #ffd700 100%);
  --mango-soft: linear-gradient(145deg, #fff7ed, #ffedd5);
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text-main: #1e293b;
  --text-secondary: #475569;
  --text-heading: #0f172a;
  --text-link: #d97706;
  --border-color: #e2e8f0;
  --card-bg: rgba(255,255,255,0.85);
  --card-bg-solid: #ffffff;
  --footer-bg: #1a120b;
  --footer-text: #fef3c7;
  --btn-bg: linear-gradient(135deg, #ff7a1a, #ffb347);
  --btn-text: #ffffff;
  --nav-bg: rgba(255,247,237,0.85);
  --shadow: 0 8px 32px rgba(255,122,26,0.12);
  --shadow-hover: 0 16px 48px rgba(255,122,26,0.2);
  --glass: blur(16px) saturate(180%);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

body.dark {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --text-main: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-heading: #f8fafc;
  --text-link: #fbbf24;
  --border-color: #334155;
  --card-bg: rgba(30,41,59,0.8);
  --card-bg-solid: #1e293b;
  --footer-bg: #020617;
  --footer-text: #fef3c7;
  --nav-bg: rgba(15,23,42,0.85);
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-hover: 0 16px 48px rgba(0,0,0,0.6);
  --mango-soft: linear-gradient(145deg, #1e293b, #0f172a);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.75;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255,122,26,0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,179,71,0.03) 0%, transparent 40%);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* ===== 标题层级 ===== */
h1, h2, h3, h4 {
  color: var(--text-heading);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 1.5rem 0;
  background: linear-gradient(135deg, var(--mango-deep), var(--mango-primary), var(--mango-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeSlideDown 0.8s ease-out;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 2.5rem 0 1.2rem;
  position: relative;
  padding-left: 20px;
  border-left: 5px solid var(--mango-primary);
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, rgba(255,122,26,0.08), transparent);
  padding-top: 4px;
  padding-bottom: 4px;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  margin: 1.5rem 0 0.8rem;
  color: var(--mango-primary);
}

h4 {
  font-size: 1.1rem;
  margin: 1rem 0 0.5rem;
}

p {
  margin-bottom: 1.2rem;
  color: var(--text-main);
  line-height: 1.8;
}

a {
  color: var(--text-link);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

a:hover {
  color: var(--mango-deep);
  text-decoration: none;
}

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

a:hover::after {
  width: 100%;
}

/* ===== 导航栏 ===== */
.navbar {
  background: var(--nav-bg);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,122,26,0.1);
  box-shadow: 0 4px 30px rgba(255,122,26,0.08);
  transition: all 0.3s ease;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 900;
  background: var(--mango-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  position: relative;
  cursor: pointer;
}

.logo::before {
  content: "🥭";
  font-size: 1.4rem;
  margin-right: 6px;
  display: inline-block;
  animation: bounce 2s infinite;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  align-items: center;
  font-weight: 500;
}

.nav-links a {
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 4px;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--mango-primary);
}

.nav-links a::after {
  height: 3px;
  background: var(--mango-gradient);
  border-radius: 3px;
}

.btn-theme {
  background: var(--mango-gradient);
  color: var(--btn-text);
  border: none;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255,122,26,0.3);
}

.btn-theme:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255,122,26,0.4);
  opacity: 1;
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--text-heading);
  cursor: pointer;
  line-height: 1;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  background: var(--mango-gradient);
  color: var(--btn-text);
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,122,26,0.25);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255,122,26,0.4);
}

.btn:hover::before {
  left: 100%;
}

/* ===== 卡片系统 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin: 32px 0;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,122,26,0.12);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

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

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255,122,26,0.3);
}

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

.card h3, .card h4 {
  margin-top: 0;
  color: var(--text-heading);
  position: relative;
  z-index: 1;
}

.card p {
  position: relative;
  z-index: 1;
}

.card a {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  color: var(--mango-primary);
}

/* ===== 表格 ===== */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card-bg-solid);
}

th, td {
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  text-align: left;
  color: var(--text-main);
  transition: background 0.2s ease;
}

th {
  background: var(--mango-gradient);
  color: white;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

tr:hover td {
  background: rgba(255,122,26,0.05);
}

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  transition: all 0.3s ease;
}

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

.faq-question {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  background: linear-gradient(90deg, rgba(255,122,26,0.05), transparent);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--mango-primary);
  transition: transform 0.3s ease;
  font-weight: 300;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-question:hover {
  background: linear-gradient(90deg, rgba(255,122,26,0.1), transparent);
  padding-left: 20px;
}

.faq-answer {
  margin-top: 12px;
  color: var(--text-main);
  padding: 0 16px;
  line-height: 1.8;
  display: none;
  animation: fadeSlideUp 0.4s ease;
}

/* ===== 页脚 ===== */
.site-footer {
  background: linear-gradient(180deg, var(--footer-bg), #0a0603);
  color: var(--footer-text);
  padding: 60px 0 24px;
  margin-top: 60px;
  position: relative;
  overflow: hidden;
}

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

.footer-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.site-footer h4 {
  color: var(--mango-secondary);
  margin-bottom: 16px;
  font-size: 1.2rem;
  position: relative;
}

.site-footer h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 3px;
  background: var(--mango-gradient);
  margin-top: 8px;
  border-radius: 3px;
}

.site-footer a {
  color: var(--footer-text);
  transition: all 0.3s ease;
  font-weight: 400;
}

.site-footer a:hover {
  color: var(--mango-secondary);
  text-decoration: none;
  padding-left: 4px;
}

.site-footer a::after {
  display: none;
}

.footer-copy {
  border-top: 1px solid rgba(255,179,71,0.2);
  padding-top: 24px;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(254,243,199,0.7);
}

/* ===== 搜索框 ===== */
.search-box {
  display: flex;
  gap: 12px;
  margin: 32px 0;
  max-width: 600px;
  position: relative;
}

.search-box input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  font-size: 1rem;
  background: var(--card-bg-solid);
  color: var(--text-main);
  transition: all 0.3s ease;
  outline: none;
}

.search-box input:focus {
  border-color: var(--mango-primary);
  box-shadow: 0 0 0 4px rgba(255,122,26,0.1);
}

.search-box button {
  background: var(--mango-gradient);
  color: white;
  border: none;
  padding: 0 32px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255,122,26,0.3);
}

.search-box button:hover {
  transform: translateX(3px);
  box-shadow: 0 6px 20px rgba(255,122,26,0.4);
}

/* ===== 返回顶部 ===== */
.to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--mango-gradient);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  border: none;
  font-size: 1.4rem;
  box-shadow: 0 8px 25px rgba(255,122,26,0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
}

.to-top.show {
  opacity: 1;
  visibility: visible;
}

.to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 12px 35px rgba(255,122,26,0.5);
}

/* ===== 数据统计 ===== */
.stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin: 32px 0;
  padding: 24px;
  background: var(--mango-soft);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,122,26,0.1);
}

.stat-item {
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--mango-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.stat-item::after {
  content: attr(data-label);
  display: block;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ===== 滚动动画 ===== */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 首屏区域 ===== */
#home > section:first-child {
  padding: 60px 0 40px;
  position: relative;
  overflow: hidden;
}

#home > section:first-child::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,122,26,0.1), transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

#home > section:first-child h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

#home > section:first-child p {
  font-size: 1.2rem;
  max-width: 700px;
  color: var(--text-secondary);
}

/* ===== 文章卡片 ===== */
#articles .card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#articles .card p:first-of-type {
  color: var(--mango-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

#articles .card p:last-of-type {
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== 联系信息 ===== */
#contact p {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

#contact p::before {
  content: '▸';
  color: var(--mango-primary);
  font-weight: 700;
}

#contact p:last-child {
  border-bottom: none;
}

/* ===== 友情链接区域 ===== */
section:last-of-type {
  background: var(--mango-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 32px 0;
}

section:last-of-type p {
  margin-bottom: 8px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .menu-toggle {
    display: block;
    z-index: 1001;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: var(--glass);
    padding: 20px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-bottom: 1px solid rgba(255,122,26,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  }

  .nav-links.open {
    display: flex;
    animation: fadeSlideDown 0.3s ease;
  }

  .nav-links a {
    padding: 10px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,122,26,0.05);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .btn-theme {
    margin-top: 8px;
    width: 100%;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stats {
    gap: 20px;
    padding: 16px;
  }

  .stat-item {
    font-size: 1.8rem;
  }

  .to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  table {
    font-size: 0.9rem;
  }

  th, td {
    padding: 12px;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    padding: 14px;
    width: 100%;
  }

  .footer-row {
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.3rem;
  }

  .logo::before {
    font-size: 1.1rem;
  }

  #home > section:first-child {
    padding: 40px 0 30px;
  }

  #home > section:first-child p {
    font-size: 1rem;
  }

  .card {
    padding: 20px;
  }

  .faq-question {
    font-size: 1rem;
    padding: 10px 12px;
  }

  .faq-answer {
    padding: 0 12px;
  }
}

/* ===== 动画 ===== */
@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

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

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--mango-primary), var(--mango-secondary));
  border-radius: 10px;
  border: 2px solid var(--bg-alt);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--mango-deep), var(--mango-primary));
}

/* ===== 选择文本 ===== */
::selection {
  background: rgba(255,122,26,0.2);
  color: var(--text-heading);
}

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

/* ===== 打印优化 ===== */
@media print {
  .navbar,
  .to-top,
  .search-box,
  .btn-theme,
  .menu-toggle {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ===== 减少动画偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}