/* ============================================================
   style.css — KAIYUN Official (开云网页版 开云中国官方网站)
   完整样式表 · 暗色/亮色主题 · 响应式 · 动画
   ============================================================ */

/* ---------- 全局重置 & 变量 ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #0b0e1a;
  color: #e4e7f0;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

:root {
  --bg-primary: #0b0e1a;
  --bg-secondary: #12162a;
  --bg-card: #1a1f35;
  --bg-glass: rgba(26, 31, 53, 0.55);
  --text-primary: #e4e7f0;
  --text-secondary: #9ca3c2;
  --accent: #f0c040;
  --accent2: #6c7ae0;
  --accent3: #4a9eff;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  --radius: 20px;
  --radius-sm: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1280px;
}

.light {
  --bg-primary: #f5f7fc;
  --bg-secondary: #eef1f8;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --text-primary: #1a1f35;
  --text-secondary: #4a5078;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ---------- 基础元素 ---------- */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

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

/* ---------- 容器 & 布局 ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0 80px;
}

.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.glass-light {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 60px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--accent);
  color: #0b0e1a;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(240, 192, 64, 0.3);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #0b0e1a;
}

/* ---------- 文字 ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 16px;
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

p {
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 16px;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 60px;
  background: rgba(240, 192, 64, 0.12);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}

/* ---------- 网格 ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

/* ---------- 辅助类 ---------- */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-center {
  text-align: center;
}

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

/* ---------- Header ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 12px 0;
  background: rgba(11, 14, 26, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--transition);
}

.light header {
  background: rgba(245, 247, 252, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent), #f5d77f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
  text-decoration: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

.menu-toggle span {
  width: 28px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 4px;
  transition: var(--transition);
}

.theme-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 40px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.2rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.search-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
  transition: color var(--transition);
}

.search-btn:hover {
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero h1 {
  background: linear-gradient(135deg, #fff 20%, var(--accent) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  margin: 24px 0 36px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Banner Slider ---------- */
.banner-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  height: 420px;
  margin-top: 60px;
  background: var(--bg-card);
}

.banner-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.8s ease;
  padding: 40px;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide svg {
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: contain;
}

.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 5;
}

.banner-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: var(--transition);
}

.banner-dots span.active {
  background: var(--accent);
  transform: scale(1.2);
}

/* ---------- Card ---------- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(240, 192, 64, 0.2);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.card-icon {
  margin-bottom: 20px;
  width: 56px;
  height: 56px;
  background: rgba(240, 192, 64, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  font-size: 0.95rem;
}

/* ---------- Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
}

.stat-item {
  text-align: center;
  padding: 32px 16px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ---------- Testimonials ---------- */
.testimonial-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  font-size: 4rem;
  color: var(--accent);
  opacity: 0.2;
  position: absolute;
  top: 10px;
  left: 20px;
  font-family: serif;
}

.testimonial-card p {
  font-style: italic;
  margin-bottom: 16px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testimonial-author svg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px 0;
  cursor: pointer;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
}

.faq-question span {
  transition: transform var(--transition);
}

.faq-item.open .faq-question span {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding-top: 0;
  color: var(--text-secondary);
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-top: 16px;
}

/* ---------- Footer ---------- */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 40px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color var(--transition);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 24px;
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-bottom a {
  color: var(--text-secondary);
  margin-left: 16px;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--accent);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding: 12px 0;
}

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

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

.breadcrumb span {
  color: var(--text-primary);
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0e1a;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(240, 192, 64, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 50;
}

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

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(240, 192, 64, 0.4);
}

/* ---------- Mobile Navigation ---------- */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 80px 32px;
    gap: 24px;
    transition: right 0.4s ease;
    z-index: 200;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.6);
  }

  .nav-links.open {
    right: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .banner-slider {
    height: 280px;
  }

  .section {
    padding: 60px 0 40px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
  }
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

/* ---------- Misc ---------- */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-modal.open {
  display: flex;
}

.search-modal input {
  width: 90%;
  max-width: 600px;
  padding: 18px 24px;
  border-radius: 60px;
  border: none;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1.2rem;
  outline: 2px solid var(--accent);
}

.search-modal input::placeholder {
  color: var(--text-secondary);
}

.search-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 2rem;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}

.search-close:hover {
  color: var(--accent);
}

/* ---------- Partner Grid ---------- */
.partner-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  align-items: center;
}

.partner-grid svg {
  width: 120px;
  height: 60px;
  opacity: 0.5;
  transition: opacity var(--transition);
}

.partner-grid svg:hover {
  opacity: 1;
}

/* ---------- Related Posts ---------- */
.related-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.related-post {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 24px;
  transition: var(--transition);
}

.related-post:hover {
  background: var(--bg-glass);
}

.related-post h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.related-post .meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 40px;
}

.pagination a {
  padding: 10px 18px;
  border-radius: 40px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}

.pagination a:hover,
.pagination a.active {
  background: var(--accent);
  color: #0b0e1a;
}

/* ---------- Schema Hidden ---------- */
.schema-hidden {
  display: none;
}

/* ---------- Lazy Image ---------- */
.lazy-img {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.lazy-img.loaded {
  opacity: 1;
}

/* ---------- Form Elements ---------- */
input, textarea {
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus, textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(240, 192, 64, 0.15);
}

/* ---------- Friend Links & Sitemap ---------- */
#friends a,
#sitemap a {
  text-decoration: none;
  transition: color var(--transition);
}

#friends a:hover,
#sitemap a:hover {
  color: var(--accent);
}

/* ---------- Print ---------- */
@media print {
  header, .back-to-top, .search-modal, .banner-slider, .hero-bg {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}