:root {
  --primary: #e94560;
  --primary-dark: #c73652;
  --primary-light: #ff6b81;
  --secondary: #0f3460;
  --accent: #533483;
  --bg-dark: #1a1a2e;
  --bg-dark-2: #16213e;
  --bg-dark-3: #0f0f1a;
  --text-light: #eaeaea;
  --text-muted: #a0a0b0;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --card-radius: 16px;
  --card-radius-sm: 12px;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-dark: #f5f5f7;
    --bg-dark-2: #ffffff;
    --bg-dark-3: #eaeaea;
    --text-light: #1a1a2e;
    --text-muted: #6b6b80;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  }
}

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

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

body {
  font-family: var(--font-stack);
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(233, 69, 96, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(83, 52, 131, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

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

ul,
ol {
  list-style: none;
}

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

/* ========== HEADER & NAV ========== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition), box-shadow var(--transition);
}

@media (prefers-color-scheme: light) {
  header {
    background: rgba(255, 255, 255, 0.82);
  }
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

header nav > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 0;
}

header nav > div a {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  transition: transform var(--transition);
}

header nav > div a:hover {
  transform: scale(1.04);
}

header nav > div span {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 0;
}

header nav ul li a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all var(--transition);
  white-space: nowrap;
}

header nav ul li a:hover {
  color: var(--text-light);
  background: var(--glass-bg);
  transform: translateY(-1px);
}

/* ========== MAIN LAYOUT ========== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

section {
  margin-bottom: 48px;
  animation: fadeInUp 0.6s ease both;
}

section:nth-child(2) { animation-delay: 0.05s; }
section:nth-child(3) { animation-delay: 0.1s; }
section:nth-child(4) { animation-delay: 0.15s; }
section:nth-child(5) { animation-delay: 0.2s; }
section:nth-child(6) { animation-delay: 0.25s; }
section:nth-child(7) { animation-delay: 0.3s; }
section:nth-child(8) { animation-delay: 0.35s; }
section:nth-child(9) { animation-delay: 0.4s; }
section:nth-child(10) { animation-delay: 0.45s; }

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

/* ========== HERO ========== */
#hero {
  position: relative;
  padding: 48px 0 32px;
  text-align: center;
}

#hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  animation: gradientShift 6s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

#hero > p {
  max-width: 780px;
  margin: 0 auto 14px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.85;
}

#hero > p:last-of-type {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

#hero > div[aria-label="短剧推荐轮播图"] {
  margin-top: 28px;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

#hero > div[aria-label="短剧推荐轮播图"]:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(233, 69, 96, 0.2);
}

#hero > div[aria-label="短剧推荐轮播图"] svg {
  width: 100%;
  display: block;
  border-radius: var(--card-radius);
}

/* ========== BREADCRUMB ========== */
nav[aria-label="面包屑"] {
  margin-bottom: 32px;
}

nav[aria-label="面包屑"] ol {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 10px 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius-sm);
}

nav[aria-label="面包屑"] ol li:not(:last-child)::after {
  content: "›";
  margin-left: 8px;
  color: var(--text-muted);
  opacity: 0.5;
}

nav[aria-label="面包屑"] ol li a {
  color: var(--text-muted);
  font-size: 0.82rem;
}

nav[aria-label="面包屑"] ol li a:hover {
  color: var(--primary);
}

/* ========== SECTION HEADINGS ========== */
section > h2 {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 700;
  margin-bottom: 24px;
  padding-left: 16px;
  position: relative;
  color: var(--text-light);
  letter-spacing: -0.3px;
}

section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

section > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.8;
}

/* ========== CARDS (articles) ========== */
article {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: 24px 28px;
  margin-bottom: 18px;
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

article:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(233, 69, 96, 0.12);
  border-color: rgba(233, 69, 96, 0.25);
}

article:hover::before {
  opacity: 1;
}

article h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-light);
  line-height: 1.4;
}

article p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 8px;
}

article p:last-child {
  margin-bottom: 0;
}

article ul,
article ol {
  padding-left: 0;
  margin-top: 8px;
}

article ul li,
article ol li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.75;
}

article ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 0.8rem;
  top: 1px;
}

article ol {
  counter-reset: item;
}

article ol li {
  counter-increment: item;
  padding-left: 32px;
}

article ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

article strong {
  color: var(--text-light);
  font-weight: 600;
}

article a {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

article a:hover {
  color: var(--primary-light);
  border-bottom-color: var(--primary-light);
  transform: translateX(4px);
}

/* ========== PRODUCTS LIST ========== */
#products article ul li {
  padding: 10px 12px 10px 22px;
  background: rgba(233, 69, 96, 0.04);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: background var(--transition), transform var(--transition);
}

#products article ul li:hover {
  background: rgba(233, 69, 96, 0.1);
  transform: translateX(4px);
}

/* ========== FAQ (details) ========== */
#faq details {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#faq details:hover {
  border-color: rgba(233, 69, 96, 0.3);
  box-shadow: 0 6px 24px rgba(233, 69, 96, 0.08);
}

#faq details[open] {
  border-color: rgba(233, 69, 96, 0.35);
  box-shadow: 0 8px 32px rgba(233, 69, 96, 0.12);
}

#faq summary {
  padding: 16px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-light);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color var(--transition), background var(--transition);
  user-select: none;
  -webkit-user-select: none;
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  transition: transform var(--transition), background var(--transition);
}

#faq details[open] summary::before {
  content: "−";
  transform: rotate(180deg);
  background: linear-gradient(135deg, var(--accent), var(--primary));
}

#faq summary:hover {
  background: rgba(233, 69, 96, 0.06);
}

#faq details p {
  padding: 0 20px 18px 52px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.85;
  animation: fadeInUp 0.3s ease both;
}

/* ========== HOWTO ========== */
#howto article h3 {
  color: var(--primary);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

#howto article ol li {
  margin-bottom: 12px;
}

/* ========== CONTACT ========== */
#contact address {
  font-style: normal;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: 24px 28px;
  margin-bottom: 18px;
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

#contact address:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(233, 69, 96, 0.1);
}

#contact address p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.8;
}

#contact address p:last-child {
  margin-bottom: 0;
}

#contact address strong {
  color: var(--text-light);
  font-weight: 600;
}

/* ========== FOOTER INFO ========== */
#footer-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

#footer-info > h2 {
  grid-column: 1 / -1;
}

#footer-info nav {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: 22px 24px;
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

#footer-info nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(233, 69, 96, 0.1);
}

#footer-info nav h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--primary);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--glass-border);
}

#footer-info nav ul li {
  margin-bottom: 8px;
}

#footer-info nav ul li a {
  font-size: 0.84rem;
  color: var(--text-muted);
  display: inline-block;
  padding: 3px 0;
  transition: all var(--transition);
}

#footer-info nav ul li a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

#footer-info article {
  grid-column: span 1;
}

#footer-info article:last-child {
  grid-column: 1 / -1;
}

/* ========== FOOTER ========== */
footer {
  background: linear-gradient(180deg, transparent, rgba(233, 69, 96, 0.04));
  border-top: 1px solid var(--glass-border);
  padding: 32px 20px;
  text-align: center;
  margin-top: 20px;
}

footer p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.7;
}

footer p:first-child {
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.88rem;
}

footer a {
  color: var(--primary);
  font-weight: 600;
  display: inline-block;
  padding: 6px 16px;
  margin-top: 8px;
  border: 1px solid var(--primary);
  border-radius: 20px;
  font-size: 0.82rem;
  transition: all var(--transition);
}

footer a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.35);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

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

/* ========== SELECTION ========== */
::selection {
  background: rgba(233, 69, 96, 0.3);
  color: var(--text-light);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  #footer-info {
    grid-template-columns: 1fr;
  }

  #footer-info article {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  header nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 16px;
  }

  header nav > div {
    padding: 12px 0 4px;
    width: 100%;
  }

  header nav > div a {
    font-size: 1.15rem;
  }

  header nav ul {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 4px 0 10px;
    gap: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  header nav ul::-webkit-scrollbar {
    display: none;
  }

  header nav ul li a {
    font-size: 0.78rem;
    padding: 5px 10px;
  }

  main {
    padding: 0 14px 40px;
  }

  section {
    margin-bottom: 32px;
  }

  article {
    padding: 18px 16px;
    border-radius: var(--card-radius-sm);
  }

  article h3 {
    font-size: 0.95rem;
  }

  article p,
  article ul li,
  article ol li {
    font-size: 0.82rem;
  }

  #hero {
    padding: 28px 0 20px;
  }

  #hero h1 {
    font-size: 1.35rem;
    margin-bottom: 14px;
  }

  #hero > p {
    font-size: 0.85rem;
  }

  #contact address {
    padding: 18px 16px;
  }

  #faq summary {
    padding: 13px 14px;
    font-size: 0.84rem;
  }

  #faq details p {
    padding: 0 14px 14px 44px;
    font-size: 0.8rem;
  }

  #footer-info nav {
    padding: 16px;
  }

  footer {
    padding: 24px 14px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  header nav > div span {
    display: none;
  }

  #hero h1 {
    font-size: 1.2rem;
  }

  section > h2 {
    font-size: 1.1rem;
    padding-left: 12px;
  }

  article {
    padding: 14px 12px;
  }
}

/* ========== REDUCED MOTION ========== */
@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;
  }
}

/* ========== PRINT ========== */
@media print {
  header,
  footer a,
  nav[aria-label="面包屑"] {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  article {
    border: 1px solid #ddd;
    box-shadow: none;
    backdrop-filter: none;
  }
}