/* ===== 全局样式 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #3E7CB1;
  --primary-dark: #2E5C8A;
  --primary-light: #5A9AD9;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #f8f9fa;
  --white: #ffffff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

/* ===== 导航栏 ===== */
.navbar {
  background: var(--primary-color);
  color: var(--white);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--white);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: var(--transition);
}

.nav-link:hover {
  background: rgba(255,255,255,0.1);
}

.lang-switch {
  display: flex;
  gap: 5px;
}

.lang-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: var(--white);
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover,
.lang-btn.active {
  background: rgba(255,255,255,0.3);
}

/* ===== 头部区域 ===== */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 60px 20px;
  text-align: center;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== 搜索框 ===== */
.search-section {
  padding: 40px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.search-box {
  display: flex;
  gap: 10px;
  background: var(--white);
  padding: 10px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.filter-bar {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  font-size: 0.95rem;
}

.filter-label {
  margin-right: 4px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 10px;
  box-shadow: var(--shadow);
  color: var(--text-color);
}

.filter-chip input {
  accent-color: var(--primary-color);
}



.search-input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary-color);
}

.search-btn {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--primary-dark);
}

/* ===== 分类区域 ===== */
.categories-section {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.categories-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: var(--text-color);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--white);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 4px 16px rgba(62, 124, 177, 0.2);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.category-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
}

.category-count {
  margin-top: 10px;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ===== 最新资源区域 ===== */
.items-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.items-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid var(--primary-color);
}

.sort-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.sort-select {
  padding: 6px 10px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background: var(--white);
  color: var(--text-color);
}

.items-section-header .categories-title {
  margin-bottom: 0;
  font-size: 2rem;
  display: flex;
  align-items: center;
  gap: 15px;
}

.items-section-header .categories-title::before {
  content: "🆕";
  font-size: 2.2rem;
}

.items-count {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 1rem;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
}

.item-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: var(--transition);
  border: 2px solid transparent;
  position: relative;
}

.item-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
  opacity: 0;
  transition: var(--transition);
}

.item-card:hover::before {
  opacity: 1;
}

.item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(62, 124, 177, 0.2);
  border-color: rgba(62, 124, 177, 0.2);
}

/* 资源Logo样式 */
.item-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.item-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.item-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 20px;
}

.item-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
}

.item-name a {
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
}

.item-name a:hover {
  color: var(--white);
  text-decoration: underline;
  opacity: 0.9;
  transform: translateX(3px);
}

.item-category {
  font-size: 0.85rem;
  opacity: 0.9;
  background: rgba(255,255,255,0.2);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
}

.item-body {
  padding: 20px;
}

.item-description {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 15px;
  line-height: 1.6;
}

.item-info {
  display: flex;
  gap: 20px;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 15px;
}

.item-links {
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
}

.download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.download-btn {
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.download-http {
  background: #28a745;
  color: var(--white);
}

.download-ed2k {
  background: #007bff;
  color: var(--white);
}

.download-bt {
  background: #fd7e14;
  color: var(--white);
}

.download-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
}

.page-btn {
  padding: 8px 16px;
  border: 2px solid var(--border-color);
  background: var(--white);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.page-btn.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== FAQ ===== */
.faq-section {
  padding: 60px 20px 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}


.faq-container {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 40px;
}

.faq-title {
  font-size: 1.8rem;
  margin-bottom: 10px;
  text-align: center;
}

.faq-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 30px;
}

.faq-list {
  display: grid;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 20px;
  background: var(--bg-color);
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 28px;
  line-height: 1.5;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::marker {
  color: transparent;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0.1em;
  font-weight: 700;
  color: var(--primary-color);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item summary span {
  display: inline-block;
}



.faq-item p {
  margin-top: 12px;
  color: var(--text-light);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .faq-container {
    padding: 25px 20px;
  }
}

/* ===== 页脚 ===== */
.footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: 40px 20px 20px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.footer-section p {
  opacity: 0.8;
  font-size: 0.95rem;
}

.footer-section a {
  color: var(--white);
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  opacity: 0.8;
  transition: var(--transition);
}

.footer-section a:hover {
  opacity: 1;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  opacity: 0.7;
  font-size: 0.9rem;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .header h1 {
    font-size: 1.8rem;
  }

  .header p {
    font-size: 0.95rem;
  }

  .nav-brand .nav-title {
    font-size: 1.1rem;
  }

  .nav-links {
    gap: 10px;
    align-items: center;
  }

  .nav-link {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .lang-switch {
    display: flex;
    gap: 5px;
  }

  .lang-btn {
    padding: 5px 10px;
    font-size: 0.85rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    flex-direction: column;
  }

  .search-btn {
    width: 100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }


}

@media (max-width: 480px) {
  .qr-codes {
    flex-direction: column;
  }
}

/* ===== 二维码样式 ===== */
.qr-codes {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.qr-code-item {
  text-align: center;
}

.qr-code-wrapper {
  background: var(--white);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 10px;
}

.qr-code-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  display: block;
}

.qr-code-label {
  font-size: 0.95rem;
  color: var(--text-color);
  font-weight: 500;
}

/* ===== 加载动画 ===== */
.loading {
  text-align: center;
  padding: 60px 20px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-light);
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-text {
  font-size: 1.2rem;
}

/* ===== 资源详情页样式 ===== */
.detail-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

/* 面包屑导航 */
.breadcrumb {
  margin-bottom: 30px;
  padding: 15px 20px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
}

.breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb .separator {
  color: var(--text-light);
}

.breadcrumb .current {
  color: var(--text-color);
  font-weight: 600;
}

/* 详情页头部 */
.detail-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 50px;
  border-radius: 16px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.detail-header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: float 20s infinite linear;
}

@keyframes float {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.detail-title-wrapper {
  position: relative;
  z-index: 1;
}

.detail-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.detail-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.3);
}

.detail-category::before {
  content: "📁";
}

/* 详情页主体布局 */
.detail-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  align-items: start;
}

/* 详情内容卡片 */
.detail-content {
  background: var(--white);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.detail-content h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-content h3::before {
  content: "📝";
}

.detail-content p {
  line-height: 1.8;
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 25px;
}

/* 信息标签 */
.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
  padding: 20px;
  background: var(--bg-color);
  border-radius: 12px;
}

.info-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.info-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.info-tag .icon {
  font-size: 1.2rem;
}

.info-tag .label {
  color: var(--text-light);
}

.info-tag .value {
  font-weight: 600;
  color: var(--text-color);
}

/* 侧边栏 */
.detail-sidebar {
  position: sticky;
  top: 100px;
}

/* 快捷下载卡片 */
.quick-download {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 30px;
  border-radius: 16px;
  margin-bottom: 20px;
}

.quick-download h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-download h3::before {
  content: "⚡";
}

.quick-download-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-download-btn {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 14px 20px;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.quick-download-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

.quick-download-btn .icon {
  font-size: 1.3rem;
}

/* 信息概览卡片 */
.info-overview {
  background: var(--white);
  padding: 25px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.info-overview h3 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-overview h3::before {
  content: "📊";
}

.info-overview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.info-overview-row:last-child {
  border-bottom: none;
}

.info-overview-label {
  color: var(--text-light);
  font-size: 0.9rem;
}

.info-overview-value {
  font-weight: 600;
  color: var(--text-color);
  text-align: right;
}

/* 下载区域 */
.download-section {
  background: var(--white);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.download-section h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.download-section h3::before {
  content: "🔽";
}

.download-list {
  display: grid;
  gap: 20px;
}

.download-card {
  background: var(--bg-color);
  padding: 25px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: var(--transition);
  border: 2px solid transparent;
}

.download-card:hover {
  border-color: var(--primary-color);
  background: var(--white);
  box-shadow: 0 4px 12px rgba(62, 124, 177, 0.15);
  transform: translateX(5px);
}

.download-type {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.download-type::before {
  content: "📥";
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 30px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(62, 124, 177, 0.3);
}

.btn-download:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(62, 124, 177, 0.4);
}

.btn-download .icon {
  font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 900px) {
  .detail-main {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  .detail-title {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .items-section-header .categories-title {
    font-size: 1.5rem;
  }

  .items-section-header .categories-title::before {
    font-size: 1.7rem;
  }

  .detail-title {
    font-size: 1.5rem;
  }

  .detail-header {
    padding: 30px 20px;
  }

  .detail-content,
  .download-section {
    padding: 25px 20px;
  }

  .download-card {
    flex-direction: column;
    text-align: center;
  }

  .btn-download {
    width: 100%;
    justify-content: center;
  }
}

/* 广告系统样式 */
.ad-section {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

.ad-container {
  position: relative;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: var(--transition);
}

.ad-container:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ad-link {
  display: block;
  text-decoration: none;
}

.ad-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  background: var(--bg-color);
}

.ad-label {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ===== 友情链接 ===== */
.links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.friend-link {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(62, 124, 177, 0.1);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.friend-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(62, 124, 177, 0.3);
}

@media (max-width: 768px) {
  .ad-section {
    padding: 0 15px;
  }

  .ad-image {
    max-height: 150px;
  }
}
