:root {
  --primary: #ff6b9d;
  --primary-dark: #e0558a;
  --primary-light: #ffd6e7;
  --secondary: #6bb5ff;
  --secondary-dark: #4a9ae6;
  --accent: #7ee8a2;
  --accent-dark: #5bc47f;
  --bg: #fef7fa;
  --bg-alt: #fff5f8;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-card-solid: #ffffff;
  --text: #2d2d3a;
  --text-secondary: #6b6b7b;
  --text-light: #9a9aad;
  --border: rgba(255, 107, 157, 0.15);
  --border-strong: rgba(255, 107, 157, 0.3);
  --shadow: 0 4px 20px rgba(255, 107, 157, 0.1);
  --shadow-lg: 0 12px 40px rgba(255, 107, 157, 0.16);
  --shadow-hover: 0 16px 48px rgba(255, 107, 157, 0.22);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-blur: 16px;
  --gradient-hero: linear-gradient(135deg, #ff6b9d 0%, #ff9ec7 40%, #6bb5ff 100%);
  --gradient-btn: linear-gradient(135deg, #ff6b9d, #ff8fb8);
  --gradient-btn-hover: linear-gradient(135deg, #e0558a, #ff6b9d);
  --gradient-banner-1: linear-gradient(135deg, #ffd6e7, #ffe8f0, #c7e9ff);
  --gradient-banner-2: linear-gradient(135deg, #c7e9ff, #d4f0ff, #d8f5d0);
  --gradient-banner-3: linear-gradient(135deg, #d8f5d0, #e8fce0, #ffd6e7);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --primary: #ff85b3;
  --primary-dark: #ff6b9d;
  --primary-light: #3d1f2e;
  --secondary: #7ec4ff;
  --secondary-dark: #6bb5ff;
  --accent: #8ef0b2;
  --accent-dark: #7ee8a2;
  --bg: #12121a;
  --bg-alt: #1a1a26;
  --bg-card: rgba(30, 30, 45, 0.72);
  --bg-card-solid: #1e1e2d;
  --text: #e8e8f0;
  --text-secondary: #a8a8bc;
  --text-light: #6b6b80;
  --border: rgba(255, 133, 179, 0.15);
  --border-strong: rgba(255, 133, 179, 0.3);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 16px 48px rgba(255, 133, 179, 0.15);
  --glass-bg: rgba(30, 30, 45, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --gradient-hero: linear-gradient(135deg, #3d1f2e 0%, #2a1a30 40%, #1a1a3a 100%);
  --gradient-btn: linear-gradient(135deg, #ff85b3, #ff6b9d);
  --gradient-btn-hover: linear-gradient(135deg, #ff6b9d, #e0558a);
  --gradient-banner-1: linear-gradient(135deg, #3d1f2e, #2a1a30, #1a1a3a);
  --gradient-banner-2: linear-gradient(135deg, #1a1a3a, #1a2a3a, #1a3a2a);
  --gradient-banner-3: linear-gradient(135deg, #1a3a2a, #1a2a1a, #3d1f2e);
}

*,
*::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);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
  -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-dark);
}

ul,
ol {
  list-style: none;
}

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

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

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

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

blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-lg);
}

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

address {
  font-style: normal;
}

/* ===== HEADER ===== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 2px 20px rgba(255, 107, 157, 0.06);
  transition: background var(--transition), box-shadow var(--transition);
}

[data-theme="dark"] #site-header {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.brand-logo:hover {
  transform: scale(1.04);
  color: var(--primary);
}

.brand-logo svg {
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
  transition: box-shadow var(--transition), transform var(--transition);
}

.brand-logo:hover svg {
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.45);
  transform: rotate(-4deg);
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.5px;
  background: var(--gradient-btn);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

#main-nav a {
  display: block;
  padding: 0.4rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition), transform var(--transition);
  position: relative;
}

#main-nav a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-btn);
  border-radius: 2px;
  transition: width var(--transition), left var(--transition);
}

#main-nav a:hover {
  color: var(--primary);
  background: rgba(255, 107, 157, 0.08);
  transform: translateY(-1px);
}

#main-nav a:hover::after {
  width: 60%;
  left: 20%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

#site-search {
  display: flex;
  align-items: center;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#site-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.15);
}

#site-search input {
  border: none;
  outline: none;
  background: transparent;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text);
  width: 160px;
  font-family: var(--font);
  transition: width var(--transition);
}

#site-search input::placeholder {
  color: var(--text-light);
}

#site-search input:focus {
  width: 200px;
}

#site-search button {
  border: none;
  background: var(--gradient-btn);
  color: #fff;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition), transform var(--transition);
}

#site-search button:hover {
  background: var(--gradient-btn-hover);
  transform: scale(1.02);
}

#theme-toggle,
#menu-toggle {
  border: 1px solid var(--border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: all var(--transition);
}

#theme-toggle:hover,
#menu-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 107, 157, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.15);
}

#menu-toggle {
  display: none;
}

/* ===== HERO ===== */
#hero {
  position: relative;
  background: var(--gradient-hero);
  padding: 3.5rem 1.5rem 3rem;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}

#hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  animation: fadeInUp 0.8s ease-out both;
}

.hero-lead {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 720px;
  margin: 0 auto 1.8rem;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 107, 157, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.btn-primary:hover::after {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  color: var(--primary-dark);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  color: #fff;
}

/* ===== BANNER SLIDER ===== */
.hero-banner {
  position: relative;
  max-width: 800px;
  margin: 0 auto 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.8s ease-out 0.45s both;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.banner-slide:first-child {
  position: relative;
}

.banner-slide[data-index="0"] {
  opacity: 1;
  pointer-events: auto;
  animation: bannerCycle1 12s infinite;
}

.banner-slide[data-index="1"] {
  animation: bannerCycle2 12s infinite;
}

.banner-slide[data-index="2"] {
  animation: bannerCycle3 12s infinite;
}

@keyframes bannerCycle1 {
  0%, 30% { opacity: 1; pointer-events: auto; }
  33%, 97% { opacity: 0; pointer-events: none; }
  100% { opacity: 1; pointer-events: auto; }
}

@keyframes bannerCycle2 {
  0%, 30% { opacity: 0; pointer-events: none; }
  33%, 63% { opacity: 1; pointer-events: auto; }
  66%, 100% { opacity: 0; pointer-events: none; }
}

@keyframes bannerCycle3 {
  0%, 63% { opacity: 0; pointer-events: none; }
  66%, 96% { opacity: 1; pointer-events: auto; }
  100% { opacity: 0; pointer-events: none; }
}

.banner-slide svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== HERO STATS ===== */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.stat-item {
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 1rem 0.5rem;
  text-align: center;
  transition: all var(--transition);
  cursor: default;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.stat-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.25rem;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-light);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumb li + li::before {
  content: '/';
  color: var(--text-light);
  opacity: 0.5;
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

/* ===== ANCHOR NAV ===== */
.anchor-nav {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding: 0 1.5rem;
}

.anchor-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.anchor-nav a {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 50px;
  transition: all var(--transition);
  white-space: nowrap;
}

.anchor-nav a:hover {
  background: var(--gradient-btn);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

/* ===== SECTIONS ===== */
main > section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  scroll-margin-top: 80px;
}

main > section h2 {
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

main > section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--gradient-btn);
  border-radius: 4px;
  transition: width var(--transition);
}

main > section:hover h2::after {
  width: 100px;
}

main > section h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  position: relative;
  padding-left: 0.9rem;
}

main > section h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  background: var(--gradient-btn);
  border-radius: 4px;
}

/* ===== CARDS / ARTICLES ===== */
#news article,
#articles article {
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

#news article::before,
#articles article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-btn);
  opacity: 0;
  transition: opacity var(--transition);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}

#news article:hover::before,
#articles article:hover::before {
  opacity: 1;
}

#news article h3,
#articles article h3 {
  margin-top: 0;
  font-size: 1.15rem;
  padding-left: 0;
}

#news article h3::before,
#articles article h3::before {
  display: none;
}

#news article p:first-of-type,
#articles article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

#articles article a {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  transition: all var(--transition);
}

#articles article a::after {
  content: ' →';
  transition: margin var(--transition);
  display: inline-block;
}

#articles article a:hover {
  color: var(--primary-dark);
}

#articles article a:hover::after {
  margin-left: 4px;
}

/* ===== FAQ ===== */
#faq details {
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

#faq details:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

#faq details[open] {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

#faq summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background var(--transition), color var(--transition);
  position: relative;
}

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

#faq summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
  line-height: 1;
}

#faq details[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

#faq summary:hover {
  background: rgba(255, 107, 157, 0.06);
  color: var(--primary);
}

#faq details[open] summary {
  background: rgba(255, 107, 157, 0.06);
  color: var(--primary);
}

#faq details p {
  padding: 0 1.25rem 1.25rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
  animation: fadeIn 0.3s ease-out;
}

/* ===== HOWTO ===== */
#howto ol {
  counter-reset: step;
  padding-left: 0;
  margin: 1rem 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 0.75rem 0.75rem 0.75rem 3.2rem;
  margin-bottom: 0.6rem;
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-btn);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

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

/* ===== CONTACT ===== */
#contact address {
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}

#contact address:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

#contact address p {
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

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

/* ===== SITEMAP ===== */
#sitemap ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

#sitemap ul li a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

#sitemap ul li a:hover {
  background: var(--gradient-btn);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3);
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  transition: background var(--transition);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

footer h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
  color: var(--text);
}

footer h2:first-child {
  margin-top: 0;
}

footer p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

footer a {
  color: var(--primary);
  font-weight: 500;
}

footer a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== BACK TO TOP ===== */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-btn);
  color: #fff;
  font-size: 0;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

#back-to-top::before {
  content: '↑';
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 30px rgba(255, 107, 157, 0.55);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

main > section {
  animation: fadeInUp 0.6s ease-out both;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .header-inner {
    padding: 0.65rem 1rem;
  }

  #main-nav a {
    font-size: 0.82rem;
    padding: 0.35rem 0.55rem;
  }

  #site-search input {
    width: 130px;
  }

  #site-search input:focus {
    width: 160px;
  }
}

@media (max-width: 860px) {
  #menu-toggle {
    display: inline-block;
  }

  #main-nav {
    display: none;
    width: 100%;
    order: 10;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
  }

  #main-nav.open {
    display: block;
    animation: fadeIn 0.25s ease-out;
  }

  #main-nav ul {
    flex-direction: column;
    gap: 0.15rem;
  }

  #main-nav a {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
  }

  #main-nav a::after {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  #site-search {
    display: none;
  }

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

  .hero-lead {
    font-size: 0.95rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-number {
    font-size: 1.35rem;
  }

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

  main > section h2 {
    font-size: 1.3rem;
  }

  main > section h3 {
    font-size: 1.1rem;
  }

  .anchor-nav ul {
    padding: 0.6rem 0.75rem;
  }

  .anchor-nav a {
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
  }

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

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

  .header-inner {
    padding: 0.6rem 0.75rem;
    gap: 0.5rem;
  }

  .brand-name {
    font-size: 1.1rem;
  }

  .brand-logo svg {
    width: 34px;
    height: 34px;
  }

  #theme-toggle {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
  }

  #menu-toggle {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
  }

  #hero {
    padding: 2.5rem 1rem 2rem;
  }

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

  .hero-lead {
    font-size: 0.88rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .btn-primary,
  .btn-secondary {
    text-align: center;
    padding: 0.7rem 1.5rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .stat-item {
    padding: 0.75rem 0.4rem;
  }

  .stat-number {
    font-size: 1.2rem;
  }

  .stat-label {
    font-size: 0.72rem;
  }

  .breadcrumb {
    padding: 0.75rem 0.75rem;
    font-size: 0.75rem;
  }

  .anchor-nav {
    padding: 0 0.75rem;
  }

  main > section {
    padding: 1.75rem 0.75rem;
  }

  main > section h2 {
    font-size: 1.15rem;
  }

  main > section h2::after {
    width: 40px;
    height: 3px;
  }

  main > section h3 {
    font-size: 1rem;
  }

  #news article,
  #articles article {
    padding: 1.15rem;
  }

  #news article h3,
  #articles article h3 {
    font-size: 1rem;
  }

  #faq summary {
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
  }

  #faq details p {
    padding: 0 1rem 1rem;
    font-size: 0.85rem;
  }

  #howto ol li {
    padding: 0.65rem 0.65rem 0.65rem 2.8rem;
    font-size: 0.85rem;
  }

  #howto ol li::before {
    left: 0.6rem;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.72rem;
  }

  #contact address {
    padding: 1.15rem;
  }

  #contact address p {
    font-size: 0.85rem;
  }

  #sitemap ul {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.4rem;
  }

  #sitemap ul li a {
    padding: 0.4rem 0.55rem;
    font-size: 0.78rem;
  }

  .footer-inner {
    padding: 2rem 0.75rem;
  }

  footer h2 {
    font-size: 1rem;
  }

  footer p {
    font-size: 0.8rem;
  }

  #back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
  }
}

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

  .banner-slide[data-index="0"] {
    opacity: 1;
    pointer-events: auto;
  }

  .banner-slide[data-index="1"],
  .banner-slide[data-index="2"] {
    opacity: 0;
    pointer-events: none;
  }
}

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

::selection {
  background: rgba(255, 107, 157, 0.25);
  color: var(--text);
}

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff6b9d, #6bb5ff);
  border-radius: 10px;
  border: 2px solid var(--bg-alt);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e0558a, #4a9ae6);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #12121a;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  border-color: #12121a;
}

@media print {
  #site-header,
  #back-to-top,
  .anchor-nav,
  .hero-actions,
  .header-actions {
    display: none;
  }

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

  main > section {
    animation: none;
    page-break-inside: avoid;
  }
}