:root {
  --brand-primary: #c0392b;
  --brand-secondary: #e74c3c;
  --brand-accent: #ff6b5b;
  --brand-gradient: linear-gradient(135deg, #c0392b 0%, #e74c3c 45%, #ff8a65 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(192, 57, 43, 0.12) 0%, rgba(255, 138, 101, 0.12) 100%);
  --bg-body: #f7f5f3;
  --bg-surface: #ffffff;
  --bg-surface-alt: #fdfbfa;
  --bg-elevated: rgba(255, 255, 255, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --bg-glass-strong: rgba(255, 255, 255, 0.78);
  --text-primary: #1c1a19;
  --text-secondary: #4a4544;
  --text-muted: #7d7674;
  --text-inverse: #ffffff;
  --border-color: rgba(28, 26, 25, 0.09);
  --border-strong: rgba(28, 26, 25, 0.16);
  --shadow-sm: 0 2px 8px rgba(28, 26, 25, 0.06);
  --shadow-md: 0 8px 24px rgba(28, 26, 25, 0.09);
  --shadow-lg: 0 18px 48px rgba(28, 26, 25, 0.13);
  --shadow-brand: 0 12px 32px rgba(192, 57, 43, 0.24);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
  --max-width: 1180px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 88px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-primary: #ff6b5b;
    --brand-secondary: #ff8a65;
    --brand-accent: #ffab91;
    --brand-gradient: linear-gradient(135deg, #b83227 0%, #e74c3c 50%, #ff8a65 100%);
    --brand-gradient-soft: linear-gradient(135deg, rgba(255, 107, 91, 0.16) 0%, rgba(255, 138, 101, 0.08) 100%);
    --bg-body: #121010;
    --bg-surface: #1c1918;
    --bg-surface-alt: #221e1d;
    --bg-elevated: rgba(34, 30, 29, 0.78);
    --bg-glass: rgba(28, 25, 24, 0.55);
    --bg-glass-strong: rgba(28, 25, 24, 0.82);
    --text-primary: #f5f2f0;
    --text-secondary: #c9c2bf;
    --text-muted: #948c89;
    --text-inverse: #1c1a19;
    --border-color: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
    --shadow-brand: 0 12px 32px rgba(255, 107, 91, 0.3);
  }
}

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

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-primary);
  background-color: var(--bg-body);
  background-image:
    radial-gradient(ellipse 90% 60% at 12% -8%, rgba(192, 57, 43, 0.09) 0%, transparent 62%),
    radial-gradient(ellipse 80% 55% at 92% 4%, rgba(255, 138, 101, 0.1) 0%, transparent 58%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(192, 57, 43, 0.05) 0%, transparent 65%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@media (prefers-color-scheme: dark) {
  body {
    background-image:
      radial-gradient(ellipse 90% 60% at 12% -8%, rgba(255, 107, 91, 0.12) 0%, transparent 62%),
      radial-gradient(ellipse 80% 55% at 92% 4%, rgba(255, 138, 101, 0.08) 0%, transparent 58%),
      radial-gradient(ellipse 70% 50% at 50% 100%, rgba(255, 107, 91, 0.06) 0%, transparent 65%);
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(192, 57, 43, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 57, 43, 0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 0%, transparent 78%);
}

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

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.25s var(--ease-out), opacity 0.25s var(--ease-out);
}

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

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

ul,
ol {
  padding-left: 1.35em;
  margin: 0 0 var(--space-md);
}

li {
  margin-bottom: 0.5em;
}

li::marker {
  color: var(--brand-primary);
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-md);
}

strong {
  color: var(--text-primary);
  font-weight: 700;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--space-md);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(1.75rem, 4.6vw, 3rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  letter-spacing: -0.025em;
  position: relative;
  padding-bottom: var(--space-sm);
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--brand-gradient);
  box-shadow: var(--shadow-brand);
}

h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: var(--space-lg) 0;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: var(--space-sm) 0 var(--space-md);
}

th,
td {
  padding: 0.85em 1.1em;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

thead th {
  background: var(--brand-gradient-soft);
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

tbody tr {
  transition: background-color 0.25s var(--ease-out);
}

tbody tr:hover {
  background-color: var(--bg-surface-alt);
}

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

blockquote {
  margin: var(--space-md) 0;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius-sm) var(--radius-md) var(--radius-md) var(--radius-sm);
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
  font-style: normal;
  position: relative;
}

blockquote p {
  margin: 0;
  font-size: 0.98rem;
}

blockquote p::before {
  content: "“";
  font-size: 2.4em;
  line-height: 0;
  color: var(--brand-primary);
  opacity: 0.35;
  margin-right: 4px;
  vertical-align: -0.35em;
  font-family: Georgia, serif;
}

time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

address {
  font-style: normal;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-sm);
  transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-lg);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
}

header nav > a[aria-label="苹果短剧首页"] {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  padding: 0.35em 0.9em 0.35em 0.75em;
  border-radius: var(--radius-pill);
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  transition: transform 0.35s var(--ease-spring), filter 0.35s var(--ease-out);
  white-space: nowrap;
}

header nav > a[aria-label="苹果短剧首页"]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: var(--brand-gradient-soft);
  z-index: -1;
  opacity: 0.9;
  transition: opacity 0.3s var(--ease-out), transform 0.35s var(--ease-spring);
}

header nav > a[aria-label="苹果短剧首页"]:hover {
  transform: translateY(-2px) scale(1.03);
  filter: drop-shadow(0 6px 14px rgba(192, 57, 43, 0.28));
}

header nav > a[aria-label="苹果短剧首页"]:hover::before {
  opacity: 1;
  transform: scale(1.05);
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
}

header nav ul li {
  margin: 0;
}

header nav ul li a {
  display: inline-block;
  padding: 0.42em 0.85em;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  position: relative;
  transition: color 0.25s var(--ease-out), background-color 0.25s var(--ease-out), transform 0.25s var(--ease-spring);
  white-space: nowrap;
}

header nav ul li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--brand-gradient);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease-out);
}

header nav ul li a:hover {
  color: var(--brand-primary);
  background-color: var(--brand-gradient-soft);
  transform: translateY(-1px);
}

header nav ul li a:hover::after {
  width: 42%;
}

header nav form[role="search"] {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: auto;
  position: relative;
}

header nav form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

header nav form[role="search"] input[type="search"] {
  width: clamp(150px, 20vw, 230px);
  padding: 0.5em 1em;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  outline: none;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}

header nav form[role="search"] input[type="search"]::placeholder {
  color: var(--text-muted);
}

header nav form[role="search"] input[type="search"]:focus {
  border-color: var(--brand-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.14);
}

header nav form[role="search"] button {
  padding: 0.5em 1.15em;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--text-inverse);
  background: var(--brand-gradient);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-brand);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-out), filter 0.25s var(--ease-out);
}

header nav form[role="search"] button:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 30px rgba(192, 57, 43, 0.34);
}

header nav form[role="search"] button:active {
  transform: translateY(0) scale(0.97);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-2xl);
  position: relative;
  z-index: 1;
}

main > section {
  margin-bottom: var(--space-3xl);
  scroll-margin-top: 96px;
}

main > section:last-child {
  margin-bottom: var(--space-xl);
}

#hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3.5rem);
  border-radius: var(--radius-xl);
  background: var(--brand-gradient);
  background-size: 200% 200%;
  color: var(--text-inverse);
  overflow: hidden;
  box-shadow: var(--shadow-brand);
  animation: heroGradientShift 14s ease infinite;
  isolation: isolate;
}

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

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.28) 0%, transparent 42%),
    radial-gradient(circle at 8% 92%, rgba(255, 255, 255, 0.16) 0%, transparent 46%);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  top: -60%;
  right: -18%;
  width: 60%;
  height: 220%;
  z-index: -1;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.14) 45%, transparent 100%);
  transform: rotate(8deg);
  pointer-events: none;
  animation: heroSheen 9s ease-in-out infinite;
}

@keyframes heroSheen {
  0%, 100% { transform: translateX(0) rotate(8deg); opacity: 0.6; }
  50% { transform: translateX(-16%) rotate(8deg); opacity: 1; }
}

#hero h1 {
  color: var(--text-inverse);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
  margin-bottom: var(--space-lg);
  max-width: 20ch;
}

#hero p {
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.98rem, 1.7vw, 1.1rem);
  max-width: 68ch;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
}

#hero strong {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.05em 0.4em;
  border-radius: 6px;
  font-weight: 800;
  white-space: nowrap;
}

#hero > div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

#hero > div a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78em 1.85em;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-out), background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

#hero > div a:first-child {
  color: var(--brand-primary);
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

#hero > div a:first-child:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
  color: var(--brand-secondary);
}

#hero > div a:last-child {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#hero > div a:last-child:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  color: #fff;
}

main > section:not(#hero) {
  background: var(--bg-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.4s var(--ease-out), transform 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

main > section:not(#hero):hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

main > section:not(#hero) > h2 {
  margin-top: 0;
}

main > section:not(#hero) > p:first-of-type {
  color: var(--text-secondary);
  font-size: 1.02rem;
  max-width: 80ch;
}

article {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
  overflow: hidden;
}

article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}

article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

article:hover::before {
  transform: scaleX(1);
}

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

article h3 {
  margin-top: 0;
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  flex-wrap: wrap;
}

article h3 + p time {
  margin-bottom: var(--space-sm);
  display: inline-block;
}

article > a {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.45em 1.1em;
  border-radius: var(--radius-pill);
  background: var(--brand-gradient-soft);
  color: var(--brand-primary);
  transition: gap 0.3s var(--ease-out), background-color 0.3s var(--ease-out), transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-out);
}

article > a::after {
  content: "→";
  transition: transform 0.3s var(--ease-out);
}

article > a:hover {
  gap: 0.7em;
  background: var(--brand-gradient);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

article > a:hover::after {
  transform: translateX(3px);
}

#brand article:nth-of-type(1) {
  background: linear-gradient(160deg, var(--bg-surface) 0%, var(--bg-surface-alt) 100%);
}

#products table {
  font-size: 0.92rem;
}

#products table td:first-child {
  font-weight: 700;
  color: var(--brand-primary);
  white-space: nowrap;
}

#cases blockquote {
  margin: var(--space-md) 0;
}

#cases blockquote:last-of-type {
  margin-bottom: 0;
}

#articles article {
  display: flex;
  flex-direction: column;
}

#articles article h3 {
  font-size: 1.08rem;
  line-height: 1.45;
}

#articles article > p:not(:first-of-type) {
  color: var(--text-secondary);
  font-size: 0.94rem;
  flex: 1 1 auto;
}

#articles article > a {
  align-self: flex-start;
  margin-top: auto;
}

#faq article {
  padding: var(--space-lg);
  background: linear-gradient(150deg, var(--bg-surface) 0%, var(--bg-surface-alt) 100%);
}

#faq article h3 {
  color: var(--brand-primary);
  font-size: 1.05rem;
  position: relative;
  padding-left: 1.6em;
}

#faq article h3::before {
  content: "Q";
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.15em;
  height: 1.15em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85em;
  font-weight: 900;
  color: #fff;
  background: var(--brand-gradient);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(192, 57, 43, 0.3);
  line-height: 1;
}

#faq article p {
  color: var(--text-secondary);
  font-size: 0.96rem;
}

#howto ol {
  counter-reset: howto-step;
  list-style: none;
  padding-left: 0;
  margin: var(--space-lg) 0;
}

#howto ol li {
  counter-increment: howto-step;
  position: relative;
  padding: var(--space-md) var(--space-md) var(--space-md) 3.4em;
  margin-bottom: var(--space-sm);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

#howto ol li::before {
  content: counter(howto-step);
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  width: 1.9em;
  height: 1.9em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 900;
  color: #fff;
  background: var(--brand-gradient);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(192, 57, 43, 0.28);
  line-height: 1;
}

#howto ol li:hover {
  transform: translateX(6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

#howto ul li::marker {
  color: var(--brand-secondary);
}

#contact address {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: 0 0 var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

#contact address:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

#contact address p {
  margin: 0 0 0.5em;
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

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

#contact address a {
  font-weight: 700;
  word-break: break-all;
}

#contact address a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-sm);
  margin: 0;
}

#sitemap ul li,
#links ul li {
  margin: 0;
}

#sitemap ul li a,
#links ul li a {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.65em 1em;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease-spring), color 0.3s var(--ease-out), background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

#sitemap ul li a::before,
#links ul li a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-gradient);
  flex: 0 0 auto;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-out);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: var(--brand-primary);
  background: var(--brand-gradient-soft);
  border-color: var(--brand-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

#sitemap ul li a:hover::before,
#links ul li a:hover::before {
  transform: scale(1.5);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.14);
}

footer {
  position: relative;
  z-index: 1;
  margin-top: var(--space-2xl);
  padding: var(--space-2xl) var(--space-lg) var(--space-xl);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -8px 32px rgba(28, 26, 25, 0.05);
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-gradient);
  background-size: 200% 100%;
  animation: heroGradientShift 12s ease infinite;
}

footer > section {
  max-width: var(--max-width);
  margin: 0 auto var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
}

footer > section:last-of-type {
  border-bottom: none;
}

footer > section h2 {
  font-size: 1.05rem;
  margin-bottom: var(--space-sm);
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}

footer > section h2::after {
  display: none;
}

footer > section h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand-gradient);
  box-shadow: var(--shadow-brand);
  flex: 0 0 auto;
}

footer > section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  max-width: 90ch;
  margin: 0;
}

footer > p {
  max-width: var(--max-width);
  margin: var(--space-sm) auto 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

footer > p:last-child {
  font-size: 0.8rem;
  opacity: 0.85;
}

::selection {
  background: rgba(192, 57, 43, 0.22);
  color: var(--text-primary);
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--brand-accent), var(--brand-secondary));
}

@supports (animation-timeline: view()) {
  main > section:not(#hero),
  article,
  footer > section {
    animation: revealUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 34%;
  }
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(38px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@media (max-width: 980px) {
  header nav {
    padding: var(--space-sm) var(--space-md);
  }

  header nav ul {
    order: 3;
    flex: 1 1 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  header nav form[role="search"] {
    margin-left: auto;
  }

  main {
    padding: var(--space-lg) var(--space-md) var(--space-2xl);
  }

  main > section {
    margin-bottom: var(--space-2xl);
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
    line-height: 1.72;
  }

  header nav {
    gap: var(--space-sm);
  }

  header nav > a[aria-label="苹果短剧首页"] {
    font-size: 1.12rem;
    padding: 0.3em 0.7em 0.3em 0.6em;
  }

  header nav form[role="search"] {
    flex: 1 1 100%;
    margin-left: 0;
  }

  header nav form[role="search"] input[type="search"] {
    width: 100%;
    flex: 1 1 auto;
  }

  #hero {
    padding: var(--space-xl) var(--space-lg);
    border-radius: var(--radius-lg);
  }

  #hero > div {
    flex-direction: column;
    gap: var(--space-sm);
  }

  #hero > div a {
    width: 100%;
  }

  main > section:not(#hero) {
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-md);
  }

  article {
    padding: var(--space-md) var(--space-md) var(--space-sm);
    border-radius: var(--radius-sm);
  }

  article:hover {
    transform: none;
  }

  h2::after {
    width: 44px;
    height: 3px;
  }

  table {
    font-size: 0.86rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  th,
  td {
    padding: 0.7em 0.85em;
  }

  #howto ol li {
    padding: var(--space-md) var(--space-md) var(--space-md) 3.1em;
  }

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

  blockquote {
    padding: var(--space-md);
  }

  footer {
    padding: var(--space-xl) var(--space-md) var(--space-lg);
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 1.55rem;
  }

  h2 {
    font-size: 1.28rem;
  }

  #hero {
    padding: var(--space-lg) var(--space-md);
  }

  header nav ul li a {
    font-size: 0.84rem;
    padding: 0.38em 0.7em;
  }

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

@media (hover: none) {
  article:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }

  #sitemap ul li a:hover,
  #links ul li a:hover {
    transform: none;
  }
}