/* ============================================
   快喵VPN 官网 - 主站样式
   设计风格：科技蓝 + 橙色CTA，现代精致
   ============================================ */

/* ---------- CSS 变量 ---------- */
:root {
  /* 主色 */
  --color-primary: #1a56db;
  --color-primary-dark: #1e40af;
  --color-primary-light: #3b82f6;
  --color-accent: #f97316;
  --color-accent-dark: #ea580c;

  /* 中性色 */
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-dark: #0f172a;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-text-inverse: #ffffff;
  --color-border: #e2e8f0;

  /* 功能色 */
  --color-success: #22c55e;
  --color-warning: #facc15;

  /* 字体 */
  --font-sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  /* 间距 */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --shadow-primary: 0 8px 24px rgba(26, 86, 219, 0.3);

  /* 布局 */
  --container-max: 1200px;
  --nav-height: 64px;

  /* 过渡 */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 重置 ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

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

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

ul {
  list-style: none;
}

/* ---------- 布局工具 ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

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

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ---------- 排版 ---------- */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.section-dark h1,
.section-dark h2,
.section-dark h3 {
  color: var(--color-text-inverse);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin-bottom: var(--space-sm);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-title h2 {
  margin-bottom: var(--space-sm);
}

.section-title p {
  color: var(--color-text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-logo svg {
  width: 28px;
  height: 28px;
}

.nav-menu {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav-menu a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

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

.nav-menu a.active {
  color: var(--color-primary);
}

.nav-menu a.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--space-xs);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-text-inverse);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(26, 86, 219, 0.4);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-text-inverse);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3);
}

.btn-accent:hover {
  background: var(--color-accent-dark);
  color: var(--color-text-inverse);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-white {
  background: var(--color-text-inverse);
  color: var(--color-primary);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--color-primary-dark);
}

.btn-lg {
  padding: 1rem 2.4rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.875rem;
}

/* ---------- Hero 区 ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-height) + var(--space-2xl)) 0 var(--space-2xl);
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1a56db 100%);
  color: var(--color-text-inverse);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-content h1 {
  color: var(--color-text-inverse);
  margin-bottom: var(--space-md);
}

.hero-content .hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-lg);
  max-width: 500px;
}

.hero-points {
  display: grid;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
}

.hero-points li::before {
  content: "";
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: var(--color-accent);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.7rem 1.4rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: var(--color-text-inverse);
  font-weight: 500;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}

.download-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-text-inverse);
  transform: translateY(-2px);
}

.download-btn svg {
  width: 22px;
  height: 22px;
}

.download-btn span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.download-btn small {
  font-size: 0.7rem;
  opacity: 0.7;
}

.hero-image {
  position: relative;
  text-align: center;
}

.hero-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ---------- 特色卡片 ---------- */
.feature-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: white;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-card h3 {
  margin-bottom: var(--space-xs);
}

.feature-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ---------- 为什么选择卡片 ---------- */
.reason-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.reason-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.reason-number {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.reason-card h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}

.reason-card p {
  color: var(--color-text-light);
  font-size: 0.92rem;
}

/* ---------- FAQ 手风琴 ---------- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
  background: var(--color-bg);
  transition: box-shadow var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-text);
  user-select: none;
}

.faq-question .faq-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  transition: transform var(--transition);
  color: var(--color-primary);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 var(--space-md);
  color: var(--color-text-light);
  line-height: 1.8;
}

.faq-item.active .faq-answer {
  max-height: 600px;
  padding: 0 var(--space-md) var(--space-md);
}

/* ---------- 用户评价 ---------- */
.testimonial-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.testimonial-stars {
  color: var(--color-warning);
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
  letter-spacing: 2px;
}

.testimonial-text {
  color: var(--color-text);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
  flex-grow: 1;
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
}

.testimonial-author-info h4 {
  font-size: 1rem;
  margin-bottom: 0;
}

.testimonial-author-info span {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* ---------- CTA 区 ---------- */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-inverse);
  text-align: center;
  padding: var(--space-2xl) 0;
}

.cta-section h2 {
  color: var(--color-text-inverse);
  margin-bottom: var(--space-sm);
}

.cta-section p {
  font-size: 1.15rem;
  margin-bottom: var(--space-lg);
  opacity: 0.9;
}

/* ---------- 下载页平台卡片 ---------- */
.platform-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.platform-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.platform-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
}

.platform-icon svg {
  width: 40px;
  height: 40px;
}

.platform-card h3 {
  margin-bottom: var(--space-xs);
}

.platform-card p {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

/* ---------- 特性列表页 ---------- */
.feature-group {
  margin-bottom: var(--space-xl);
}

.feature-group h2 {
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--color-primary);
  display: inline-block;
}

.feature-list-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

.feature-list-item:hover {
  background: var(--color-bg-alt);
}

.feature-list-item .feature-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-sm);
}

.feature-list-item .feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-list-item h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.feature-list-item p {
  color: var(--color-text-light);
  font-size: 0.92rem;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: calc(var(--nav-height) + var(--space-lg)) 0 var(--space-sm);
  background: var(--color-bg-alt);
}

.breadcrumb ol {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.breadcrumb li::after {
  content: "/";
  margin-left: var(--space-xs);
  color: var(--color-border);
}

.breadcrumb li:last-child::after {
  content: "";
}

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

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

.breadcrumb li:last-child {
  color: var(--color-text);
  font-weight: 500;
}

/* ---------- 页面头部 ---------- */
.page-header {
  padding: var(--space-xl) 0;
  text-align: center;
  background: var(--color-bg-alt);
}

.page-header h1 {
  margin-bottom: var(--space-sm);
}

.page-header p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- 页脚 ---------- */
.footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand .nav-logo {
  color: white;
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-col h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.footer-col ul {
  display: grid;
  gap: var(--space-xs);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  text-align: center;
  font-size: 0.85rem;
}

/* ---------- 滚动渐入动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --space-2xl: 4rem;
    --space-xl: 2.5rem;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-sm);
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    transition: transform var(--transition);
    height: auto;
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .nav-toggle {
    display: flex;
  }

  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    order: 2;
  }

  .hero-image {
    order: 1;
  }

  .hero-points {
    text-align: left;
    max-width: 400px;
    margin: 0 auto var(--space-lg);
  }

  .download-buttons {
    justify-content: center;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .reason-card {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .download-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .download-btn {
    justify-content: center;
  }

  .btn {
    width: 100%;
  }
}
