/* ===== 凉水科技 · 全局样式 ===== */

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

:root {
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --accent: #0f3460;
  --blue-bright: #1565c0;
  --blue-mid: #1976d2;
  --blue-light: #e3f2fd;
  --blue-border: #42a5f5;
  --text-primary: #1a1a2e;
  --text-secondary: #555e7a;
  --text-muted: #8892a4;
  --bg-page: #f4f6fb;
  --bg-card: #ffffff;
  --bg-header: #1a1a2e;
  --border-color: #e8ecf4;
  --shadow-sm: 0 2px 8px rgba(26,26,46,0.07);
  --shadow-md: 0 4px 20px rgba(26,26,46,0.10);
  --shadow-hover: 0 8px 32px rgba(26,26,46,0.15);
  --radius-card: 12px;
  --radius-tag: 4px;
  --transition: 0.22s ease;
  --font-sans: -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei",
    "Segoe UI", Arial, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ===== SITE HEADER ===== */
.site-header {
  background: var(--bg-header);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.site-header .header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-header .logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #42a5f5, #1565c0);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.site-header .site-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.site-header .site-tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.3px;
  margin-top: 1px;
  display: none;
}

/* ===== HERO BANNER (首页) ===== */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 60%, #16213e 100%);
  color: #fff;
  padding: 44px 20px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(66,165,245,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.hero-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 8px;
  color: #fff;
}

.hero-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
}

.hero-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #42a5f5;
  border-radius: 50%;
  margin: 0 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-left: 2px;
}

/* ===== ARTICLE CARD ===== */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border-color);
  display: block;
  text-decoration: none;
  color: inherit;
}

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

.article-card:active {
  transform: translateY(-1px);
}

.card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--primary-light);
  position: relative;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .card-cover img {
  transform: scale(1.03);
}

.card-body {
  padding: 18px 20px 20px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-tag);
  letter-spacing: 0.3px;
  color: var(--blue-mid);
  background: var(--blue-light);
  border: 1px solid rgba(21,101,192,0.15);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.card-meta .meta-icon {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.card-read-more {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-mid);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ===== SITE FOOTER ===== */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 28px 20px;
  font-size: 13px;
  line-height: 1.8;
}

.site-footer .footer-brand {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
}

.site-footer .footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}


/* ===== ARTICLE PAGE HEADER ===== */
.article-header {
  background: var(--bg-header);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.article-header .header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
  transition: color var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.back-btn:hover {
  color: #fff;
}

.back-btn svg {
  width: 18px;
  height: 18px;
}

.header-divider {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.header-article-title {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}


/* ===== ARTICLE CONTENT ===== */
.article-page {
  max-width: 720px;
  margin: 0 auto;
}

.article-hero-cover {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--primary-light);
}

.article-hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-meta-bar {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 20px 20px 0;
}

.article-title-main {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.article-info-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
}

.article-date {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-date svg {
  width: 13px;
  height: 13px;
  opacity: 0.6;
}

.article-tags-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ===== PROSE (Article Body) ===== */
.article-body {
  background: #fff;
  padding: 24px 20px 40px;
  font-size: 16px;
  line-height: 1.85;
  color: #2c3344;
}

.article-body p {
  margin-bottom: 18px;
}

.article-body h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--primary);
  margin: 36px 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--blue-mid);
  line-height: 1.4;
  position: relative;
}

.article-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin: 24px 0 10px;
}

.article-body strong {
  color: var(--primary);
  font-weight: 700;
}

.article-body ul,
.article-body ol {
  padding-left: 22px;
  margin-bottom: 18px;
}

.article-body li {
  margin-bottom: 6px;
  line-height: 1.75;
}

/* Highlight Box */
.article-body .highlight-box {
  background: #e8f4ff;
  border-left: 4px solid var(--blue-bright);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 15px;
  color: #1a3a5c;
  line-height: 1.75;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 14px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-body table th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0.3px;
}

.article-body table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: #3a4255;
  vertical-align: top;
  line-height: 1.55;
}

.article-body table tr:nth-child(even) td {
  background: #f8faff;
}

.article-body table tr:last-child td {
  border-bottom: none;
}

.article-body table tr:hover td {
  background: #eef4ff;
  transition: background 0.15s ease;
}

/* Article Footer */
.article-footer-brand {
  background: var(--bg-page);
  border-top: 1px solid var(--border-color);
  padding: 28px 20px;
  text-align: center;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.brand-badge .badge-icon {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #42a5f5, #1565c0);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}

.brand-slogan {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (min-width: 600px) {
  .site-header .site-tagline {
    display: block;
  }

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

  .hero-subtitle {
    font-size: 15px;
  }

  .card-title {
    font-size: 19px;
  }

  .article-title-main {
    font-size: 26px;
  }

  .article-body {
    padding: 32px 32px 48px;
  }

  .article-body h2 {
    font-size: 21px;
  }

  .article-meta-bar {
    padding: 24px 32px 0;
  }

  .article-footer-brand {
    padding: 36px 32px;
  }
}

@media (min-width: 720px) {
  .main-content {
    padding: 36px 0 72px;
  }

  .article-body table {
    font-size: 15px;
  }

  .article-body table th,
  .article-body table td {
    padding: 12px 16px;
  }
}

/* Scrollbar (desktop) */
@media (min-width: 1024px) {
  ::-webkit-scrollbar {
    width: 6px;
  }
  ::-webkit-scrollbar-track {
    background: #f0f2f8;
  }
  ::-webkit-scrollbar-thumb {
    background: #b0bcd8;
    border-radius: 3px;
  }
}

/* === Article inline figures === */
.article-figure {
  margin: 28px 0;
  padding: 0;
}
.article-figure img {
  width: 100%;
  border-radius: 8px;
  display: block;
}
.article-figure figcaption {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-top: 8px;
  line-height: 1.5;
}
