:root {
  /* Color Palette - Modern & Clean */
  --primary: #0ea5e9;
  --primary-hover: #0284c7;
  --primary-light: #e0f2fe;
  
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-glass: rgba(255, 255, 255, 0.9);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  
  /* Brand Colors */
  --brand-baidu: #06A7FF;
  --brand-quark: #2468f2;
  
  /* Spacing & Layout */
  --container-width: 1200px;
  --header-height: 70px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-primary: 0 10px 25px -5px rgba(14, 165, 233, 0.4);
  
  /* Transitions */
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background: var(--bg-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Layout */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(var(--container-width), 92%);
  margin: 0 auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
  letter-spacing: -0.025em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  align-items: center;
}

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

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  background: radial-gradient(circle at 50% 0%, var(--primary-light), transparent 70%);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 60px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.eyebrow {
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 16px;
  display: inline-block;
  background: rgba(14, 165, 233, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1.1;
  font-weight: 800;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-main) 0%, #334155 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 32px;
  max-width: 540px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  padding: 14px 28px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  gap: 10px;
  transition: var(--transition-base);
  cursor: pointer;
}

.btn-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn.primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 15px 30px -5px rgba(14, 165, 233, 0.5);
  transform: translateY(-2px);
}

.btn.ghost {
  background: white;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn.ghost:hover {
  border-color: var(--text-muted);
  background: #f1f5f9;
}

.btn.baidu {
  background: var(--brand-baidu);
  color: white;
  box-shadow: 0 10px 20px -5px rgba(6, 167, 255, 0.4);
}

.btn.baidu:hover {
  background: #0095ea;
  transform: translateY(-2px);
}

.btn.quark {
  background: var(--brand-quark);
  color: white;
  box-shadow: 0 10px 20px -5px rgba(36, 104, 242, 0.4);
}

.btn.quark:hover {
  background: #1c5adb;
  transform: translateY(-2px);
}

.hero-media {
  position: relative;
  z-index: 1;
}

.hero-media::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15), transparent 70%);
  z-index: -1;
  filter: blur(40px);
}

.hero-image {
  width: auto;
  max-width: min(100%, 560px);
  margin: 0 auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
  transition: transform 0.5s ease;
}

.hero-image:hover {
  transform: translateY(-10px) rotate(1deg);
}

/* Sections */
.features, .comments, .posts, .promotions, .gallery {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin: 0 0 48px;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

/* Cards Grid */
.feature-grid, .comment-grid, .post-grid, .gallery-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.feature-card, .comment-card, .post-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.feature-title, .comment-title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.feature-desc, .comment-desc {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Post Card Specifics */
.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.4;
}

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

.post-meta {
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-summary {
  margin: 0 0 24px;
  color: var(--text-muted);
  flex: 1;
}

.post-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-link:hover {
  gap: 8px;
}

/* Gallery */
.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  justify-items: center;
}

.gallery-img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
  width: auto;
  max-width: min(100%, 315px);
}

.gallery-img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

/* Carousel */
.carousel-container {
  position: relative;
  max-width: 100%;
}

.carousel-track-container {
  overflow: hidden;
  padding: 20px 4px 40px; /* Add padding for shadow clipping */
  margin: 0 -4px;
}

.carousel-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 0;
  margin: 0;
  list-style: none;
  scroll-snap-type: x mandatory;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 calc((100% - 48px) / 3);
  min-width: 0;
  scroll-snap-align: start;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  z-index: 10;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary);
  transition: var(--transition-base);
}

.carousel-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.carousel-btn.prev-btn { left: -24px; }
.carousel-btn.next-btn { right: -24px; }

/* Promotion Card */
.promotion-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border-color);
  transition: var(--transition-base);
  height: 100%;
}

.promotion-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.promotion-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.promotion-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

/* CTA Section */
.cta {
  padding: 60px 0 100px;
}

.cta-card {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: 60px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.cta-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.2), transparent 70%);
  pointer-events: none;
}

.cta-title {
  margin: 0 0 16px;
  font-size: 2.5rem;
  font-weight: 800;
}

.cta-desc {
  margin: 0;
  color: #cbd5f5;
  font-size: 1.125rem;
  max-width: 500px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Article Page */
.article {
  padding: 60px 0 100px;
}

.article-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 60px;
  border: 1px solid var(--border-color);
  max-width: 900px;
  margin: 0 auto;
}

.article-title {
  margin: 0 0 24px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-main);
}

.article-meta {
  margin: 0 0 40px;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.article-content {
  line-height: 1.9;
  color: #334155;
  font-size: 1.125rem;
}

.article-content h2 {
  margin: 48px 0 24px;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
}

.article-content h3 {
  margin: 32px 0 16px;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-main);
}

.article-content p {
  margin: 0 0 24px;
}

.article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-content img {
  border-radius: var(--radius-md);
  margin: 32px auto;
  box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
  background: var(--bg-surface);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .carousel-slide {
    flex: 0 0 calc((100% - 24px) / 2);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .header {
    height: 60px;
  }
  
  .nav-links {
    display: none; /* Mobile menu behavior can be improved if JS allowed */
  }
  
  /* Show only download button on mobile header if needed, or hide all */
  /* Or a simplified mobile nav */
  
  .hero {
    padding: 40px 0;
  }
  
  /* .hero-grid styles moved to 1024px breakpoint */

  .section-title {
    font-size: 1.75rem;
    margin-bottom: 32px;
  }
  
  .cta-card {
    flex-direction: column;
    padding: 32px;
    text-align: center;
    gap: 24px;
  }
  
  .cta-desc {
    margin: 0 auto;
  }
  
  .cta-buttons {
    justify-content: center;
    width: 100%;
  }
  
  .btn {
    width: 100%;
  }
  
  .carousel-slide {
    flex: 0 0 calc(100% - 16px);
  }
  
  .article-card {
    padding: 24px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: transparent;
  }
  
  .article {
    padding: 20px 0;
  }
}
