/* style.css - 爱游戏(AYX) 中国大陆版官方网站 */
/* 全局重置与字体 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #0f0f1a;
  color: #e0e0e0;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.5s, color 0.5s;
}

/* 暗色模式支持（默认暗色） */
@media (prefers-color-scheme: light) {
  body {
    background: #f5f5fa;
    color: #1a1a2e;
  }
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 4px;
}

/* 滚动动画基础 */
section, article, header, footer, aside {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

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

/* 导航栏 - 毛玻璃效果 */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 15, 26, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 2rem;
  transition: background 0.3s, backdrop-filter 0.3s;
}

@media (prefers-color-scheme: light) {
  header {
    background: rgba(245, 245, 250, 0.6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
}

nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  flex-wrap: wrap;
  padding: 1rem 0;
  gap: 1.5rem;
}

nav ul li a {
  text-decoration: none;
  color: #c0c0d0;
  font-weight: 500;
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  transition: all 0.3s ease;
  position: relative;
  letter-spacing: 0.5px;
}

nav ul li a:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}

@media (prefers-color-scheme: light) {
  nav ul li a {
    color: #333;
  }
  nav ul li a:hover {
    color: #fff;
  }
}

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

/* 通用section样式 */
section {
  margin: 4rem 0;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

section:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(102, 126, 234, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

@media (prefers-color-scheme: light) {
  section {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  }
  section:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.15);
  }
}

/* 标题样式 */
h1, h2, h3, h4 {
  background: linear-gradient(135deg, #f093fb, #f5576c, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

h1 {
  font-size: 2.8rem;
  margin-top: 2rem;
}

h2 {
  font-size: 2.2rem;
  margin-top: 2rem;
  border-bottom: 2px solid rgba(102, 126, 234, 0.3);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.6rem;
  margin-top: 1.5rem;
}

h4 {
  font-size: 1.2rem;
  margin-top: 1rem;
}

/* 段落 */
p {
  margin-bottom: 1.2rem;
  font-size: 1rem;
  color: #c8c8d8;
  line-height: 1.8;
}

@media (prefers-color-scheme: light) {
  p {
    color: #444;
  }
}

/* 卡片圆角与毛玻璃效果（article作为卡片） */
article {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 1.8rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

article:hover {
  transform: translateY(-6px) scale(1.01);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(102, 126, 234, 0.3);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
}

@media (prefers-color-scheme: light) {
  article {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  }
  article:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
  }
}

/* details/summary FAQ样式 */
details {
  margin: 1rem 0;
  padding: 0.8rem 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border-left: 4px solid #667eea;
  transition: background 0.3s;
}

details[open] {
  background: rgba(102, 126, 234, 0.08);
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: #c0c0d0;
  padding: 0.5rem 0;
  transition: color 0.3s;
}

summary:hover {
  color: #667eea;
}

details p {
  margin-top: 0.8rem;
  padding-left: 0.5rem;
}

@media (prefers-color-scheme: light) {
  details {
    background: rgba(0, 0, 0, 0.02);
  }
  summary {
    color: #333;
  }
}

/* 首页特殊Banner渐变 */
#home {
  background: linear-gradient(135deg, rgba(15,15,26,0.9), rgba(30,20,60,0.9)), 
              radial-gradient(circle at 20% 50%, #667eea 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, #764ba2 0%, transparent 50%);
  border: none;
  border-radius: 30px;
  padding: 4rem 3rem;
  position: relative;
  overflow: hidden;
}

#home::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, #667eea, #764ba2, #f093fb, #667eea);
  opacity: 0.08;
  animation: rotateGradient 20s linear infinite;
  z-index: 0;
}

@keyframes rotateGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#home * {
  position: relative;
  z-index: 1;
}

#home h1 {
  font-size: 3.2rem;
  margin-bottom: 1.5rem;
}

#home p {
  font-size: 1.1rem;
  max-width: 800px;
  color: #d0d0e0;
}

@media (prefers-color-scheme: light) {
  #home {
    background: linear-gradient(135deg, rgba(245,245,250,0.95), rgba(230,230,250,0.95)),
                radial-gradient(circle at 20% 50%, #667eea 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, #764ba2 0%, transparent 50%);
  }
  #home p {
    color: #444;
  }
}

/* 按钮与链接通用 */
a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #f093fb;
}

/* 阅读全文链接 */
article a[href="#readmore"] {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 1.2rem;
  border: 1px solid #667eea;
  border-radius: 30px;
  font-size: 0.9rem;
  transition: all 0.3s;
}

article a[href="#readmore"]:hover {
  background: #667eea;
  color: #fff;
  border-color: #667eea;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 侧边栏与页脚 */
aside {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 20px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

aside h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  border-bottom: none;
}

aside ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

aside ul li a {
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  transition: background 0.3s;
}

aside ul li a:hover {
  background: rgba(102, 126, 234, 0.15);
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #888;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  background: rgba(15, 15, 26, 0.4);
}

@media (prefers-color-scheme: light) {
  footer {
    background: rgba(245, 245, 250, 0.6);
    color: #666;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }
}

/* 响应式布局 */
@media (max-width: 768px) {
  header {
    padding: 0 1rem;
  }
  nav ul {
    gap: 0.8rem;
    padding: 0.8rem 0;
  }
  nav ul li a {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
  main {
    padding: 1rem;
  }
  section {
    padding: 1.5rem;
    margin: 2rem 0;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.6rem;
  }
  h3 {
    font-size: 1.3rem;
  }
  #home {
    padding: 2.5rem 1.5rem;
  }
  #home h1 {
    font-size: 2.2rem;
  }
  #home p {
    font-size: 1rem;
  }
  article {
    padding: 1.2rem;
  }
  aside {
    flex-direction: column;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  nav ul {
    flex-direction: column;
    align-items: stretch;
  }
  nav ul li {
    text-align: center;
  }
  nav ul li a {
    display: block;
    padding: 0.6rem;
  }
  section {
    padding: 1rem;
    border-radius: 16px;
  }
  #home {
    padding: 2rem 1rem;
    border-radius: 20px;
  }
  #home h1 {
    font-size: 1.8rem;
  }
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.4rem;
  }
  article {
    padding: 1rem;
    margin: 1rem 0;
  }
}

/* 工具类：延迟动画 */
section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }
section:nth-child(6) { animation-delay: 0.6s; }
section:nth-child(7) { animation-delay: 0.7s; }

/* 新闻时间标签 */
article p:first-of-type {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.5rem;
}

@media (prefers-color-scheme: light) {
  article p:first-of-type {
    color: #999;
  }
}

/* 联系信息样式 */
#contact p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

/* 案例展示额外效果 */
#cases article {
  border-left: 4px solid #764ba2;
}

/* 产品中心特殊标记 */
#products article {
  border-left: 4px solid #667eea;
}

/* 品牌介绍卡片 */
#brand article {
  border-left: 4px solid #f093fb;
}