/* ========== CMS Template - Nous Ling Fin ==========
   紫黑色调 · 手机APP游戏 & 掌机游戏 · 响应式静态模板
   ========== */

/* ----- Design Tokens ----- */
:root {
  --primary: #6B21A8;
  --primary-dark: #3B0764;
  --primary-deeper: #1E0333;
  --accent: #A855F7;
  --accent-glow: #C084FC;
  --bg: #0A0612;
  --bg-card: #150D24;
  --bg-card-hover: #1E1438;
  --bg-surface: #120B22;
  --text: #F0E6FF;
  --text-muted: #9C84B8;
  --text-dim: #6B5A82;
  --border: #2D1F47;
  --border-light: #3E2C66;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 4px 24px rgba(107,33,168,0.25);
  --shadow-lg: 0 8px 48px rgba(107,33,168,0.35);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --font-body: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --max-width: 1200px;
  --header-h: 64px;
}

/* ----- Reset ----- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body); background: var(--bg);
  color: var(--text); line-height: 1.7; min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-glow); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button, input, textarea { font-family: inherit; }

/* ----- Loader ----- */
.loader {
  position: fixed; inset: 0; z-index: 9999; background: var(--primary-deeper);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-ring {
  width: 48px; height: 48px; border: 4px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { color: var(--text-muted); font-size: 14px; letter-spacing: 2px; }

/* ----- Layout ----- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ----- Header ----- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h); background: rgba(10,6,18,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.site-header.scrolled { background: rgba(10,6,18,0.98); }
.header-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.logo {
  font-size: 20px; font-weight: 800; color: var(--text);
  letter-spacing: 1px; display: flex; align-items: center; gap: 8px;
}
.logo span { color: var(--accent); }
.logo-icon {
  width: 32px; height: 32px; background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--text-muted); padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; transition: all var(--transition);
}
.main-nav a:hover, .main-nav a.active { color: var(--text); background: rgba(168,85,247,0.12); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: var(--radius-sm); font-size: 14px;
  font-weight: 600; cursor: pointer; border: none; transition: all var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; box-shadow: 0 2px 12px rgba(168,85,247,0.3);
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(168,85,247,0.5); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--accent); border: 1px solid var(--border-light);
}
.btn-outline:hover { background: rgba(168,85,247,0.1); border-color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none; background: none; border: none; color: var(--text);
  font-size: 24px; cursor: pointer; padding: 4px;
}
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(10,6,18,0.98); backdrop-filter: blur(20px);
  flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 22px; color: var(--text); padding: 16px 32px;
  transition: color var(--transition);
}
.mobile-menu a:hover { color: var(--accent); }
.mobile-menu .close-menu {
  position: absolute; top: 20px; right: 24px; font-size: 28px;
  background: none; border: none; color: var(--text); cursor: pointer;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--primary-deeper); border-top: 1px solid var(--border);
  padding: 64px 0 32px; margin-top: 80px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; line-height: 1.8; }
.footer-col h4 {
  color: var(--text); font-size: 15px; font-weight: 700; margin-bottom: 20px;
  position: relative; padding-bottom: 10px;
}
.footer-col h4::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 30px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.footer-col a { display: block; color: var(--text-muted); font-size: 14px; padding: 4px 0; transition: color var(--transition); }
.footer-col a:hover { color: var(--accent); padding-left: 4px; }
.footer-bottom {
  max-width: var(--max-width); margin: 40px auto 0; padding: 0 24px;
  border-top: 1px solid var(--border); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { color: var(--text-dim); font-size: 13px; }
.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all var(--transition); font-size: 14px;
}
.social-links a:hover { background: var(--primary); color: #fff; }

/* ----- Hero Slider ----- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  overflow: hidden; margin-top: var(--header-h);
}
.hero-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide .slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero-slide .slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(10,6,18,0.95) 0%, rgba(30,3,51,0.7) 50%, rgba(10,6,18,0.95) 100%);
}
.hero-slide .slide-content {
  position: relative; z-index: 2; max-width: var(--max-width); margin: 0 auto;
  padding: 0 24px; text-align: center;
}
.hero-slide .slide-content > * {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.hero-slide.active .slide-content > * { opacity: 1; transform: translateY(0); }
.hero-slide.active .slide-content > *:nth-child(1) { transition-delay: 0.1s; }
.hero-slide.active .slide-content > *:nth-child(2) { transition-delay: 0.25s; }
.hero-slide.active .slide-content > *:nth-child(3) { transition-delay: 0.4s; }
.hero-slide.active .slide-content > *:nth-child(4) { transition-delay: 0.55s; }
.slide-tag {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  background: rgba(168,85,247,0.2); border: 1px solid rgba(168,85,247,0.3);
  color: var(--accent-glow); font-size: 13px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 20px;
}
.slide-title {
  font-size: clamp(28px, 4.5vw, 56px); font-weight: 800; line-height: 1.2;
  margin-bottom: 16px; color: var(--text);
}
.slide-subtitle {
  font-size: clamp(14px, 2vw, 20px); color: var(--text-muted);
  max-width: 600px; margin: 0 auto 32px; line-height: 1.6;
}
.slide-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Slider Controls */
.slider-controls {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px; z-index: 5;
}
.slider-dots { display: flex; gap: 8px; }
.slider-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--border);
  border: none; cursor: pointer; transition: all var(--transition);
}
.slider-dot.active { background: var(--accent); width: 30px; border-radius: 5px; }
.slider-arrow {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1px solid var(--border);
  color: var(--text); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.slider-arrow:hover { background: rgba(168,85,247,0.2); border-color: var(--accent); }
.slider-progress {
  position: absolute; bottom: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease; z-index: 5;
}

/* ----- Section Common ----- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-surface); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 {
  font-size: clamp(24px, 3vw, 36px); font-weight: 800; margin-bottom: 12px;
}
.section-header p { color: var(--text-muted); font-size: 16px; max-width: 560px; margin: 0 auto; }

/* ----- Buttons ----- */
.btn-block { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ----- Product Grid ----- */
.products-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition); cursor: pointer;
}
.product-card:hover {
  border-color: var(--border-light); transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-thumb {
  position: relative; width: 100%; aspect-ratio: 16/10;
  background-size: cover; background-position: center; overflow: hidden;
}
.card-thumb .badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 12px;
  border-radius: 20px; font-size: 12px; font-weight: 700;
  background: var(--primary); color: #fff;
}
.card-thumb .badge-hot { background: linear-gradient(135deg, #EF4444, #F59E0B); }
.card-body { padding: 20px; }
.card-body h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card-body p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; align-items: center; }
.card-price { font-size: 20px; font-weight: 800; color: var(--accent-glow); }
.card-price .from { font-size: 13px; color: var(--text-dim); text-decoration: line-through; margin-left: 6px; font-weight: 400; }
.card-rating { display: flex; align-items: center; gap: 4px; color: var(--warning); font-size: 13px; }

/* ----- Product Detail ----- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 32px; }
.detail-gallery { display: flex; flex-direction: column; gap: 16px; }
.detail-main-img {
  width: 100%; aspect-ratio: 16/10; border-radius: var(--radius-lg);
  background-size: cover; background-position: center; border: 1px solid var(--border);
}
.thumb-row { display: flex; gap: 12px; }
.thumb-item {
  width: 80px; height: 50px; border-radius: var(--radius-sm);
  border: 2px solid transparent; cursor: pointer;
  background-size: cover; background-position: center; transition: border-color var(--transition);
}
.thumb-item:hover, .thumb-item.active { border-color: var(--accent); }
.detail-info h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; line-height: 1.3; }
.detail-info .detail-price {
  font-size: 32px; font-weight: 800; color: var(--accent-glow); margin-bottom: 20px;
}
.detail-info .detail-desc { color: var(--text-muted); line-height: 1.8; margin-bottom: 28px; }
.spec-list { margin-bottom: 28px; }
.spec-item {
  display: flex; justify-content: space-between; padding: 12px 0;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.spec-item .spec-label { color: var(--text-dim); }
.spec-item .spec-val { color: var(--text); font-weight: 600; }

/* ----- News ----- */
.news-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.news-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition); cursor: pointer;
}
.news-card:hover { border-color: var(--border-light); transform: translateY(-3px); box-shadow: var(--shadow); }
.news-thumb {
  width: 100%; aspect-ratio: 16/9; background-size: cover; background-position: center;
}
.news-body { padding: 20px; }
.news-category {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  background: rgba(168,85,247,0.15); color: var(--accent);
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.news-body h3 { font-size: 17px; font-weight: 700; margin: 12px 0 8px; line-height: 1.4; }
.news-body p { color: var(--text-muted); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta {
  display: flex; gap: 16px; margin-top: 12px; font-size: 13px; color: var(--text-dim);
}

/* ----- News Detail ----- */
.news-detail-header { margin-bottom: 32px; }
.news-detail-header h1 {
  font-size: clamp(24px, 3vw, 32px); font-weight: 800; line-height: 1.3; margin-bottom: 16px;
}
.news-detail-meta {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  color: var(--text-muted); font-size: 14px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.news-detail-meta .meta-item { display: flex; align-items: center; gap: 6px; }
.news-detail-content {
  max-width: 720px; margin: 32px auto 0; line-height: 1.9;
  font-size: 16px; color: var(--text);
}
.news-detail-content p { margin-bottom: 20px; }
.news-detail-content h3 { font-size: 22px; margin: 32px 0 16px; }
.news-detail-content img { border-radius: var(--radius-md); margin: 16px 0; }

/* ----- Contact ----- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 32px; }
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon {
  width: 48px; height: 48px; min-width: 48px; border-radius: var(--radius-md);
  background: rgba(168,85,247,0.15); display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--accent);
}
.contact-item h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.contact-item p, .contact-item a { color: var(--text-muted); font-size: 14px; }
.contact-form {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--bg-surface); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group .error-msg { color: var(--danger); font-size: 12px; margin-top: 4px; display: none; }
.form-group.has-error .error-msg { display: block; }
.form-group.has-error input, .form-group.has-error textarea { border-color: var(--danger); }

/* ----- About ----- */
.about-hero { text-align: center; padding: 80px 0 48px; }
.about-hero h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-bottom: 16px; }
.about-hero p { color: var(--text-muted); font-size: 18px; max-width: 600px; margin: 0 auto; }
.about-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 48px 0;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; text-align: center;
  transition: all var(--transition);
}
.stat-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.stat-number { font-size: 36px; font-weight: 800; color: var(--accent-glow); }
.stat-label { color: var(--text-muted); font-size: 14px; margin-top: 8px; }
.about-mission {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px; margin-top: 48px;
}
.about-mission h3 { font-size: 22px; margin-bottom: 16px; }
.about-mission p { color: var(--text-muted); line-height: 1.8; }

/* ----- FAQ ----- */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:hover { border-color: var(--border-light); }
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; cursor: pointer; font-weight: 600; font-size: 15px;
}
.faq-q .icon { font-size: 20px; color: var(--accent); transition: transform var(--transition); }
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-muted); font-size: 14px; line-height: 1.8; padding: 0 20px;
}
.faq-item.open .faq-a { max-height: 300px; padding: 0 20px 20px; }

/* ----- CTA ----- */
.cta-section {
  text-align: center; padding: 80px 24px;
  background: linear-gradient(135deg, var(--primary-deeper), var(--primary), var(--primary-dark));
  border-radius: var(--radius-xl); margin: 0 -24px 80px;
}
.cta-section h2 { font-size: clamp(24px, 3vw, 36px); margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,0.8); font-size: 18px; max-width: 560px; margin: 0 auto 32px; }

/* ----- Pagination ----- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text-muted); transition: all var(--transition);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ----- Not Found ----- */
.not-found { text-align: center; padding: 120px 24px; }
.not-found .code { font-size: 120px; font-weight: 800; color: var(--primary); opacity: 0.3; }
.not-found h2 { font-size: 28px; margin: 16px 0 12px; }
.not-found p { color: var(--text-muted); margin-bottom: 32px; }

/* ----- Utility ----- */
.text-center { text-align: center; }
.mt-24 { margin-top: 24px; }
.mt-48 { margin-top: 48px; }
.mt-80 { margin-top: 80px; }
.hidden { display: none !important; }

/* ----- Reduced Motion ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .hero-slide .slide-content > * { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ----- Desktop > 900px ----- */
@media (min-width: 901px) {
  .menu-toggle { display: none; }
  .main-nav { display: flex; }
  .mobile-menu { display: none !important; }
}

/* ----- Tablet <= 900px ----- */
@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .main-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .product-detail { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ----- Mobile <= 640px ----- */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .header-inner { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .about-stats { grid-template-columns: 1fr; }
  .hero { min-height: 80vh; }
  .slide-btns { flex-direction: column; align-items: center; }
  .cta-section { margin: 0 -16px 60px; padding: 48px 16px; }
  .products-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 20px; }
}

/* ===== EyouCMS {eyou:pagelist/} 补充（输出裸 li） ===== */
.pagination li { list-style: none; display: inline-block; margin: 0; }
.pagination li a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 14px; font-weight: 600; transition: all var(--transition); }
.pagination li a:hover { border-color: var(--accent); color: var(--accent); }
.pagination li.active a { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination strong { color: var(--text); font-weight: 600; margin: 0 4px; }
