/* ========== 基础样式 ========== */
:root {
  --primary-color: #165DFF;
  --secondary-color: #00C1D4;
  --text-color: #333;
  --text-muted: rgba(51, 51, 51, 0.7);
  --bg-color: #F5F7FA;
  --card-bg: white;
  --border-color: rgba(201, 205, 212, 0.3);
  --hover-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ========== 组件样式 ========== */
/* 按钮 */
.btn {
  display: inline-block;
  padding: 6px 15px;
  border-radius: 8px;
  transition: var(--transition);
  font-weight: 500;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: rgba(22, 93, 255, 0.9);
}

/* 卡片 */
.card {
  background-color: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

/* 徽章 */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

.badge-primary {
  background-color: rgba(22, 93, 255, 0.1);
  color: var(--primary-color);
}

.badge-secondary {
  background-color: rgba(0, 193, 212, 0.1);
  color: var(--secondary-color);
}

/* 标题 */
.section-title {
  font-size: 32px; /* 放大字体 */
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 16px; /* 减少底部间距 */
  display: flex;
  align-items: center;
  justify-content: center; /* 标题居中 */
}

.centered-title {
  justify-content: center;
}

.section-title i {
  margin-right: 8px;
  color: var(--primary-color);
}

.section-description {
  font-size: 16px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px; /* 增加说明文字与下面内容的间距 */
}

/* ========== 导航栏 ========== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(22, 93, 255, 0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img-container {
  width: 40px; /* 固定 logo 宽度 */
  height: 40px; /* 固定 logo 高度 */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo i {
  font-size: 24px;
  color: var(--primary-color);
  margin-right: 8px;
}

.logo h1 {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-color);
  margin: 0;
}

.desktop-nav {
  display: none;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
    align-items: center;
  }
  .desktop-nav a {
    margin-left: 32px;
    font-weight: 500;
  }
  .desktop-nav a:first-child {
    margin-left: 0;
  }
  .desktop-nav a:hover {
    color: var(--primary-color);
  }
}

.mobile-menu-button {
  color: var(--text-color);
  font-size: 24px;
}

@media (min-width: 768px) {
  .mobile-menu-button {
    display: none;
  }
}

.mobile-menu {
  display: none;
  position: absolute;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  left: 0;
  top: 100%;
  padding: 16px 0;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-weight: 500;
}

/* ========== 英雄区域 ========== */
.hero {
  margin-bottom: 64px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  height: 40vh;
  min-height: 300px;
  max-height: 500px;
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 0 16px;
  padding-left: 10%;
  box-sizing: border-box;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.hero:hover .hero-bg {
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.8), transparent);
  z-index: 8;
}

.hero-title {
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 15;
  position: relative;
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(51, 51, 51, 0.9);
  margin-bottom: 24px;
  z-index: 15;
  position: relative;
}

/* ========== 系统下载区域 ========== */
.systems-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .systems-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.system-card .card-image {
  height: 160px;
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
}

.system-card .card-image img {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.system-card:hover .card-image img {
  transform: scale(1.05);
}

.system-card .card-content {
  padding: 24px;
}

.system-card .card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.system-card .card-title h3 {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-color);
  margin: 0;
}

.system-card p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.system-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.system-card .card-footer span {
  font-size: 14px;
  color: var(--text-muted);
}

/* ========== 办公软件、驱动下载区域 ========== */
.drivers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .drivers-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.drivers-card {
  display: flex;
  background-color: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
  min-height: 120px;
  align-items: stretch;
}

.drivers-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

/* 固定图标区域宽度，防止被挤压 */
.drivers-icon {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  background-color: rgba(22, 93, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(22, 93, 255, 0.1);
}

.drivers-icon img {
  position: static;
  transform: none;
  width: 100%;
  height: 100%;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.3s ease;
  border-radius: 8px;
}

.drivers-card:hover .drivers-icon img {
  transform: scale(1.05);
}

.drivers-content {
  padding: 12px;
  padding-right: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 80px;
  overflow: hidden;
}

.drivers-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.drivers-header h3 {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-color);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drivers-description {
  font-size: 13px;
  margin-bottom: 8px;
  line-height: 1.4;
  max-height: 2.8em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 36px;
}

.drivers-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drivers-size {
  font-size: 13px;
  color: var(--text-muted);
}

.drivers-size span {
  display: block; /* 使更新时间和大小分两行显示 */
  line-height: 1.2; /* 缩小行间距 */
}

/* ========== 软件下载区域 ========== */
.software-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .software-grid {
    grid-template-columns: 1fr 1fr 1fr; /* 修改为三列显示 */
  }
}

.software-card {
  display: flex;
  background-color: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
  min-height: 120px;
  align-items: stretch;
}

.software-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

/* 固定图标区域宽度，防止被挤压 */
.software-icon {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  background-color: rgba(22, 93, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(22, 93, 255, 0.1);
}

.software-icon img {
  position: static;
  transform: none;
  width: 100%;
  height: 100%;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.3s ease;
  border-radius: 8px;
}

.software-card:hover .software-icon img {
  transform: scale(1.05);
}

.software-content {
  padding: 12px;
  padding-right: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 80px;
  overflow: hidden;
}

.software-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.software-header h3 {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-color);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.software-description {
  font-size: 13px;
  margin-bottom: 8px;
  line-height: 1.4;
  max-height: 2.8em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 36px;
}

.software-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.software-size {
  font-size: 13px;
  color: var(--text-muted);
}

.software-size span {
  display: block; /* 使更新时间和大小分两行显示 */
  line-height: 1.2; /* 缩小行间距 */
}

/* 软件分类筛选按钮 */
.software-categories {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  gap: 16px;
}

.category-button {
  padding: 8px 16px;
  border-radius: 8px;
  background-color: rgba(22, 93, 255, 0.1);
  color: var(--primary-color);
  transition: var(--transition);
}

.category-button:hover {
  background-color: rgba(22, 93, 255, 0.2);
}

.category-button.active {
  background-color: var(--primary-color);
  color: white;
}

/* ========== 页脚 ========== */
footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 48px 0;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.footer-logo i {
  font-size: 24px;
  color: var(--primary-color);
  margin-right: 8px;
}

.footer-logo h3 {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-color);
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.footer-social a {
  font-size: 18px;
}

.footer-section h4 {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 16px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-contact li {
  display: flex;
  align-items: center;
}

.footer-contact i {
  color: var(--primary-color);
  margin-right: 8px;
  width: 16px;
  text-align: center;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  margin-top: 32px;
  padding-top: 32px;
  text-align: center;
  font-size: 14px;
  color: rgba(51, 51, 51, 0.6);
}

/* ========== 辅助元素 ========== */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 50;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}