/* ==========================================================================
   小旋风官网 (xiaoxuanfeng.xyz) - Design System & Modern Responsive Stylesheet
   Color Palette: Coral Red Theme (#e56b6f, #e06666, #d9534f), Soft White Cards
   ========================================================================== */

:root {
  --primary: #e76f51;
  --primary-hover: #d95d3f;
  --primary-dark: #c84b2c;
  --primary-light: #f4a261;
  --bg-gradient: linear-gradient(135deg, #e56b6f 0%, #e06666 40%, #d9534f 100%);
  --bg-hero: #e06666;
  --text-main: #2b2d42;
  --text-muted: #6c757d;
  --text-white: #ffffff;
  --card-bg: #ffffff;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --card-hover-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
  --border-radius: 16px;
  --border-radius-pill: 50px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --max-width: 1200px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- Reset & Global Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family);
  background-color: #f8f9fa;
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Buttons & UI Elements --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius-pill);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.btn-primary {
  background-color: #ffffff;
  color: var(--primary-hover);
}

.btn-primary:hover {
  background-color: #f1f1f1;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  color: var(--primary-dark);
}

.btn-accent {
  background: var(--bg-gradient);
  color: var(--text-white);
}

.btn-accent:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 107, 111, 0.35);
  color: var(--text-white);
}

.btn-outline {
  background: transparent;
  color: var(--text-white);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
  color: #ffffff;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
}

.badge-sale {
  background-color: #ffe3e3;
  color: #d9534f;
}

/* --- Header / Navbar --- */
.site-header {
  background-color: var(--bg-hero);
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-white);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #ffffff;
  transition: var(--transition);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- Hero Section --- */
.hero-section {
  background-color: var(--bg-hero);
  color: var(--text-white);
  padding: 4rem 0 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  letter-spacing: -1px;
}

.hero-content p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 2.2rem;
  max-width: 580px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.hero-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-illustration svg {
  width: 100%;
  max-width: 420px;
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.15));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

/* --- Features Section (3 Cards from screenshot) --- */
.features-section {
  margin-top: -3.5rem;
  position: relative;
  z-index: 10;
  padding-bottom: 5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.feature-card {
  background: var(--card-bg);
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-hover-shadow);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff0f0;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.feature-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--text-main);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* --- Section Layout --- */
.section {
  padding: 5rem 0;
}

.section-bg-alt {
  background-color: #ffffff;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3.5rem auto;
}

.section-title {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* --- Pricing Section --- */
.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  font-weight: 600;
}

.switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8rem;
}

.pricing-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2.5rem 1.8rem;
  box-shadow: var(--card-shadow);
  border: 1px solid #f0f0f0;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-card.popular {
  border: 2px solid var(--primary);
  transform: scale(1.03);
}

.pricing-card.popular::before {
  content: '热门首选';
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-hover-shadow);
}

.pricing-header h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  margin: 1rem 0;
}

.pricing-price span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

.pricing-features {
  list-style: none;
  margin: 1.5rem 0 2rem 0;
  flex-grow: 1;
}

.pricing-features li {
  padding: 0.5rem 0;
  font-size: 0.92rem;
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pricing-features li svg {
  color: #2e7d32;
  flex-shrink: 0;
}

/* --- Articles Section --- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.article-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-hover-shadow);
}

.article-content {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.article-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  color: var(--text-main);
}

.article-title a {
  color: var(--text-main);
}

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

.article-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.article-footer {
  font-size: 0.85rem;
  color: #a0aec0;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #edf2f7;
  padding-top: 1rem;
}

/* --- Client Downloads Section --- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.2rem;
}

.client-card {
  background: #ffffff;
  padding: 1.8rem 1rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  border: 1px solid #f0f0f0;
  transition: var(--transition);
}

.client-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  border-color: var(--primary-light);
}

.client-icon {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
}

.client-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.client-platform {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.testimonial-card {
  background: #ffffff;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  position: relative;
}

.testimonial-rating {
  color: #ffb703;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.testimonial-text {
  font-size: 0.95rem;
  color: #4a5568;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.user-info h5 {
  font-size: 0.95rem;
  font-weight: 700;
}

.user-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- FAQ Section --- */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: #ffffff;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  border: 1px solid #edf2f7;
  overflow: hidden;
}

.faq-question {
  padding: 1.3rem 1.8rem;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.faq-question:hover {
  background-color: #fafafa;
  color: var(--primary);
}

.faq-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
  padding: 0 1.8rem;
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  padding: 0 1.8rem 1.5rem 1.8rem;
}

/* --- Footer (Core Task 2 PBN Requirements) --- */
.site-footer {
  background-color: #1a1c23;
  color: #a0aec0;
  padding: 4rem 0 2rem 0;
  font-size: 0.9rem;
}

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

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand p {
  line-height: 1.6;
  margin-bottom: 1.2rem;
  max-width: 320px;
}

.footer-links h4 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  font-weight: 700;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: #a0aec0;
}

.footer-links a:hover {
  color: #ffffff;
}

/* 核心任务 2：页脚 PBN 友情链接区 */
.footer-pbn-links {
  border-top: 1px solid #2d3748;
  padding-top: 2rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: #718096;
}

.pbn-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 0.5rem;
}

.pbn-label {
  color: #a0aec0;
  font-weight: 600;
}

.pbn-item {
  color: #a0aec0 !important;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

.pbn-item:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

.pbn-divider {
  color: #4a5568;
}

.footer-bottom {
  border-top: 1px solid #2d3748;
  padding-top: 1.8rem;
  text-align: center;
  font-size: 0.85rem;
  color: #718096;
}

/* --- Article Page Specific Styles --- */
.article-page {
  background-color: #ffffff;
  padding: 4rem 0;
}

.article-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.article-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.article-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  color: var(--text-main);
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #2d3748;
}

.article-body h2 {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 2.2rem 0 1rem 0;
  color: var(--text-main);
  border-left: 4px solid var(--primary);
  padding-left: 0.8rem;
}

.article-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 1.8rem 0 0.8rem 0;
  color: var(--text-main);
}

.article-body p {
  margin-bottom: 1.4rem;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  background-color: #fff5f5;
  border-left: 4px solid var(--primary);
  padding: 1.2rem 1.5rem;
  margin: 1.8rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #4a5568;
}

.article-cta {
  background: var(--bg-gradient);
  color: white;
  border-radius: var(--border-radius);
  padding: 2.5rem;
  text-align: center;
  margin: 3rem 0;
  box-shadow: var(--card-shadow);
}

.article-cta h3 {
  color: white;
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.article-cta p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.5rem;
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
  .hero-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content p {
    margin: 0 auto 2rem auto;
  }
  .hero-buttons {
    justify-content: center;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-card.popular {
    transform: none;
  }
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.3rem;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-hero);
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  }
  .nav-menu.active {
    display: flex;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
