/* ===== 星空动漫 style.css ===== */
/* 全局变量与重置 */
:root {
  --bg-primary: #0a0a18;
  --bg-secondary: #14142a;
  --bg-card: rgba(26, 26, 53, 0.8);
  --bg-card-hover: rgba(40, 40, 80, 0.9);
  --bg-glass: rgba(20, 20, 46, 0.7);
  --border-color: rgba(80, 80, 140, 0.4);
  --border-glow: rgba(139, 92, 246, 0.6);
  --text-primary: #f0f0ff;
  --text-secondary: #d0d0e8;
  --text-muted: #8888aa;
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
  --accent-gradient: linear-gradient(135deg, #7c3aed, #6d28d9);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s ease;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, #0a0a18, #14142a);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 星空背景动画 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), #4c1d95);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

/* 头部导航 */
header {
  background: rgba(13, 13, 32, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

nav h1 {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #f0f0ff, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
  position: relative;
}

nav h1::after {
  content: '✦';
  position: absolute;
  right: -1.5rem;
  top: 0;
  font-size: 1rem;
  color: var(--accent-light);
  animation: twinkle 2s infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  transition: var(--transition);
  position: relative;
  font-size: 0.95rem;
}

nav ul li a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: var(--transition);
}

nav ul li a:hover {
  color: var(--accent-light);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
}

nav ul li a:hover::before {
  width: 60%;
}

/* 主内容区 */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

section {
  margin-bottom: 4rem;
  animation: fadeInUp 0.6s ease both;
}

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

/* 区块标题 */
section h2 {
  color: var(--text-primary);
  font-size: 2rem;
  border-left: 6px solid var(--accent);
  padding-left: 1rem;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

section h2::after {
  content: '';
  position: absolute;
  left: 1rem;
  bottom: -8px;
  width: 40%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* 漫画卡片网格 */
section > div[style*="grid"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem;
}

section > div[style*="grid"] article {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

section > div[style*="grid"] article::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.5s ease;
  z-index: 1;
}

section > div[style*="grid"] article:hover::before {
  left: 100%;
}

section > div[style*="grid"] article:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow), var(--shadow-md);
  background: var(--bg-card-hover);
}

section > div[style*="grid"] article img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

section > div[style*="grid"] article:hover img {
  transform: scale(1.05);
}

section > div[style*="grid"] article > div {
  padding: 1rem;
}

section > div[style*="grid"] article h3 {
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  transition: var(--transition);
}

section > div[style*="grid"] article:hover h3 {
  color: var(--accent-light);
}

section > div[style*="grid"] article p {
  color: var(--text-secondary);
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

section > div[style*="grid"] article p:last-of-type {
  color: var(--text-muted);
  font-size: 0.8rem;
}

section > div[style*="grid"] article span {
  background: rgba(45, 45, 85, 0.8);
  color: var(--accent-light);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  display: inline-block;
  margin-top: 0.5rem;
  border: 1px solid rgba(139, 92, 246, 0.3);
  transition: var(--transition);
}

section > div[style*="grid"] article:hover span {
  background: rgba(139, 92, 246, 0.2);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

/* 精品推荐 - 大卡片 */
section > div[style*="repeat(auto-fill, minmax(280px"] {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

section > div[style*="repeat(auto-fill, minmax(280px"] article {
  background: rgba(28, 28, 62, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

section > div[style*="repeat(auto-fill, minmax(280px"] article:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

section > div[style*="repeat(auto-fill, minmax(280px"] article img {
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

section > div[style*="repeat(auto-fill, minmax(280px"] article:hover img {
  transform: scale(1.04);
}

section > div[style*="repeat(auto-fill, minmax(280px"] article > div {
  padding: 1rem;
}

section > div[style*="repeat(auto-fill, minmax(280px"] article h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

section > div[style*="repeat(auto-fill, minmax(280px"] article p {
  color: var(--text-secondary);
  margin: 0.3rem 0;
}

section > div[style*="repeat(auto-fill, minmax(280px"] article p:last-child {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* 详细介绍区块 */
section[style*="background: #161630"] {
  background: rgba(22, 22, 48, 0.8) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2.5rem !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

section[style*="background: #161630"]::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

section[style*="background: #161630"] h3 {
  color: var(--text-primary);
  font-size: 1.6rem;
  margin: 1.5rem 0 0.8rem;
  position: relative;
  display: inline-block;
}

section[style*="background: #161630"] h3::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

section[style*="background: #161630"] p {
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 1rem;
  max-width: 900px;
}

/* 角色介绍 */
section > div[style*="repeat(auto-fill, minmax(180px"] article {
  text-align: center;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

section > div[style*="repeat(auto-fill, minmax(180px"] article::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: var(--transition);
}

section > div[style*="repeat(auto-fill, minmax(180px"] article:hover::after {
  width: 80%;
}

section > div[style*="repeat(auto-fill, minmax(180px"] article:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

section > div[style*="repeat(auto-fill, minmax(180px"] article img[style*="border-radius: 50%"] {
  border-radius: 50% !important;
  width: 120px !important;
  height: 120px !important;
  object-fit: cover;
  margin-bottom: 0.8rem;
  border: 3px solid var(--accent);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
  transition: var(--transition);
}

section > div[style*="repeat(auto-fill, minmax(180px"] article:hover img[style*="border-radius: 50%"] {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

section > div[style*="repeat(auto-fill, minmax(180px"] article h3 {
  color: var(--text-primary);
  margin: 0.5rem 0;
  font-size: 1.3rem;
}

section > div[style*="repeat(auto-fill, minmax(180px"] article p {
  color: var(--text-secondary);
  margin: 0.2rem 0;
  font-size: 0.95rem;
}

section > div[style*="repeat(auto-fill, minmax(180px"] article p:last-child {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* 平台介绍 */
section[style*="background: #14142e"] {
  background: rgba(20, 20, 46, 0.8) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2.5rem !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

section[style*="background: #14142e"]::before {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
  border-radius: 50%;
}

section[style*="background: #14142e"] p {
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

/* APP下载区 */
section[style*="text-align: center"] {
  background: rgba(28, 28, 58, 0.85) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 3rem 2.5rem !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

section[style*="text-align: center"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.1), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.08), transparent 50%);
  pointer-events: none;
}

section[style*="text-align: center"] h2 {
  font-size: 2.2rem;
  border-left: none;
  padding-left: 0;
  position: relative;
}

section[style*="text-align: center"] h2::after {
  display: none;
}

section[style*="text-align: center"] p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0.8rem auto;
  position: relative;
  z-index: 1;
}

section[style*="text-align: center"] div[style*="display: flex"] {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

section[style*="text-align: center"] a {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  padding: 0.8rem 2rem;
  border-radius: 40px;
  text-decoration: none;
  font-weight: bold;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

section[style*="text-align: center"] a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

section[style*="text-align: center"] a:hover::before {
  left: 100%;
}

section[style*="text-align: center"] a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

/* 用户评论 */
section > div[style*="repeat(auto-fill, minmax(250px"] article {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  transition: var(--transition);
  position: relative;
}

section > div[style*="repeat(auto-fill, minmax(250px"] article::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 15px;
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.3;
  font-family: Georgia, serif;
}

section > div[style*="repeat(auto-fill, minmax(250px"] article:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md);
}

section > div[style*="repeat(auto-fill, minmax(250px"] article p:first-child {
  color: var(--accent-light);
  font-weight: bold;
  font-size: 1.05rem;
}

section > div[style*="repeat(auto-fill, minmax(250px"] article p:nth-child(2) {
  color: var(--text-secondary);
  margin: 0.5rem 0;
  line-height: 1.7;
}

section > div[style*="repeat(auto-fill, minmax(250px"] article p:last-child {
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
}

/* 侧边栏 */
aside {
  background: var(--bg-glass) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-lg) !important;
  padding: 2rem !important;
  margin-bottom: 2rem !important;
  transition: var(--transition);
}

aside:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

aside h3 {
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.8rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  position: relative;
}

aside h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 30%;
  height: 2px;
  background: var(--accent-light);
}

aside ol, aside ul {
  color: var(--text-secondary);
  padding-left: 1.2rem;
  line-height: 2.2;
}

aside ol li, aside ul li {
  transition: var(--transition);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}

aside ol li:hover, aside ul li:hover {
  color: var(--accent-light);
  background: rgba(139, 92, 246, 0.1);
  transform: translateX(5px);
}

aside p {
  color: var(--text-secondary);
  margin: 0.5rem 0;
  transition: var(--transition);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
}

aside p:hover {
  color: var(--accent-light);
  background: rgba(139, 92, 246, 0.1);
}

/* 底部 */
footer {
  background: rgba(10, 10, 24, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-muted) !important;
  padding: 2.5rem 1.5rem !important;
  border-top: 1px solid var(--border-color);
}

footer div[style*="max-width: 1280px"] {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

footer p {
  margin: 0.3rem 0;
  line-height: 1.8;
}

footer a {
  color: var(--accent-light) !important;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

footer a:hover {
  color: var(--text-primary) !important;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

footer div:first-child a {
  display: block;
  margin: 0.3rem 0;
  padding: 0.2rem 0;
}

footer div:first-child a:hover {
  transform: translateX(5px);
}

footer div:first-child p {
  color: var(--accent-light) !important;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  nav {
    padding: 1rem;
  }
  
  nav h1 {
    font-size: 1.5rem;
  }
  
  main {
    padding: 1.5rem 1rem;
  }
  
  section h2 {
    font-size: 1.7rem;
  }
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
  
  nav ul {
    width: 100%;
    justify-content: flex-start;
    gap: 0.3rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  
  nav ul li a {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  
  section > div[style*="grid"] {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
  }
  
  section > div[style*="repeat(auto-fill, minmax(280px"] {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  
  section > div[style*="repeat(auto-fill, minmax(180px"] {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  section > div[style*="repeat(auto-fill, minmax(250px"] {
    grid-template-columns: 1fr;
  }
  
  section[style*="background: #161630"],
  section[style*="background: #14142e"],
  section[style*="text-align: center"] {
    padding: 1.8rem !important;
  }
  
  footer div[style*="max-width: 1280px"] {
    flex-direction: column;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  nav h1 {
    font-size: 1.3rem;
  }
  
  nav ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  
  section > div[style*="grid"] {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.8rem;
  }
  
  section > div[style*="grid"] article h3 {
    font-size: 1rem;
  }
  
  section > div[style*="grid"] article p {
    font-size: 0.8rem;
  }
  
  section h2 {
    font-size: 1.4rem;
  }
  
  section[style*="text-align: center"] a {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    max-width: 250px;
  }
  
  section[style*="text-align: center"] div[style*="display: flex"] {
    flex-direction: column;
    align-items: center;
  }
  
  aside {
    padding: 1.5rem !important;
  }
}

/* 动画效果 */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* 滚动进入动画 */
section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 卡片悬浮特效增强 */
article {
  position: relative;
}

article:hover {
  z-index: 2;
}

/* 图片加载动画 */
img {
  animation: fadeIn 0.5s ease;
}

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

/* 文本选择样式 */
::selection {
  background: rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
}

/* 焦点样式 */
a:focus, button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 减少动画偏好 */
@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;
  }
}