:root {
  --bg-color: #ffffff;
  --text-color: #333333;
  --header-text: #666666;
  --border-color: #e5e5e5;
  --hover-bg: #f5f5f5;
  --icon-color: #666;
}

html,
body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

#content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

body {
  font-family: "Arial", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  color: #444;
  line-height: 1.4;
}

header {
  background-color: #4caf50;
  color: white;
  padding: 10px 0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
}

nav ul li {
  margin: 0 10px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 14px;
}

#hero {
  background-color: #e8f5e9;
  color: #333;
  text-align: center;
  padding: 20px 10px;
}

#hero h1 {
  margin: 0;
  font-size: 1.5em;
  font-weight: bold;
}

#hero p {
  font-size: 0.9em;
  margin-top: 5px;
}

.download-btn {
  display: inline-block;
  background-color: #4caf50;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  font-size: 12px;
  margin-top: 10px;
  margin-left: 4px;
  margin-right: 4px;
  border-radius: 4px;
  border: none;
}

.download-btn-more {
  display: inline-block;
  color: black;
  text-decoration: none;
  font-size: 14px;
  margin: 4px 0px;
}

#features,
#testimonial,
#download,
#popular-content,
#software-share {
  padding: 30px 20px;
  text-align: center;
}

.flex {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

#features img {
  max-width: 800px;
  border-radius: 8px;
  margin-bottom: 20px;
}

#features ul {
  list-style-type: none;
  padding: 0;
  margin: 0 auto;
  max-width: 600px;
  text-align: left;
}

#features ul li {
  font-size: 12px;
  margin: 5px 0;
  line-height: 1.4;
  background: #fff;
  padding: 10px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-size: 14px;
}

.features-list-box {
  box-sizing: border-box;
  padding: 0px 20px;
  max-width: 600px;
}

.software-box {
  display: flex;
  flex-direction: column;
  border: 1px solid #4caf50;
  text-align: left;
  box-sizing: border-box;
  padding: 10px;
  width: 300px;
  height: 300px;
  /* 限制高度 */
  overflow-y: auto;
  /* 垂直滚动条 */
}

.software-box-header {
  display: flex;
  flex-direction: column;
  text-align: left;
  box-sizing: border-box;
}

.software-box h3 {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: bold;
}

.software-box a::before {
  content: "⬇";
  /* 下载图标 */
  margin-right: 8px;
  color: #4caf50;
}

#software-share .software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  justify-items: center;
  box-sizing: border-box;
  padding: 40px 20px;
}

#software-share .software-item {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 5px 0;
}

#software-share .software-item img {
  max-width: 100%;
  border-radius: 4px;
}

footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 5px;
  font-size: 10px;
}

footer ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

footer ul li {
  display: inline;
  margin: 0 10px;
}

footer ul li a {
  color: white;
  text-decoration: none;
}

#software-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

#software-share-container {
  display: flex;
  justify-content: center;
  align-items: initial;
  flex-wrap: wrap;
  gap: 20px;
}

@media screen and (max-width: 768px) {
  #hero h1 {
    font-size: 1.2em;
  }

  #hero p {
    font-size: 0.8em;
  }

  .download-btn {
    padding: 6px 12px;
    font-size: 10px;
  }

  #features img {
    margin-bottom: 15px;
  }

  #features ul li {
    font-size: 10px;
  }

  #software-share .software-item h3 {
    font-size: 14px;
  }

  #software-share .software-item p {
    font-size: 12px;
  }
}

/* 模拟图的样式 */
/* 顶部标题栏 */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.breadcrumb {
  font-size: 16px;
  color: #333;
}

.view-switchers {
  display: flex;
  gap: 10px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #fff;
}

.btn-icon:hover {
  background-color: var(--hover-bg);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  fill: #666;
}

/* 文件列表表格头部 */
.file-list-header {
  display: grid;
  grid-template-columns: 40px 1fr 100px 180px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--header-text);
  border-bottom: 1px solid transparent; /* 占位 */
}

.col-checkbox {
  display: flex;
  align-items: center;
}

.col-name {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.col-name span {
  margin-right: 4px;
}

.sort-icon {
  font-size: 10px;
  color: #999;
}

/* 文件列表项 */
.file-item {
  display: grid;
  grid-template-columns: 40px 1fr 100px 180px;
  padding: 12px 16px;
  align-items: center;
  border-radius: 4px;
  background-color: #f7f7f7; /* 图片中的灰色背景 */
  font-size: 13px;
  color: #333;
  transition: background-color 0.2s;
  margin-bottom: 2px;
}

.file-item:hover {
  background-color: #ebebeb;
}

/* 自定义复选框样式 */
.checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid #ccc;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #333; /* 选中状态 */
  cursor: pointer;
}

.checkbox::after {
  content: "✓";
  color: white;
  font-size: 12px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-icon {
  width: 30px;
  height: 30px;
  background-color: #e3f2fd; /* 简单的图标背景 */
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2196f3;
  font-size: 10px;
  font-weight: bold;
}
.file-icon img {
  width: 100%;
  height: 100%;
}

.file-actions {
  display: flex;
  gap: 15px;
  margin-right: 20px;
  justify-self: end; /* 将操作图标推到列的右边 */
}

/* 实际上图片里的操作图标是浮在文件名列的右侧，或者大小列的左侧，这里简单处理 */
.file-name-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding-right: 20px;
}

.action-icon {
  cursor: pointer;
  width: 16px;
  height: 16px;
  fill: #666;
}

.file-size {
  color: #666;
}

.file-date {
  color: #666;
  text-align: right;
}

/* --- 新增广告模块样式 --- */

.ad-sidebar {
  position: fixed;
  top: 50%; /* 垂直居中 */
  transform: translateY(-50%);
  width: 120px; /* 广告宽度，可根据图片调整 */
  z-index: 9999; /* 保证在最上层 */
  transition: all 0.3s ease;
  display: none; /* 默认隐藏（移动端优先策略） */
}

.ad-sidebar a {
  display: block;
  width: 100%;
  position: relative;
}

.ad-sidebar img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  border: 1px solid #ddd;
  background: #fff;
}

/* 关闭按钮样式（可选，为了更好的体验） */
.ad-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  background: #333;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  font-size: 14px;
  cursor: pointer;
  z-index: 10;
}

.ad-left {
  left: 10px; /* 距离左边距离 */
}

.ad-right {
  right: 10px; /* 距离右边距离 */
}

/* --- 响应式处理 --- */

/* 只有当屏幕宽度大于 1300px 时才显示左右悬浮广告 
   这个数值需要比 container 宽度 + 2*广告宽度 大，防止遮挡内容 */
@media screen and (min-width: 1300px) {
  .ad-sidebar {
    display: block;
  }
}
