/* ========== 全站基础样式 - 每日大赛 ========== */
:root {
  --color-primary: #e63946;
  --color-primary-dark: #c1121f;
  --color-accent: #f4a261;
  --color-accent-light: #fff3e0;
  --color-bg: #f8f9fa;
  --color-card: #ffffff;
  --color-text: #212529;
  --color-text-secondary: #6c757d;
  --color-border: #e9ecef;
  --color-tag-bg: #fff0f0;
  --color-tag-text: #e63946;
  --color-update-bg: #eef9ee;
  --color-update-text: #2d6a2e;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.10);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--color-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-primary-dark); }

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

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ========== Header / Nav ========== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: .3s;
}

.main-nav {
  display: none;
  position: absolute;
  top: 54px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  z-index: 99;
}
.main-nav.open { display: block; }

.main-nav ul {
  list-style: none;
  padding: 8px 0;
}
.main-nav li a {
  display: block;
  padding: 10px 20px;
  font-size: .95rem;
  color: var(--color-text);
}
.main-nav li a:hover,
.main-nav li a.active {
  color: var(--color-primary);
  background: var(--color-tag-bg);
}

/* ========== Hero ========== */
.hero {
  position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  padding: 40px 0 36px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero_match.webp') center/cover no-repeat;
  opacity: .18;
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 10px;
}
.hero .subtitle {
  font-size: .95rem;
  opacity: .88;
  line-height: 1.6;
  margin-bottom: 16px;
}
.hero .hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero .hero-tags span {
  display: inline-block;
  padding: 4px 12px;
  font-size: .8rem;
  background: rgba(255,255,255,.15);
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* ========== Section Common ========== */
.section {
  padding: 28px 0;
}
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid var(--color-primary);
  line-height: 1.3;
}
.section-desc {
  font-size: .9rem;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ========== Quick Entry Cards ========== */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .15s;
}
.quick-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.quick-card .icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.quick-card .label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

/* ========== Category Grid ========== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.cat-card {
  display: block;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.cat-card:hover { box-shadow: var(--shadow-md); }
.cat-card .cat-name {
  font-size: .92rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}
.cat-card .cat-brief {
  font-size: .78rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ========== Info Cards ========== */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.info-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.info-card h3 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-primary-dark);
}
.info-card p {
  font-size: .85rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ========== Update Module ========== */
.update-box {
  background: var(--color-update-bg);
  border-radius: var(--radius-md);
  padding: 16px;
}
.update-box .update-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-update-text);
  margin-bottom: 10px;
}
.update-box ul {
  list-style: none;
  padding: 0;
}
.update-box li {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: .84rem;
  color: #444;
  line-height: 1.55;
}
.update-box li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  background: var(--color-update-text);
  border-radius: 50%;
}
.update-time {
  font-size: .75rem;
  color: var(--color-text-secondary);
  margin-top: 8px;
}

/* ========== FAQ ========== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  color: var(--color-text);
}
.faq-q::after {
  content: '+';
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform .2s;
}
.faq-item.open .faq-q::after {
  content: '−';
}
.faq-a {
  display: none;
  padding: 0 16px 14px;
  font-size: .84rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}
.faq-item.open .faq-a { display: block; }

/* ========== Related / Recommend ========== */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.rec-card {
  display: block;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.rec-card:hover { box-shadow: var(--shadow-md); color: var(--color-primary); }

/* ========== Footer ========== */
.site-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,.7);
  padding: 28px 0 20px;
  margin-top: 20px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
}
.footer-nav a {
  font-size: .82rem;
  color: rgba(255,255,255,.65);
}
.footer-nav a:hover { color: #fff; }
.footer-info {
  font-size: .75rem;
  color: rgba(255,255,255,.4);
  line-height: 1.6;
}

/* ========== Breadcrumb ========== */
.breadcrumb {
  padding: 12px 0;
  font-size: .8rem;
  color: var(--color-text-secondary);
}
.breadcrumb a { color: var(--color-text-secondary); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { margin: 0 4px; }

/* ========== Sub-page Hero ========== */
.sub-hero {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #fff;
  padding: 28px 0 24px;
}
.sub-hero h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.sub-hero p {
  font-size: .88rem;
  opacity: .82;
}

/* ========== Content Page ========== */
.page-content {
  background: var(--color-card);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
  font-size: .9rem;
  line-height: 1.75;
}
.page-content h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 20px 0 10px;
  color: var(--color-primary-dark);
}
.page-content h3 {
  font-size: .95rem;
  font-weight: 600;
  margin: 16px 0 8px;
}
.page-content p { margin-bottom: 12px; color: #444; }
.page-content ul, .page-content ol {
  margin: 10px 0 14px 20px;
  color: #444;
}
.page-content li { margin-bottom: 6px; }

/* ========== Link List ========== */
.link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.link-item:hover { box-shadow: var(--shadow-md); }
.link-item .link-icon {
  width: 36px;
  height: 36px;
  background: var(--color-tag-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.link-item .link-text {
  font-size: .88rem;
  font-weight: 500;
  color: var(--color-text);
}
.link-item .link-desc {
  font-size: .76rem;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* ========== Tag ========== */
.tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: .72rem;
  border-radius: 20px;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  font-weight: 500;
}
.tag.green {
  background: var(--color-update-bg);
  color: var(--color-update-text);
}

/* ========== Desktop ========== */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .main-nav {
    display: block;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .main-nav ul {
    display: flex;
    gap: 4px;
    padding: 0;
  }
  .main-nav li a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
  }
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: 2rem; }
  .quick-grid { grid-template-columns: repeat(6, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .rec-grid { grid-template-columns: repeat(3, 1fr); }
}
