@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&family=ZCOOL+XiaoWei&display=swap');

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

:root {
  --primary: #c62828;
  --primary-dark: #b71c1c;
  --primary-light: #ef5350;
  --secondary: #1565c0;
  --secondary-dark: #0d47a1;
  --secondary-light: #42a5f5;
  --bg: #fafafa;
  --bg-white: #ffffff;
  --text: #212121;
  --text-light: #616161;
  --text-muted: #9e9e9e;
  --border: #e0e0e0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-h: 72px;
}

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

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  border-bottom: 3px solid var(--primary);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'ZCOOL XiaoWei', 'Noto Sans SC', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.logo span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.main-nav a {
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  transition: all 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--primary);
  color: #fff;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
}

/* ========== Hero ========== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero h1 {
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.hero p {
  font-size: clamp(16px, 2vw, 20px);
  opacity: 0.92;
  margin-bottom: 36px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: #fff;
  color: var(--primary);
}

.btn-primary:hover {
  background: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  color: var(--primary-dark);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-block {
  width: 100%;
}

/* ========== Section ========== */
.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--bg-white);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: clamp(24px, 3.5vw, 36px);
  color: var(--text);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-light);
  font-size: 16px;
}

.section-header .divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ========== Card Grids ========== */
.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.35s ease;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card:hover::after {
  transform: scaleX(1);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(198, 40, 40, 0.1), rgba(21, 101, 192, 0.1));
  color: var(--primary);
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.card p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
}

.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  font-weight: 500;
  font-size: 14px;
}

/* ========== Entry Grid (Portal Entries) ========== */
.entry-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.entry-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  cursor: pointer;
}

.entry-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.entry-card .entry-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
}

.entry-card:nth-child(even) .entry-icon {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

.entry-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.entry-card p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== Feature List ========== */
.feature-list {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.feature-item {
  display: flex;
  gap: 18px;
  padding: 24px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
  transition: all 0.3s ease;
}

.feature-item:nth-child(even) {
  border-left-color: var(--secondary);
}

.feature-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.feature-content h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.feature-content p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ========== Navigation Map ========== */
.nav-search {
  max-width: 600px;
  margin: 0 auto 40px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-family: inherit;
  background: var(--bg-white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.1);
}

.nav-search .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--text-muted);
}

.nav-categories {
  display: grid;
  gap: 32px;
}

.nav-category h3 {
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: 22px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
}

.nav-category h3 .cat-icon {
  margin-right: 8px;
  color: var(--primary);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-links a {
  padding: 8px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  transition: all 0.25s ease;
}

.nav-links a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ========== News ========== */
.news-list {
  display: grid;
  gap: 20px;
}

.news-item {
  display: flex;
  gap: 24px;
  padding: 24px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  align-items: flex-start;
}

.news-item:hover {
  box-shadow: var(--shadow-md);
}

.news-date {
  flex-shrink: 0;
  width: 80px;
  text-align: center;
  padding: 12px 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: var(--radius);
}

.news-date .day {
  font-size: 28px;
  font-weight: 900;
  display: block;
  line-height: 1;
}

.news-date .month {
  font-size: 13px;
  opacity: 0.9;
}

.news-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.news-content p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 8px;
}

.news-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(198, 40, 40, 0.1);
  color: var(--primary);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* ========== About ========== */
.about-hero {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.about-hero h1 {
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 12px;
}

.about-hero p {
  font-size: 18px;
  opacity: 0.9;
}

.mission-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.mission-card {
  text-align: center;
  padding: 36px 28px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.mission-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.mission-card .mission-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.mission-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.mission-card p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
}

.team-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.team-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
}

.team-card h4 {
  font-size: 17px;
  margin-bottom: 4px;
}

.team-card .role {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 8px;
}

.team-card p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== Contact ========== */
.contact-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.contact-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  text-align: center;
}

.contact-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.contact-card .contact-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.contact-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.contact-card p {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 6px;
}

.contact-card .contact-detail {
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
}

.feedback-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-white);
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* ========== Footer ========== */
.site-footer {
  background: #1a1a1a;
  color: #bdbdbd;
  margin-top: auto;
}

.footer-top {
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
}

.footer-col h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 18px;
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.footer-col p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

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

.footer-col ul li a {
  color: #bdbdbd;
  font-size: 14px;
  transition: color 0.25s ease;
}

.footer-col ul li a:hover {
  color: var(--primary-light);
}

.footer-col .social-links {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.footer-col .social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  transition: all 0.3s ease;
}

.footer-col .social-links a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
}

.footer-bottom p {
  color: #757575;
}

.footer-bottom .sep {
  margin: 0 10px;
  opacity: 0.5;
}

/* ========== Update Log ========== */
.update-log {
  max-width: 800px;
  margin: 0 auto;
}

.update-entry {
  position: relative;
  padding: 0 0 28px 28px;
  border-left: 2px solid var(--border);
}

.update-entry:last-child {
  padding-bottom: 0;
}

.update-entry::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
}

.update-entry .version {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.update-entry .date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.update-entry h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.update-entry p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
}

/* ========== Guide Steps ========== */
.guide-steps {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  counter-reset: step;
}

.guide-step {
  text-align: center;
  padding: 28px 20px;
  position: relative;
}

.guide-step::before {
  counter-increment: step;
  content: counter(step);
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 48px;
  text-align: center;
}

.guide-step h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.guide-step p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
}

/* ========== Back to Top ========== */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border: none;
  z-index: 99;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ========== Responsive ========== */
@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-white);
    padding: 16px;
    gap: 4px;
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    transition: transform 0.35s ease;
    border-top: 2px solid var(--primary);
  }

  .main-nav.open {
    transform: translateY(0);
  }

  .main-nav a {
    display: block;
    width: 100%;
    padding: 12px 16px;
  }

  .hero {
    padding: 56px 0 72px;
  }

  .section {
    padding: 48px 0;
  }

  .news-item {
    flex-direction: column;
    gap: 16px;
  }

  .news-date {
    width: 100%;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .news-date .day {
    font-size: 22px;
  }

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

  .footer-top {
    padding: 40px 0 24px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  .feedback-form {
    padding: 24px;
    margin: 0 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .logo {
    font-size: 22px;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .card-grid,
  .entry-grid {
    grid-template-columns: 1fr;
  }
}