/* 虚拟卡券网 - 首页样式 */
:root {
  --color-bg: #f0f4f8;
  --color-surface: #ffffff;
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-primary-light: #eff6ff;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-hero-start: #dbeafe;
  --color-hero-end: #e0f2fe;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --radius: 10px;
  --radius-sm: 8px;
  --container: 1200px;
  --sidebar-width: 300px;
  --hero-banner-image: url("../images/hero-banner.png");
  --logo-gold-light: #fff4a3;
  --logo-gold-deep: #fdb933;
  /* 正文/UI：思源黑体；大标题：思源宋体（SIL OFL，可免费商用） */
  --font-sans: "思源黑体", "Source Han Sans SC", sans-serif;
  --font-serif: "思源宋体", "Source Han Serif SC", serif;
  --font: var(--font-sans);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font-family: var(--font-sans);
}

h1,
h2,
h3,
.hero-title,
.section-title {
  font-family: var(--font-serif);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== Header ========== */
.header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 8px 0;
}

.header-search {
  display: flex;
  align-items: stretch;
  flex: 1;
  max-width: 420px;
  margin-left: auto;
  min-width: 0;
}

.header-search-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  outline: none;
}

.header-search-input::placeholder {
  color: #94a3b8;
}

.header-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}

.header-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  padding: 0;
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.header-search-btn:hover {
  background: var(--color-primary-hover);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
}

.logo-text {
  font-family: "站酷快乐体", "ZCOOL KuaiLe", cursive;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
}

.logo-text-accent {
  background: linear-gradient(
    105deg,
    #0f172a 0%,
    #1e293b 30%,
    #2a2618 52%,
    #8a6f2e 72%,
    var(--logo-gold-deep) 85%,
    var(--logo-gold-light) 92%,
    #1e293b 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.logo-text-main {
  color: #1e293b;
}

.logo:hover {
  text-decoration: none;
}

.logo:hover .logo-text-accent {
  background: linear-gradient(
    105deg,
    #0f172a 0%,
    #1e293b 25%,
    #3d3520 50%,
    #b8860b 70%,
    var(--logo-gold-deep) 82%,
    var(--logo-gold-light) 90%,
    #1e293b 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: inherit;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #fff;
}

.btn-outline {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: transparent;
}

.btn-outline:hover {
  background: #dbeafe;
  color: var(--color-primary-hover);
}

.btn-block {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
}

/* ========== Hero ========== */
.hero-section {
  padding: 20px 0 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 16px;
  align-items: stretch;
}

.hero-banner {
  border-radius: var(--radius);
  padding: 32px 36px 32px 20px;
  display: flex;
  align-items: center;
  min-height: 320px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  background-color: var(--color-hero-end);
  background-image:
    linear-gradient(
      90deg,
      rgba(219, 234, 254, 0.95) 0%,
      rgba(224, 242, 254, 0.88) 38%,
      rgba(240, 249, 255, 0.35) 62%,
      rgba(240, 249, 255, 0.1) 100%
    ),
    var(--hero-banner-image);
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}

/* 遮盖背景图右下角 AI 水印（如「百度AI生成」） */
.hero-banner::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 160px;
  height: 44px;
  background: linear-gradient(
    135deg,
    rgba(240, 249, 255, 0) 0%,
    rgba(224, 242, 254, 0.92) 45%,
    var(--color-hero-end) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 58%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-left: -4px;
}

.hero-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
}

.hero-subtitle {
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  white-space: nowrap;
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.2;
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-subtitle-side,
.hero-subtitle-core {
  display: inline-block;
  flex-shrink: 0;
}

.hero-subtitle-side {
  font-size: 0.76em;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero-subtitle-core {
  font-size: 1.24em;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* ========== Sidebar ========== */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
}

.widget {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.widget-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.widget-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.widget-icon--search {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.widget-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}

.widget-input:focus {
  border-color: var(--color-primary);
}

.widget-submit-contact {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  min-height: 0;
}

.widget-submit-contact-text {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.widget-submit-contact-line {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--color-text);
  font-weight: 700;
  padding: 0 4px 2px;
  background-image: linear-gradient(
    to top,
    rgba(59, 130, 246, 0.28) 0%,
    rgba(59, 130, 246, 0.28) 38%,
    transparent 38%
  );
  text-decoration: underline;
  text-decoration-color: var(--color-primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.widget-submit-contact-qr-wrap {
  position: relative;
  flex-shrink: 0;
}

.widget-submit-contact-scan {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 1;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: var(--color-primary);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
  white-space: nowrap;
}

.widget-submit-contact-qr {
  display: block;
  width: 108px;
  height: 108px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  object-fit: contain;
  background: #fff;
}

.widget-submit {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}

.widget-submit:hover {
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.submit-plus {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 300;
  flex-shrink: 0;
}

.submit-text {
  flex: 1;
  min-width: 0;
}

.submit-text strong {
  display: block;
  font-size: 15px;
}

.submit-text span {
  font-size: 12px;
  color: var(--color-text-muted);
}

.badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

.badge-open {
  background: #dcfce7;
  color: #16a34a;
  font-weight: 500;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick-btn {
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: opacity 0.2s;
}

.quick-btn:hover {
  text-decoration: none;
  opacity: 0.9;
}

.quick-btn--teal {
  background: #14b8a6;
  color: #fff;
}

.quick-btn--blue {
  background: var(--color-primary);
  color: #fff;
}

.quick-btn--outline {
  background: var(--color-surface);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

/* ========== Announcement ========== */
.announcement {
  padding: 0 0 40px;
}

.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  box-shadow: var(--shadow-sm);
}

.announcement-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.announcement-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.announcement-text {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcement-link {
  font-size: 13px;
  flex-shrink: 0;
  font-weight: 500;
}

/* ========== Sponsor ========== */
.sponsor {
  padding-bottom: 8px;
}

.sponsor-inner {
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
}

.sponsor-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sponsor-icon {
  background: #f97316;
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  flex-shrink: 0;
}

.sponsor-desc {
  font-size: 14px;
  color: var(--color-text);
  font-weight: 500;
}

/* ========== Sources ========== */
.sources {
  padding: 16px 0 20px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title-icon {
  color: var(--color-primary);
  display: flex;
}

.section-more {
  font-size: 14px;
  font-weight: 500;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.sources-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 32px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--color-text-muted);
}

.sources-coming-soon {
  margin: 16px 0 0;
  padding: 36px 20px;
  text-align: center;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.4;
  color: #64748b;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8f2fc 50%, #eff6ff 100%);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.source-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.15s;
}

.source-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.source-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
}

.source-body strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-body p {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== Footer ========== */
.footer {
  margin-top: auto;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
}

.footer-inner {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
}

.footer-inner p {
  margin: 0 0 8px;
}

.footer-inner a {
  color: var(--color-text-muted);
}

.footer-inner a:hover {
  color: var(--color-primary);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .sources-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    margin-left: 0;
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-subtitle {
    font-size: clamp(22px, 5.2vw, 32px);
    letter-spacing: -0.08em;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-banner {
    background-position: 70% center;
  }

  .sources-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .sources-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }
}

/* 公告详情 / 免责声明 */
.article-page {
  padding: 28px 0 48px;
}

.article-container {
  max-width: 800px;
}

.article-back {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
}

.article-back:hover {
  color: var(--color-primary);
}

.article-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 40px;
  box-shadow: var(--shadow-sm);
}

.article-title {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-serif);
  color: #1a1a1a;
  line-height: 1.4;
}

.article-meta {
  margin: 0 0 20px;
  font-size: 13px;
  color: #94a3b8;
}

.article-divider {
  margin: 0 0 24px;
  border: none;
  border-top: 1px solid var(--color-border);
}

.article-lead {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.85;
  color: #334155;
}

.article-list {
  margin: 0;
  padding-left: 1.5em;
  font-size: 15px;
  line-height: 2;
  color: #334155;
}

.article-list li {
  margin-bottom: 0.25em;
}

@media (max-width: 768px) {
  .article-content {
    padding: 24px 20px;
  }

  .article-title {
    font-size: 22px;
  }
}
