/* ========================================
   51爆料网入口 - 统一样式文件
   ======================================== */

/* CSS Variables */
:root {
  --primary: #E53935;
  --secondary: #1565C0;
  --accent: #FF9800;
  --background: #FAFAFA;
  --background-dark: #F5F5F5;
  --text: #212121;
  --text-light: #616161;
  --border: #E0E0E0;
  --gradient: linear-gradient(135deg, #E53935, #FF9800);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul, ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

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

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p {
  color: var(--text-light);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
}

.logo-icon {
  width: 45px;
  height: 45px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.3s ease;
}

.nav a:hover,
.nav a.active {
  background: var(--primary);
  color: white;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Search Box */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input {
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 25px;
  font-size: 1rem;
  width: 200px;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-btn {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.search-btn:hover {
  background: #C62828;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  background: var(--gradient);
  padding: 60px 0;
  color: white;
}

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

.hero-content h1 {
  color: white;
  margin-bottom: 16px;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  background: #C62828;
  transform: translateY(-2px);
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 2px solid var(--border);
}

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

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

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

/* ========================================
   Section Styles
   ======================================== */
.section {
  padding: 40px 0;
}

.section-header {
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header h2::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 2px;
}

.section-header a {
  color: var(--primary);
  font-weight: 500;
}

.section-dark {
  background: var(--background-dark);
}

/* ========================================
   Cards
   ======================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-image {
  aspect-ratio: 16/10;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  position: relative;
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  margin-bottom: 10px;
  line-height: 1.4;
  height: 2.8rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-content p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Featured Card */
.featured-card {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.featured-card .card-image {
  aspect-ratio: 16/9;
}

.featured-card .card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-card h3 {
  font-size: 1.5rem;
  height: auto;
  -webkit-line-clamp: unset;
}

/* ========================================
   News List
   ======================================== */
.news-list {
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.news-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item:hover {
  background: var(--background-dark);
}

.news-item-image {
  width: 150px;
  height: 100px;
  background: var(--gradient);
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
}

.news-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-item-content h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.news-item-content p {
  font-size: 0.9rem;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item-meta {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ========================================
   Tabs
   ======================================== */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: 20px;
  background: white;
  color: var(--text-light);
  border: 1px solid var(--border);
  font-weight: 500;
  transition: all 0.3s ease;
}

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

/* ========================================
   Hot Tags
   ======================================== */
.hot-tags {
  background: white;
  padding: 20px;
  border-radius: 12px;
}

.hot-tags h4 {
  margin-bottom: 15px;
  font-size: 1rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 14px;
  background: var(--background-dark);
  color: var(--text);
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.tag:hover {
  background: var(--primary);
  color: white;
}

.tag.hot {
  background: rgba(229, 57, 53, 0.1);
  color: var(--primary);
}

/* ========================================
   Stats
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-item {
  background: white;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ========================================
   Submit Form
   ======================================== */
.submit-form {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.form-group .checkbox-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.form-group .checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group .checkbox-item input[type="checkbox"] {
  width: auto;
}

/* ========================================
   FAQ
   ======================================== */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.faq-question {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.faq-question:hover {
  background: var(--background-dark);
}

.faq-icon {
  width: 26px;
  height: 26px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

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

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 0 24px 20px;
  max-height: 200px;
}

.faq-answer p {
  color: var(--text-light);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: #212121;
  color: white;
  padding: 50px 0 25px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand .logo {
  margin-bottom: 15px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer-links h4 {
  color: white;
  margin-bottom: 18px;
  font-size: 1rem;
}

.footer-links ul li {
  margin-bottom: 12px;
}

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

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

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

/* ========================================
   Page Header
   ======================================== */
.page-header {
  background: var(--gradient);
  padding: 50px 0;
  color: white;
}

.page-header h1 {
  color: white;
  margin-bottom: 10px;
}

.page-header p {
  color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .featured-card {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  }

  .nav.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .search-box {
    display: none;
  }

  .section {
    padding: 30px 0;
  }

  .news-item {
    flex-direction: column;
  }

  .news-item-image {
    width: 100%;
    height: 150px;
  }

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

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

/* ========================================
   Utilities
   ======================================== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
