/* 工具下载站 - 现代浏览器主样式（Flexbox） */
/* 兼容：Chrome 29+ / Firefox 28+ / Edge 12+ / IE11 / Android 7+ */
/* IE9 及以下由 style.legacy.css 兜底 */

/* ===== 基础 ===== */
html {
  font-size: 14px;
  line-height: 1.6;
}

body {
  font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  color: #333;
  background: #f2f3f5;
}

a { color: #333; text-decoration: none; }
a:hover { color: #1a73e8; }
img { border: 0; max-width: 100%; }
ul, ol { list-style: none; }

.wrap {
  width: 96%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== 顶栏 ===== */
.topbar {
  background: #1a73e8;
  color: #fff;
  padding: 10px 0;
}

.topbar .wrap {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  white-space: nowrap;
}
.logo a { color: #fff; }

.nav {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  gap: 20px;
}
.nav a {
  color: #fff;
  font-size: 15px;
  white-space: nowrap;
}
.nav a:hover { text-decoration: underline; }

.searchbox {
  margin-left: auto;
}

.searchbox form {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
}

.searchbox input[type="text"] {
  width: 220px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #ccc;
  font-size: 13px;
  background: #fff;
}

.searchbox input[type="submit"] {
  height: 32px;
  padding: 0 16px;
  border: 0;
  background: #0b57d0;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}
.searchbox input[type="submit"]:hover { background: #0842a0; }

/* ===== 主体两栏 ===== */
.main {
  display: -ms-flexbox;
  display: flex;
  gap: 20px;
  -ms-flex-align: start;
  align-items: flex-start;
  margin: 15px auto;
}

.content {
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
}

/* 无侧边栏时占满整行 */
.content:only-child {
  -ms-flex: 0 0 100%;
  flex: 0 0 100%;
  max-width: 100%;
}

.sidebar {
  -ms-flex: 0 0 280px;
  flex: 0 0 280px;
  min-width: 0;
}

.box {
  background: #fff;
  border: 1px solid #e0e0e0;
  margin-bottom: 15px;
}
.box-title {
  font-size: 16px;
  font-weight: bold;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  border-left: 3px solid #1a73e8;
  background: #fafafa;
}
.box-body { padding: 15px; }

/* ===== 分类导航 ===== */
.cat-list {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 10px;
}
.cat-list li {
  -ms-flex: 1 1 calc(25% - 10px);
  flex: 1 1 calc(25% - 10px);
  min-width: 120px;
}
.cat-list a {
  display: block;
  text-align: center;
  padding: 12px 0;
  background: #f5f7fa;
  border: 1px solid #e8eaee;
  font-size: 14px;
}
.cat-list a:hover {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}

/* ===== 软件列表 ===== */
.soft-list li {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: start;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
}
.soft-list li:last-child { border-bottom: 0; }

.soft-icon {
  -ms-flex: 0 0 48px;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  background: #1a73e8;
}

.soft-info {
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
}

.soft-name {
  font-size: 15px;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.soft-name a:hover { color: #1a73e8; }

.soft-meta {
  color: #888;
  font-size: 12px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.soft-desc {
  color: #666;
  font-size: 13px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.soft-btn {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-left: auto;
  margin-top: 4px;
  white-space: nowrap;
}

.btn {
  display: inline-block;
  padding: 6px 18px;
  background: #1a73e8;
  color: #fff;
  font-size: 13px;
  border: 0;
  cursor: pointer;
  text-align: center;
}
.btn:hover { background: #0b57d0; }
.btn-gray { background: #888; }
.btn-gray:hover { background: #666; }

/* ===== 下载按钮组 ===== */
.download-btns {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.btn-primary {
  background: #1a73e8;
  color: #fff;
}
.btn-primary:hover { background: #0b57d0; }

/* ===== 排行榜 ===== */
.rank-list li {
  padding: 8px 15px;
  border-bottom: 1px solid #f0f0f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-num {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  background: #c4c7cc;
  color: #fff;
  font-size: 12px;
  margin-right: 8px;
}
.rank-top .rank-num { background: #e8710a; }

/* ===== 详情页 ===== */
.detail-head {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: start;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 15px;
}
.detail-head .soft-icon {
  -ms-flex: 0 0 64px;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  line-height: 64px;
  font-size: 26px;
}
.detail-head .soft-info {
  margin-left: 0;
}
.detail-name { font-size: 20px; font-weight: bold; }
.detail-meta {
  color: #888;
  font-size: 13px;
  margin: 6px 0 10px;
}
.detail-desc { line-height: 1.8; color: #555; }

/* ===== 面包屑 ===== */
.crumb { padding: 10px 0; color: #888; font-size: 13px; }
.crumb a { color: #1a73e8; }

/* ===== 底部 ===== */
.footer {
  background: #333;
  color: #aaa;
  text-align: center;
  padding: 20px 0;
  margin-top: 20px;
  font-size: 13px;
}
.footer b { color: #ddd; }

/* ===== 响应式 ===== */
@media screen and (max-width: 768px) {
  .topbar .wrap {
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-align: stretch;
    align-items: stretch;
    gap: 10px;
  }

  .nav {
    -ms-flex-order: 3;
    order: 3;
    gap: 12px;
  }

  .searchbox {
    margin-left: 0;
    -ms-flex-order: 2;
    order: 2;
  }
  .searchbox form { width: 100%; }
  .searchbox input[type="text"] {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    width: auto;
  }

  .main {
    -ms-flex-direction: column;
    flex-direction: column;
  }

  .sidebar {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 100%;
  }

  .cat-list li {
    -ms-flex: 1 1 calc(50% - 10px);
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
  }

  .soft-list li {
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
  }
  .soft-btn {
    margin-left: 60px;
    margin-top: 8px;
  }

  .detail-head {
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
  }

  .download-btns {
    margin-left: 0;
  }
}

