/* ===== 樱花影视 完整设计系统 ===== */
/* 暗黑 + 亮色 双主题 | 毛玻璃效果 | 响应式布局 | 滚动动画 */

/* ===== CSS变量与主题 ===== */
:root {
  --bg: #f8f9fa;
  --bg-gradient: radial-gradient(ellipse at top, rgba(233, 69, 96, 0.05), transparent 50%),
                 radial-gradient(ellipse at bottom, rgba(15, 52, 96, 0.05), transparent 50%);
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-bg-solid: #ffffff;
  --text: #222;
  --heading: #1a1a2e;
  --accent: #e94560;
  --accent-2: #0f3460;
  --accent-hover: #d63350;
  --muted: #5a5a5a;
  --border: #e0e0e0;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius: 16px;
  --radius-sm: 12px;
  --transition: 0.3s ease;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.3);
  --navbar-bg: rgba(255, 255, 255, 0.8);
  --banner-overlay: linear-gradient(135deg, rgba(15, 52, 96, 0.9), rgba(233, 69, 96, 0.85));
  --scrollbar-track: #f0f0f0;
  --scrollbar-thumb: #c0c0c0;
}

[data-theme="dark"] {
  --bg: #121212;
  --bg-gradient: radial-gradient(ellipse at top, rgba(233, 69, 96, 0.08), transparent 50%),
                 radial-gradient(ellipse at bottom, rgba(77, 141, 245, 0.08), transparent 50%);
  --card-bg: rgba(30, 30, 30, 0.85);
  --card-bg-solid: #1e1e1e;
  --text: #eaeaea;
  --heading: #ffffff;
  --accent: #ff6b6b;
  --accent-2: #4d8df5;
  --accent-hover: #ff8585;
  --muted: #a0a0a0;
  --border: #333;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.6);
  --glass-bg: rgba(30, 30, 30, 0.5);
  --glass-border: rgba(255, 255, 255, 0.1);
  --navbar-bg: rgba(18, 18, 18, 0.8);
  --banner-overlay: linear-gradient(135deg, rgba(10, 30, 60, 0.95), rgba(120, 30, 50, 0.9));
  --scrollbar-track: #1a1a1a;
  --scrollbar-thumb: #444;
}

/* ===== 基础重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::selection {
  background: var(--accent);
  color: #fff;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  background-image: var(--bg-gradient);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 10px;
}

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

/* ===== 容器 ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

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

.logo svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(233, 69, 96, 0.3));
}

.nav-links {
  display: flex;
  gap: 28px;
  font-weight: 500;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
  position: relative;
  padding: 4px 0;
}

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

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: 40px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  padding: 6px 8px;
  color: var(--text);
  width: 140px;
  font-size: 0.9rem;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box svg {
  width: 18px;
  height: 18px;
  fill: var(--muted);
  flex-shrink: 0;
}

.theme-toggle {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s, transform 0.3s, border-color 0.3s;
}

.theme-toggle:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.3s;
}

.hamburger:hover {
  background: var(--bg);
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--text);
  border-radius: 4px;
  transition: all 0.3s;
}

/* ===== 移动菜单 ===== */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  padding: 16px 24px;
  gap: 12px;
  border-top: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.mobile-menu.open {
  display: flex;
  max-height: 500px;
  padding: 16px 24px 24px;
}

.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.3s, padding-left 0.3s;
}

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

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

/* ===== Banner ===== */
.banner {
  border-radius: var(--radius);
  margin: 24px 0;
  color: white;
  overflow: hidden;
  position: relative;
  background: var(--banner-overlay);
  box-shadow: var(--shadow);
  animation: fadeInUp 0.8s ease;
}

.banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
  animation: float 6s ease-in-out infinite;
}

.banner-content {
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.banner h2 {
  font-size: 2.4rem;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.8s ease 0.1s both;
}

.banner p {
  font-size: 1.2rem;
  max-width: 600px;
  opacity: 0.95;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.banner .btn {
  background: white;
  color: var(--accent-2);
  padding: 10px 24px;
  border-radius: 40px;
  font-weight: 600;
  width: fit-content;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  animation: fadeInUp 0.8s ease 0.3s both;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.banner .btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.banner-slider {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.banner-slider .slide {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.3s, transform 0.3s;
}

.banner-slider .slide:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* ===== 通用标题 ===== */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 48px 0 24px;
  color: var(--heading);
  position: relative;
  padding-bottom: 8px;
  animation: fadeInUp 0.6s ease both;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px;
  animation: expandWidth 0.8s ease 0.3s both;
}

/* ===== 卡片网格 ===== */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

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

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

.card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  border: 1px solid var(--glass-border);
  animation: fadeInUp 0.6s ease both;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--heading);
  transition: color 0.3s;
}

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

.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.card svg {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  fill: var(--accent);
  transition: transform 0.3s;
}

.card:hover svg {
  transform: scale(1.1);
}

/* ===== 文章列表 ===== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-item {
  display: flex;
  gap: 16px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  animation: fadeInUp 0.5s ease both;
}

.article-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.article-item .date {
  color: var(--accent);
  font-weight: 600;
  min-width: 70px;
  font-size: 0.9rem;
}

.article-item a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s;
}

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

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

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  padding: 8px 0;
  transition: color 0.3s;
  user-select: none;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-question span {
  transition: transform 0.3s;
  font-size: 1.2rem;
}

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

.faq-answer {
  margin-top: 12px;
  color: var(--muted);
  display: none;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  animation: fadeIn 0.3s ease;
}

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

/* ===== HowTo ===== */
.steps {
  counter-reset: step;
}

.step {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  align-items: flex-start;
  animation: fadeInUp 0.5s ease both;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(233, 69, 96, 0.3);
}

/* ===== 表格 ===== */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
}

.info-table td,
.info-table th {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
  transition: background 0.3s;
}

.info-table tr:hover td {
  background: var(--bg);
}

.info-table td:first-child {
  font-weight: 600;
  color: var(--heading);
  background: var(--bg);
  width: 120px;
}

/* ===== 页脚 ===== */
footer {
  background: var(--card-bg-solid);
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 32px 0;
  backdrop-filter: blur(10px);
}

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

.footer-grid h4 {
  margin-bottom: 16px;
  color: var(--heading);
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 8px;
}

.footer-grid h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.footer-grid a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.3s, padding-left 0.3s;
}

.footer-grid a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.copyright {
  text-align: center;
  color: var(--muted);
  padding-top: 32px;
  border-top: 1px solid var(--border);
  margin-top: 32px;
  font-size: 0.9rem;
}

/* ===== 工具类 ===== */
.text-muted {
  color: var(--muted);
}

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

.mt-4 {
  margin-top: 24px;
}

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

/* ===== 返回顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-size: 1.4rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
  z-index: 999;
}

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

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
}

/* ===== 动画 ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes expandWidth {
  from {
    width: 0;
  }
  to {
    width: 60px;
  }
}

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

/* ===== 滚动动画 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .banner h2 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu.open {
    display: flex;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .banner h2 {
    font-size: 1.8rem;
  }

  .search-box {
    display: none;
  }

  .banner-content {
    padding: 32px 24px;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .container {
    padding: 0 16px;
  }

  .article-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .article-item .date {
    min-width: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .banner h2 {
    font-size: 1.5rem;
  }

  .banner p {
    font-size: 1rem;
  }

  .banner-slider {
    gap: 8px;
  }

  .banner-slider .slide {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .logo {
    font-size: 1.5rem;
  }

  .logo svg {
    width: 26px;
    height: 26px;
  }

  .nav-inner {
    padding: 10px 16px;
  }
}

/* ===== 打印样式 ===== */
@media print {
  .navbar,
  .back-to-top,
  .theme-toggle,
  .hamburger,
  .search-box {
    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;
  }
}

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

/* ===== 卡片延迟动画 ===== */
.grid-4 .card:nth-child(1),
.grid-3 .card:nth-child(1),
.grid-2 .card:nth-child(1) {
  animation-delay: 0.1s;
}

.grid-4 .card:nth-child(2),
.grid-3 .card:nth-child(2),
.grid-2 .card:nth-child(2) {
  animation-delay: 0.2s;
}

.grid-4 .card:nth-child(3),
.grid-3 .card:nth-child(3),
.grid-2 .card:nth-child(3) {
  animation-delay: 0.3s;
}

.grid-4 .card:nth-child(4),
.grid-2 .card:nth-child(4) {
  animation-delay: 0.4s;
}

/* ===== 文章列表延迟 ===== */
.article-item:nth-child(1) { animation-delay: 0.05s; }
.article-item:nth-child(2) { animation-delay: 0.1s; }
.article-item:nth-child(3) { animation-delay: 0.15s; }
.article-item:nth-child(4) { animation-delay: 0.2s; }
.article-item:nth-child(5) { animation-delay: 0.25s; }
.article-item:nth-child(6) { animation-delay: 0.3s; }
.article-item:nth-child(7) { animation-delay: 0.35s; }
.article-item:nth-child(8) { animation-delay: 0.4s; }
.article-item:nth-child(9) { animation-delay: 0.45s; }
.article-item:nth-child(10) { animation-delay: 0.5s; }

/* ===== 步骤延迟 ===== */
.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }
.step:nth-child(4) { animation-delay: 0.4s; }
.step:nth-child(5) { animation-delay: 0.5s; }
.step:nth-child(6) { animation-delay: 0.6s; }

/* ===== FAQ 展开动画 ===== */
.faq-item {
  transition: background 0.3s;
}

.faq-item:hover {
  background: var(--bg);
}

/* ===== 移动端菜单动画 ===== */
.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}