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

:root {
  --bg-primary: #0b0e11;
  --bg-secondary: #181a20;
  --bg-card: #1e2329;
  --bg-hover: #2b3139;
  --accent: #f0b90b;
  --accent-hover: #f8d12f;
  --text-primary: #eaecef;
  --text-secondary: #848e9c;
  --text-third: #5e6673;
  --green: #0ecb81;
  --red: #f6465d;
  --border: #2b3139;
  --radius: 8px;
  --radius-lg: 16px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== Header ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  color: var(--bg-primary);
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
}

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

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

/* ========== Breadcrumb ========== */
.breadcrumb {
  background: var(--bg-secondary);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 13px;
  color: var(--text-third);
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-list li:not(:last-child)::after {
  content: "›";
  color: var(--text-third);
}

.breadcrumb-list a {
  color: var(--text-secondary);
}

.breadcrumb-list a:hover {
  color: var(--accent);
}

.breadcrumb-list li[aria-current="page"] {
  color: var(--text-primary);
}

/* ========== Hero ========== */
.hero {
  text-align: center;
  padding: 80px 0 60px;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-number {
  font-size: 56px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1.1;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  margin: 8px 0 16px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.badge-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--text-secondary);
  font-size: 14px;
}

.hero-cta svg {
  fill: var(--accent);
}

.btn-hero {
  padding: 16px 64px;
  font-size: 16px;
  border-radius: var(--radius);
}

/* ========== Tabs ========== */
.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.tab {
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--text-primary);
}

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

/* ========== 开奖结果表格 ========== */
.results-section {
  padding: 60px 0;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.section-title span {
  color: var(--accent);
}

.result-table {
  width: 100%;
  border-collapse: collapse;
}

.result-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.result-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.result-table tbody tr:hover {
  background: var(--bg-hover);
}

.result-table td {
  padding: 16px;
  font-size: 14px;
  vertical-align: middle;
}

.ball-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ball {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.ball-red { background: #e74c3c; }
.ball-blue { background: #3498db; }
.ball-green { background: #27ae60; }

.ball-separator {
  color: var(--text-third);
  font-size: 18px;
  margin: 0 4px;
}

.result-period {
  font-weight: 600;
  color: var(--text-primary);
}

.result-date {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ========== 号码球网格 ========== */
.latest-draw {
  padding: 60px 0;
  background: var(--bg-secondary);
}

.draw-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}

.draw-period {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.draw-date {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 32px;
}

.draw-balls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.draw-balls .ball {
  width: 60px;
  height: 60px;
  font-size: 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}

.draw-balls .ball:hover {
  transform: scale(1.1);
}

.draw-plus {
  font-size: 28px;
  color: var(--text-third);
  font-weight: 300;
}

.draw-zodiac {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

.zodiac-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========== 数据统计 ========== */
.stats-section {
  padding: 60px 0;
}

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

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ========== 资讯 ========== */
.news-section {
  padding: 60px 0;
  background: var(--bg-secondary);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s;
}

.news-card:hover {
  transform: translateY(-4px);
}

.news-img {
  width: 100%;
  height: 180px;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-third);
  font-size: 40px;
}

.news-body {
  padding: 20px;
}

.news-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(240, 185, 11, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 12px;
}

.news-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

.view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.view-all:hover {
  color: var(--accent);
}

/* ========== FAQ ========== */
.faq-section {
  padding: 60px 0;
}

.faq-list {
  max-width: 800px;
  margin: 32px auto 0;
}

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

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  gap: 16px;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-right: 16px;
}

.faq-toggle {
  font-size: 22px;
  color: var(--text-third);
  flex-shrink: 0;
  transition: transform 0.3s;
}

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

.faq-answer-inner {
  padding: 0 0 20px 48px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}

/* ========== SEO Content ========== */
.seo-content {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.seo-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.seo-content p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.seo-content p:last-child {
  margin-bottom: 0;
}

/* ========== News Card Link Fix ========== */
.news-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.news-card a:hover {
  color: inherit;
}

/* ========== Footer ========== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-third);
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  transition: background 0.2s, color 0.2s;
}

.footer-socials a:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .hero-number {
    font-size: 40px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-badges {
    gap: 24px;
  }

  .draw-balls .ball {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .draw-balls {
    gap: 10px;
  }

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

  .stat-value {
    font-size: 28px;
  }

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

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

  .result-table {
    display: block;
    overflow-x: auto;
  }

  .ball {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .btn-hero {
    padding: 14px 48px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: 56px;
  }

  .logo {
    font-size: 17px;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .hero-number {
    font-size: 32px;
  }

  .hero-title {
    font-size: 20px;
  }

  .draw-card {
    padding: 24px 16px;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
