/**
 * =====================================
 *         UI Design Guide
 * =====================================
 * 
 * Project: 杭州盟发ADX 程序化广告平台
 * Type: SaaS Platform
 * 
 * Design Language
 * Style: Modern · Professional · Intuitive
 * Vision: 专业的程序化广告技术平台，展现技术实力与品牌信任感
 * 
 * Characteristics:
 * - Modern: 简洁界面与合理留白
 * - Professional: 清晰排版和结构化布局
 * - Dynamic: 战略性色彩强调重点行动
 * 
 * Philosophy:
 * 打造专业可信赖的平台形象，平衡技术感与易用性，
 * 为广告主和媒体方提供直观高效的使用体验。
 * 
 * Reference: 现代SaaS平台与广告技术产品
 * =====================================
 */

/* Reset & Base Styles */
:root {
  /* 颜色系统 */
  --background: #ffffff;
  --foreground: #212936;
  --card: #ffffff;
  --card-foreground: #212936;
  --border: #e4e7ec;
  --input: #e4e7ec;
  
  --primary: #3360ff;
  --primary-foreground: #ffffff;
  --primary-light: rgba(51, 96, 255, 0.1);
  
  --secondary: #f7f9fc;
  --secondary-foreground: #303c4c;
  
  --accent: #7b44f2;
  --accent-foreground: #ffffff;
  --accent-light: rgba(123, 68, 242, 0.1);
  
  --muted: #f7f9fc;
  --muted-foreground: #6b7280;
  
  --destructive: #ff4d4f;
  --destructive-foreground: #ffffff;
  
  /* 尺寸相关 */
  --radius: 0.5rem;
  --container-width: 1200px;
  --header-height: 4rem;
  
  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05);
  
  /* 过渡 */
  --transition: all 0.2s ease;
  
  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Dark Mode Theme - 保留但默认不启用 */
.dark-theme {
  --background: #121826;
  --foreground: #f3f4f6;
  --card: #1a2234;
  --card-foreground: #f3f4f6;
  --border: #2a3441;
  --input: #2a3441;
  
  --primary: #4d74ff;
  --primary-light: rgba(77, 116, 255, 0.15);
  
  --secondary: #21293b;
  --secondary-foreground: #f3f4f6;
  
  --accent: #9c6cff;
  --accent-light: rgba(156, 108, 255, 0.15);
  
  --muted: #21293b;
  --muted-foreground: #9ca3af;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--foreground);
  background-color: var(--background);
  line-height: 1.5;
  font-size: 16px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.5rem; /* 40px */
}

h2 {
  font-size: 2rem; /* 32px */
}

h3 {
  font-size: 1.5rem; /* 24px */
}

h4 {
  font-size: 1.25rem; /* 20px */
}

/* 通用工具类 */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.gradient-text {
  background: linear-gradient(to right, var(--primary), var(--accent), var(--primary));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  display: inline-block;
}

.hero-gradient {
  position: relative;
  background: radial-gradient(circle at top, rgba(123, 68, 242, 0.15), transparent 80%),
              radial-gradient(circle at bottom, rgba(51, 96, 255, 0.1), transparent 60%);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
}

.btn-primary:hover {
  background-color: var(--primary);
  filter: brightness(110%);
}

.btn-secondary {
  background-color: white;
  color: var(--primary);
  border: none;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

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

.btn-outline:hover {
  background-color: var(--secondary);
  border-color: var(--border);
}

.btn-outline-light {
  background-color: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 头部导航 */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 50;
  border-bottom: 1px solid rgba(var(--border), 0.4);
  background-color: rgba(var(--background), 0.95);
  backdrop-filter: blur(8px);
  height: var(--header-height);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
}

.logo-icon {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 0.375rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: bold;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground-muted, rgba(33, 41, 54, 0.7));
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--foreground);
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--foreground);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-height);
  right: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background-color: var(--background);
  padding: 1.5rem;
  flex-direction: column;
  z-index: 40;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0);
  display: flex;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-buttons {
  margin-top: auto;
  padding-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 主要内容部分 */

/* Hero Section */
.hero {
  padding: 6rem 1rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .hero {
    padding: 8rem 1rem;
  }
  
  .hero-content {
    flex-direction: row;
    align-items: center;
  }
  
  .hero-text, .hero-image {
    width: 50%;
  }
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-subtitle {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--muted-foreground);
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
  }
}

.users-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.users-avatars {
  display: flex;
}

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--background);
  overflow: hidden;
  margin-left: -0.5rem;
}

.avatar:first-child {
  margin-left: 0;
}

.users-count {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.users-count span {
  font-weight: 500;
  color: var(--foreground);
}

.hero-image {
  position: relative;
}

.glow-effect {
  position: absolute;
  border-radius: 50%;
  filter: blur(24px);
  z-index: -1;
}

.glow-1 {
  top: -1rem;
  left: -1rem;
  width: 18rem;
  height: 18rem;
  background-color: rgba(123, 68, 242, 0.1);
}

.glow-2 {
  bottom: -1rem;
  right: -1rem;
  width: 18rem;
  height: 18rem;
  background-color: rgba(51, 96, 255, 0.1);
}

.image-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
}

/* Stats Section */
.stats-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 5rem;
}

@media (min-width: 768px) {
  .stats-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

.stat-value {
  font-size: 1.875rem;
  font-weight: bold;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.section-header p {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--muted-foreground);
}

/* Features Section */
.features {
  padding: 5rem 1rem;
}

@media (min-width: 768px) {
  .features {
    padding: 6rem 1rem;
  }
}

.tabs {
  width: 100%;
}

.tab-header {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--muted-foreground);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  position: relative;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.feature-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

@media (min-width: 768px) {
  .feature-grid {
    flex-direction: row;
    gap: 2rem;
    align-items: center;
  }
  
  .feature-text, .feature-image {
    width: 50%;
  }
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-text h3 {
  font-size: 1.5rem;
}

.feature-text p {
  color: var(--muted-foreground);
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.feature-list li svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.feature-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.monetization-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* Card Styles */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-icon-wrapper {
  background-color: var(--primary-light);
  width: fit-content;
  padding: 0.5rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.card-icon-wrapper svg {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--primary);
}

.card h3, .card h4 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Benefits Section */
.benefits {
  padding: 5rem 1rem;
  background-color: var(--secondary);
}

@media (min-width: 768px) {
  .benefits {
    padding: 6rem 1rem;
  }
}

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

@media (min-width: 640px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Ad Formats Section */
.ad-formats {
  padding: 5rem 1rem;
}

@media (min-width: 768px) {
  .ad-formats {
    padding: 6rem 1rem 8rem;
  }
}

.ad-formats-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
}

@media (min-width: 640px) {
  .ad-formats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .ad-formats-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Partners Section */
.partners {
  padding: 5rem 1rem;
  background-color: var(--secondary);
}

@media (min-width: 768px) {
  .partners {
    padding: 6rem 1rem;
  }
}

.partners-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.partner-section h3 {
  text-align: center;
  margin-bottom: 2rem;
}

.partner-count {
  font-size: 1rem;
  font-weight: normal;
  color: var(--muted-foreground);
}

.partner-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.partner-item {
  padding: 1rem 1.5rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 1.125rem;
  box-shadow: var(--shadow-sm);
}

/* Testimonials */
.testimonials {
  padding: 5rem 1rem;
  background-color: var(--secondary);
}

@media (min-width: 768px) {
  .testimonials {
    padding: 6rem 1rem;
  }
}

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

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow-sm);
}

.testimonial-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
}

.testimonial-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  overflow: hidden;
}

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

.testimonial-author p {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.testimonial-content {
  flex-grow: 1;
  padding-bottom: 1.5rem;
}

.testimonial-content p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.testimonial-rating {
  color: var(--primary);
  display: flex;
}

.star {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

/* FAQ Section */
.faq {
  padding: 5rem 1rem 8rem;
}

@media (min-width: 768px) {
  .faq {
    padding: 6rem 1rem 8rem;
  }
}

.accordion {
  max-width: 48rem;
  margin: 0 auto;
}

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  background: transparent;
  border: none;
  text-align: left;
  font-weight: 500;
  cursor: pointer;
  font-size: 1rem;
}

.accordion-header svg {
  transition: transform 0.2s ease;
}

.accordion-item.active .accordion-header svg {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.accordion-item.active .accordion-content {
  max-height: 300px;
}

.accordion-content p {
  padding: 0 0 1.25rem;
  color: var(--muted-foreground);
}

/* CTA Section */
.cta {
  padding: 5rem 1rem;
}

@media (min-width: 768px) {
  .cta {
    padding: 6rem 1rem;
  }
}

.cta-container {
  border-radius: 1rem;
  background: linear-gradient(to bottom right, var(--primary), var(--accent));
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .cta-container {
    padding: 3rem;
  }
}

@media (min-width: 1024px) {
  .cta-container {
    padding: 4rem;
  }
}

.cta-content {
  position: relative;
  z-index: 1;
  color: white;
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
}

.cta-content p {
  margin-top: 1rem;
  opacity: 0.9;
}

.cta-buttons {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .cta-buttons {
    flex-direction: row;
  }
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background-color: var(--secondary);
  padding: 3rem 1rem;
}

@media (min-width: 768px) {
  .footer {
    padding: 4rem 1rem;
  }
}

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

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.company-description {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  max-width: 20rem;
}

.footer-links h3 {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--foreground);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.copyright {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-link {
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.social-link:hover {
  color: var(--foreground);
}

/* 响应式调整 */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .desktop-nav, .desktop-only {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
}