:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #ec4899;
  --text-main: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg-body: #f3f4f6;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --radius-lg: 1rem;
  --radius-md: 0.5rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --container-width: 1200px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 5rem 0; }
.text-center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
}

/* Hero */
.hero {
  padding: 6rem 0;
  background: radial-gradient(circle at top right, #e0e7ff, transparent 40%),
              radial-gradient(circle at bottom left, #fce7f3, transparent 40%);
  overflow: hidden;
}
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-text h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
  display: block;
}
.hero-desc {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 540px;
}
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.2s;
  gap: 0.5rem;
}
.btn img { width: 20px; height: 20px; }
.btn-primary {
  background-color: var(--text-main);
  color: white;
}
.btn-primary:hover {
  background-color: black;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn.baidu { background-color: #06a7ff; color: white; }
.btn.baidu:hover { background-color: #0095ea; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(6, 167, 255, 0.3); }
.btn.quark { background-color: #008aff; color: white; } /* Adjust Quark color if needed */
.btn.quark:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 138, 255, 0.3); }

.btn-ghost {
  color: var(--text-muted);
}
.btn-ghost:hover {
  color: var(--primary);
  background-color: rgba(79, 70, 229, 0.05);
}
.hero-media {
  position: relative;
}
.hero-img {
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
  transition: transform 0.5s ease;
}
.hero-img:hover {
  transform: perspective(1000px) rotateY(0) rotateX(0);
}

/* Features */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.feature-card {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}
.feature-desc {
  color: var(--text-muted);
}

/* Gallery */
.gallery-scroll {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding: 2rem 1.5rem;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.gallery-scroll::-webkit-scrollbar { display: none; }
.gallery-item {
  flex: 0 0 auto;
  width: 280px;
  scroll-snap-align: center;
}
.gallery-item img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s;
}
.gallery-item:hover img {
  transform: scale(1.05);
}

/* Posts */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
.post-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.post-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-date {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}
.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.post-summary {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex: 1;
}
.post-link {
  color: var(--primary);
  font-weight: 600;
  margin-top: auto;
}

/* Promotions (Friends) */
.promotions-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}
.promo-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}
.promo-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.promo-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.promo-title {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Comments */
.comments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.comment-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}
.comment-user {
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.comment-user::before {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
}
.comment-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-style: italic;
}

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
  .hero-btns { justify-content: center; }
  .hero-text h1 { font-size: 2.5rem; }
  .header-inner { height: 4rem; }
  .section { padding: 3rem 0; }
  .gallery-scroll { padding: 1rem 1.5rem; }
}
