/* 安天垂直响应平台 - 全局样式 */
/* 配色参考 www.avlcode.cn：刚性、简洁、技术化；无渐变 */

:root {
  --brand: #c80000;
  --brand-deep: #a00000;
  --brand-soft: #fbe9e9;
  --ink: #171717;
  --ink-light: #333333;
  --text: #171717;
  --muted: #737373;
  --bg: #fafafa;
  --card: #ffffff;
  --hairline: #ebebeb;
  --hairline-strong: #a1a1a1;
  --shadow: 0 1px 3px rgba(23, 23, 23, 0.06);
  --radius: 4px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a {
  text-decoration: none;
  color: var(--brand);
  transition: color 0.15s;
}

a:hover {
  color: var(--brand-deep);
}

img {
  max-width: 100%;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header */
.floating-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid var(--hairline);
  z-index: 1000;
  height: 64px;
}

.fixed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 34px;
}

.brand-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.5px;
}

.brand-text span {
  color: var(--brand);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--brand);
}

.nav a.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brand);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--ink);
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 130px 0 70px;
  background: #ffffff;
  color: var(--ink);
  text-align: center;
  border-bottom: 1px solid var(--hairline);
}

.hero h1 {
  font-size: 40px;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: 1px;
}

.hero p {
  font-size: 17px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 12px;
}

.hero p:last-child {
  margin-bottom: 0;
  font-size: 15px;
}

/* Content area */
.content-area {
  padding: 56px 0;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
  text-align: center;
}

.section-subtitle {
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 36px;
}

/* Grid */
.grid-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-item {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}

.grid-item:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(200, 0, 0, 0.06);
}

/* Card header */
.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.card-title-wrap {
  min-width: 0;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-version {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* Meta */
.card-meta {
  margin-bottom: 12px;
}

.meta-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--muted);
}

.meta-row .label {
  color: var(--text);
  font-weight: 600;
  flex-shrink: 0;
  min-width: 70px;
}

.meta-row .value {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
}

.card-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 18px;
  flex-grow: 1;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  flex: 1;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-deep);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.btn-secondary:hover {
  background: var(--bg);
  color: var(--brand);
  border-color: var(--brand);
}

/* Download select */
.download-select {
  position: relative;
  flex: 1;
}

.download-toggle {
  width: 100%;
}

.download-toggle .caret {
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.8;
}

.download-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(23, 23, 23, 0.08);
  z-index: 100;
  overflow: hidden;
}

.download-select.open .download-menu {
  display: block;
}

.download-option {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--hairline);
  transition: background 0.15s;
}

.download-option:last-child {
  border-bottom: none;
}

.download-option:hover {
  background: var(--bg);
  color: var(--brand);
}

/* Detail page */
.detail-hero {
  padding: 110px 0 36px;
  background: #ffffff;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
}

.detail-hero h1 {
  font-size: 30px;
  margin: 0 0 12px;
}

.detail-hero .desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 700px;
}

.detail-tabs {
  display: flex;
  gap: 8px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.detail-tabs a {
  padding: 8px 18px;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--hairline);
}

.detail-tabs a:hover,
.detail-tabs a.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.detail-content {
  padding: 36px 0 56px;
}

.detail-section {
  display: none;
}

.detail-section.active {
  display: block;
}

.detail-section h2 {
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--hairline);
}

.detail-section h3 {
  font-size: 17px;
  color: var(--ink);
  margin: 26px 0 10px;
}

/* Timeline */
.timeline {
  position: relative;
  margin: 24px 0;
  padding-left: 24px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 6px;
  width: 2px;
  background: var(--hairline);
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
  padding-left: 24px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--card);
  box-shadow: 0 0 0 2px var(--brand);
}

.timeline-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 4px;
}

.timeline-content h4 {
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 6px;
}

.timeline-content p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.detail-section p {
  margin: 0 0 12px;
  color: var(--text);
}

.detail-section ul,
.detail-section ol {
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--text);
}

.detail-section li {
  margin-bottom: 8px;
}

.detail-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
}

.detail-section th,
.detail-section td {
  border: 1px solid var(--hairline);
  padding: 10px 12px;
  text-align: left;
}

.detail-section th {
  background: var(--bg);
  font-weight: 600;
  color: var(--ink);
}

.detail-section td {
  color: var(--text);
}

.detail-section td.center {
  text-align: center;
}

/* Changelog */
.changelog-list {
  max-width: 800px;
  margin: 0 auto;
}

.changelog-item {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
}

.changelog-date {
  flex-shrink: 0;
  width: 120px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}

.changelog-body h3 {
  font-size: 17px;
  color: var(--ink);
  margin: 0 0 6px;
}

.changelog-body p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

.changelog-tags {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* About page */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content h2 {
  font-size: 22px;
  color: var(--ink);
  margin: 36px 0 14px;
}

.about-content p {
  color: var(--text);
  margin: 0 0 14px;
}

.about-content ul {
  padding-left: 22px;
  color: var(--text);
}

.about-content li {
  margin-bottom: 10px;
}

/* Footer */
footer {
  background: #ffffff;
  color: var(--muted);
  padding: 56px 0 0;
  border-top: 1px solid var(--hairline);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  margin: 16px 0 0;
}

.footer-widget h3 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 18px;
}

.footer-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-widget li {
  margin-bottom: 10px;
}

.footer-widget a {
  color: var(--muted);
  font-size: 14px;
}

.footer-widget a:hover {
  color: var(--brand);
}

.footer-bottom {
  border-top: 1px solid var(--hairline);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

.footer-bottom a {
  color: var(--muted);
}

.footer-bottom a:hover {
  color: var(--brand);
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-box {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    gap: 16px;
  }

  .nav.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .grid-box {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 26px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .changelog-item {
    flex-direction: column;
    gap: 8px;
  }
}

