:root {
  --primary: #e94560;
  --primary-dark: #c73550;
  --primary-light: #ff6b81;
  --secondary: #0f3460;
  --accent: #533483;
  --bg: #f8f9fc;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-border: rgba(255, 255, 255, 0.5);
  --text: #1a1a2e;
  --text-secondary: #4a4a5a;
  --text-muted: #8888a0;
  --border: #e4e6ef;
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow: 0 8px 30px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 20px 50px rgba(26, 26, 46, 0.15);
  --shadow-glow: 0 8px 30px rgba(233, 69, 96, 0.3);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 68px;
  --max-width: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d1a;
    --bg-alt: #14142a;
    --bg-card: #1a1a2e;
    --bg-glass: rgba(26, 26, 46, 0.78);
    --bg-glass-border: rgba(255, 255, 255, 0.08);
    --text: #f0f0f8;
    --text-secondary: #b0b0c8;
    --text-muted: #6a6a88;
    --border: #2a2a45;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 8px 30px rgba(233, 69, 96, 0.25);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  color: var(--text);
  font-weight: 700;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  margin-bottom: 0.75rem;
  color: var(--text);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

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

blockquote {
  position: relative;
  padding: 1.25rem 1.5rem 1.25rem 3rem;
  margin: 1.25rem 0;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-glass-border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

blockquote::before {
  content: "\201C";
  position: absolute;
  left: 0.85rem;
  top: 0.5rem;
  font-size: 3rem;
  line-height: 1;
  color: var(--primary);
  opacity: 0.35;
  font-family: Georgia, serif;
}

blockquote p {
  color: var(--text);
  font-style: italic;
  margin-bottom: 0;
}

figure {
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition), box-shadow var(--transition);
}

figure:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

figure svg {
  width: 100%;
  height: auto;
  display: block;
}

figcaption {
  padding: 0.85rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--bg-card);
  text-align: center;
  border-top: 1px solid var(--border);
}

header[role="banner"] {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--bg-glass-border);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition), box-shadow var(--transition);
}

header[role="banner"] nav {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

header[role="banner"] nav > a[aria-label="熊猫影院首页"] {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform var(--transition), filter var(--transition);
}

header[role="banner"] nav > a[aria-label="熊猫影院首页"]:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
}

header[role="banner"] nav > ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-left: auto;
}

header[role="banner"] nav > ul::-webkit-scrollbar {
  display: none;
}

header[role="banner"] nav > ul > li > a {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: color var(--transition), background-color var(--transition), transform var(--transition);
}

header[role="banner"] nav > ul > li > a:hover {
  color: var(--primary);
  background: rgba(233, 69, 96, 0.1);
  transform: translateY(-1px);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--header-height) + 2rem) 1.5rem 3rem;
}

main > section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

main > section:nth-child(1) { animation-delay: 0.05s; }
main > section:nth-child(2) { animation-delay: 0.1s; }
main > section:nth-child(3) { animation-delay: 0.15s; }
main > section:nth-child(4) { animation-delay: 0.2s; }
main > section:nth-child(5) { animation-delay: 0.25s; }
main > section:nth-child(6) { animation-delay: 0.3s; }
main > section:nth-child(7) { animation-delay: 0.35s; }
main > section:nth-child(8) { animation-delay: 0.4s; }
main > section:nth-child(9) { animation-delay: 0.45s; }
main > section:nth-child(10) { animation-delay: 0.5s; }
main > section:nth-child(11) { animation-delay: 0.55s; }
main > section:nth-child(12) { animation-delay: 0.6s; }
main > section:nth-child(13) { animation-delay: 0.65s; }
main > section:nth-child(14) { animation-delay: 0.7s; }
main > section:nth-child(15) { animation-delay: 0.75s; }

main > section:hover {
  box-shadow: var(--shadow-lg);
}

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

main > section:first-of-type {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 40%, #533483 100%);
  border: none;
  color: #fff;
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
}

main > section:first-of-type::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatGlow 8s ease-in-out infinite;
}

main > section:first-of-type::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(83, 52, 131, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatGlow 10s ease-in-out infinite reverse;
}

@keyframes floatGlow {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -30px) scale(1.1);
  }
}

main > section:first-of-type h1 {
  background: linear-gradient(135deg, #fff 0%, #ffd6de 50%, #e94560 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 1;
}

main > section:first-of-type p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  max-width: 820px;
  position: relative;
  z-index: 1;
}

main > section:first-of-type figure {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

main > section:first-of-type figure:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 30px 80px rgba(233, 69, 96, 0.4);
}

main > section:first-of-type figcaption {
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

nav[aria-label="面包屑导航"] {
  margin-bottom: 2rem;
  padding: 0.75rem 0;
}

nav[aria-label="面包屑导航"] ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
}

nav[aria-label="面包屑导航"] ol li {
  display: flex;
  align-items: center;
  color: var(--text-muted);
}

nav[aria-label="面包屑导航"] ol li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--border);
  font-weight: 300;
}

nav[aria-label="面包屑导航"] ol li a {
  color: var(--primary);
  font-weight: 500;
}

nav[aria-label="面包屑导航"] ol li a:hover {
  text-decoration: underline;
}

main > section article {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

main > section article:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

main > section article h3 {
  position: relative;
  padding-left: 1.25rem;
}

main > section article h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 6px;
  height: 1em;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

main > section article a[href="#articles"] {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.35rem 0;
  transition: gap var(--transition), color var(--transition);
}

main > section article a[href="#articles"]::after {
  content: "→";
  transition: transform var(--transition);
}

main > section article a[href="#articles"]:hover {
  gap: 0.6rem;
  color: var(--primary-light);
}

main > section article a[href="#articles"]:hover::after {
  transform: translateX(3px);
}

#cases blockquote {
  transition: transform var(--transition), box-shadow var(--transition);
}

#cases blockquote:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
}

#contact address {
  font-style: normal;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#contact address p {
  padding: 1rem 1.25rem;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  margin-bottom: 0;
}

#contact address p:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

#sitemap ul li a,
#links ul li a {
  display: block;
  padding: 0.7rem 1rem;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

#author-info {
  background: linear-gradient(135deg, var(--bg-glass), var(--bg-card));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-glass-border);
}

#author-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

footer[role="contentinfo"] {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
  color: rgba(255, 255, 255, 0.75);
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}

footer[role="contentinfo"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}

footer[role="contentinfo"] p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

footer[role="contentinfo"] nav[aria-label="页脚导航"] {
  margin-top: 1.25rem;
}

footer[role="contentinfo"] nav[aria-label="页脚导航"] ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}

footer[role="contentinfo"] nav[aria-label="页脚导航"] ul li a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
  transition: color var(--transition), transform var(--transition);
  display: inline-block;
}

footer[role="contentinfo"] nav[aria-label="页脚导航"] ul li a:hover {
  color: var(--primary-light);
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  header[role="banner"] nav {
    padding: 0 1rem;
    gap: 0.75rem;
  }

  header[role="banner"] nav > a[aria-label="熊猫影院首页"] {
    font-size: 1.15rem;
  }

  header[role="banner"] nav > ul > li > a {
    padding: 0.4rem 0.6rem;
    font-size: 0.82rem;
  }

  main {
    padding: calc(var(--header-height) + 1.25rem) 1rem 2rem;
  }

  main > section {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
  }

  main > section:first-of-type {
    padding: 2rem 1.25rem;
  }

  main > section:first-of-type p {
    font-size: 0.95rem;
  }

  h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  h2 {
    font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  }

  h3 {
    font-size: 1.05rem;
  }

  #contact address {
    grid-template-columns: 1fr;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

@media (max-width: 600px) {
  header[role="banner"] nav > ul {
    gap: 0.1rem;
  }

  header[role="banner"] nav > ul > li > a {
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
  }

  main > section {
    padding: 1.25rem 1rem;
  }

  main > section:first-of-type {
    padding: 1.5rem 1rem;
  }

  blockquote {
    padding: 1rem 1rem 1rem 2.5rem;
  }

  blockquote::before {
    font-size: 2.25rem;
    left: 0.6rem;
    top: 0.4rem;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  #sitemap ul li a,
  #links ul li a {
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
  }

  footer[role="contentinfo"] {
    padding: 2rem 1rem;
  }

  footer[role="contentinfo"] nav[aria-label="页脚导航"] ul {
    gap: 0.4rem 1rem;
  }
}

@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;
  }

  main > section {
    opacity: 1;
    transform: none;
  }
}

@media print {
  header[role="banner"],
  footer[role="contentinfo"],
  nav[aria-label="面包屑导航"] {
    display: none;
  }

  main {
    padding: 0;
  }

  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
    opacity: 1;
    transform: none;
  }

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