/* =============================================
   大年资源软件库 - 科技风主样式
   主色: #0099FF  背景: #0a0e1a  卡片: #111827
============================================= */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0099FF;
  --primary-glow: rgba(0,153,255,0.35);
  --primary-dark: #0077cc;
  --bg-base: #0a0e1a;
  --bg-card: #111827;
  --bg-card2: #1a2235;
  --bg-nav: rgba(10,14,26,0.92);
  --border: rgba(0,153,255,0.15);
  --border-hover: rgba(0,153,255,0.5);
  --text-primary: #e8f0fe;
  --text-secondary: #8899aa;
  --text-muted: #4a5568;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-blue: 0 0 20px rgba(0,153,255,0.2);
  --transition: all 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: #33aaff; }

img { max-width: 100%; display: block; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 3px; }

/* =============================================
   导航栏
============================================= */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex; align-items: center;
}

.navbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
}

.navbar-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.navbar-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; box-shadow: var(--shadow-blue);
}

.navbar-logo span.accent { color: var(--primary); }

.navbar-nav {
  display: flex; align-items: center; gap: 4px; list-style: none;
}

.navbar-nav li a {
  display: block; padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: var(--transition);
}

.navbar-nav li a:hover, .navbar-nav li a.active {
  color: var(--primary); background: rgba(0,153,255,0.1);
}

.navbar-actions { display: flex; align-items: center; gap: 10px; }

.navbar-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text-primary); font-size: 22px; padding: 4px;
}

/* =============================================
   布局容器
============================================= */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.page-wrapper { padding-top: 64px; min-height: 100vh; }
.main-content { padding: 32px 0 60px; }

/* =============================================
   按钮
============================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 22px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: none; transition: var(--transition); white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,153,255,0.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 20px rgba(0,153,255,0.55);
  transform: translateY(-1px);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover {
  background: rgba(0,153,255,0.1);
  transform: translateY(-1px);
}

.btn-danger { background: #e53e3e; color: #fff; }
.btn-danger:hover { background: #c53030; }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* =============================================
   轮播图
============================================= */
.banner-section { width: 100%; overflow: hidden; position: relative; }

.swiper-container {
  width: 100%; height: 480px; position: relative; overflow: hidden;
}

.swiper-slide {
  position: absolute; width: 100%; height: 100%;
  opacity: 0; transition: opacity 0.7s ease;
}
.swiper-slide.active { opacity: 1; }

.swiper-slide img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.75);
}

.swiper-slide .slide-content {
  position: absolute; bottom: 60px; left: 80px;
  z-index: 2;
}
.swiper-slide .slide-title {
  font-size: 36px; font-weight: 700; color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.swiper-dots {
  position: absolute; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 10;
}
.swiper-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.4); cursor: pointer; transition: var(--transition);
}
.swiper-dot.active {
  background: var(--primary); width: 24px; border-radius: 4px;
}

.swiper-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10; background: rgba(0,0,0,0.4); color: #fff;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 1px solid rgba(255,255,255,0.2);
  transition: var(--transition); font-size: 18px;
}
.swiper-btn:hover { background: var(--primary); }
.swiper-prev { left: 20px; }
.swiper-next { right: 20px; }

/* =============================================
   区块标题
============================================= */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 22px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
}

.section-title::before {
  content: ''; display: block;
  width: 4px; height: 22px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
}

.section-tabs {
  display: flex; gap: 4px;
  background: var(--bg-card); padding: 4px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.tab-btn {
  padding: 6px 16px; border-radius: 6px;
  font-size: 13px; cursor: pointer; border: none;
  background: transparent; color: var(--text-secondary);
  transition: var(--transition);
}
.tab-btn.active, .tab-btn:hover {
  background: var(--primary); color: #fff;
}

/* =============================================
   软件卡片
============================================= */
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.soft-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.soft-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-blue);
  transform: translateY(-4px);
}

.soft-card-cover {
  width: 100%; aspect-ratio: 16/9; overflow: hidden;
  background: var(--bg-card2);
}

.soft-card-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s ease;
}
.soft-card:hover .soft-card-cover img { transform: scale(1.05); }

.soft-card-body { padding: 14px; }

.soft-card-title {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.soft-card-desc {
  font-size: 12px; color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 12px;
}

.soft-card-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.soft-card-badges {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.soft-card-btn {
  flex-shrink: 0;
}

.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 500;
}
.badge-hot { background: rgba(255,77,79,0.15); color: #ff4d4f; }
.badge-new { background: rgba(0,153,255,0.15); color: var(--primary); }
.badge-recommend { background: rgba(82,196,26,0.15); color: #52c41a; }

/* =============================================
   表单
============================================= */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.form-group { margin-bottom: 20px; }

.form-label {
  display: block; font-size: 14px; color: var(--text-secondary);
  margin-bottom: 8px; font-weight: 500;
}

.form-control {
  width: 100%; padding: 11px 16px;
  background: var(--bg-base); color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card2);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { min-height: 100px; resize: vertical; }

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* =============================================
   公告列表
============================================= */
.notice-list { display: flex; flex-direction: column; gap: 12px; }

.notice-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between;
  transition: var(--transition); cursor: pointer;
}
.notice-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card2);
  transform: translateX(4px);
}

.notice-title {
  font-size: 15px; font-weight: 500; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.notice-title::before {
  content: ''; display: block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--primary); flex-shrink: 0;
}

.notice-time { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* =============================================
   页脚
============================================= */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

.footer-text { font-size: 13px; color: var(--text-muted); }
.footer-text a { color: var(--text-secondary); }
.footer-text a:hover { color: var(--primary); }

/* =============================================
   页面标题区
============================================= */
.page-hero {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card2) 100%);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 32px;
  margin-bottom: 32px;
  position: relative; overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,153,255,0.08) 0%, transparent 70%);
}

.page-hero-title {
  font-size: 28px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 8px;
}
.page-hero-sub { font-size: 14px; color: var(--text-secondary); }

/* =============================================
   空状态
============================================= */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 14px; }

/* =============================================
   Toast提示
============================================= */
.toast {
  position: fixed; top: 80px; right: 24px; z-index: 9999;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.5s forwards;
  max-width: 320px;
}
.toast-success { background: #1a4731; color: #52c41a; border: 1px solid #52c41a; }
.toast-error   { background: #3b1a1a; color: #ff4d4f; border: 1px solid #ff4d4f; }

@keyframes slideIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }
@keyframes fadeOut { from { opacity:1; } to { opacity:0; pointer-events:none; } }

/* =============================================
   Loading
============================================= */
.loading {
  display: flex; justify-content: center; align-items: center;
  padding: 40px;
}
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   响应式（全局优化）
============================================= */
@media (max-width: 768px) {
  /* 导航 */
  .navbar-nav {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }
  .navbar-nav.open { display: flex; }
  .navbar-toggle { display: block; }

  /* 容器 */
  .container { padding: 0 14px; }
  .main-content { padding: 16px 0 48px; }

  /* 轮播图 */
  .swiper-container { height: 200px; }
  .swiper-slide .slide-content { left: 16px; bottom: 24px; }
  .swiper-slide .slide-title { font-size: 18px; }
  .swiper-dots { bottom: 12px; }
  .swiper-btn { width: 36px; height: 36px; font-size: 16px; }

  /* 软件网格 */
  .software-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .soft-card-body { padding: 10px; }
  .soft-card-title { font-size: 13px; }
  .soft-card-desc { font-size: 11px; -webkit-line-clamp: 1; }
  .soft-card-footer { flex-wrap: wrap; }
  .soft-card-footer .btn { margin-top: 6px; }

  /* 区块头部 */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
  }
  .section-title { font-size: 17px; }
  .section-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    width: 100%;
  }
  .tab-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    font-size: 12px;
  }

  /* 表单 */
  .form-card { padding: 20px 14px; }
  .form-group { margin-bottom: 16px; }

  /* 公告 */
  .notice-item {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .notice-title { font-size: 14px; }

  /* 搜索栏 */
  .search-bar {
    flex-direction: row;
    gap: 8px;
    margin-bottom: 16px;
  }
  .search-input { min-height: 42px; }

  /* 软件详情 */
  .detail-layout { grid-template-columns: 1fr !important; }
  .detail-cover { aspect-ratio: 16/9; }
  .detail-info { padding: 16px 0 0; }
  .detail-title { font-size: 20px; }
  .download-card {
    position: static !important;
    margin-top: 16px;
  }

  /* 页面标题 */
  .page-hero { padding: 24px 0 20px; margin-bottom: 20px; }
  .page-hero-title { font-size: 22px; }
  .page-hero-sub { font-size: 13px; }

  /* 通用间距 */
  .page-hero::after { display: none; }

  /* 分页 */
  .pager { gap: 4px; margin-top: 24px; }
  .pager-btn { min-width: 32px; height: 32px; font-size: 12px; padding: 0 8px; }
}

@media (max-width: 480px) {
  /* 更小屏幕：单列软件 */
  .software-grid { gap: 8px; }
  .soft-card-body { padding: 8px; }
  .soft-card-title { font-size: 12px; }
  .soft-card-footer { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .soft-card-badges { width: 100%; }
  .soft-card-btn { width: 100%; text-align: center; margin-top: 0; }

  /* 页面标题缩小 */
  .page-hero-title { font-size: 20px; }
  .page-hero { padding: 20px 0 16px; }

  /* 表格/列表在移动端 */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* 按钮优化 */
  .btn-lg { padding: 10px 24px; font-size: 14px; }
}

/* =============================================
   流光边框动效（科技感装饰）
============================================= */
@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 5px var(--primary-glow); }
  50% { box-shadow: 0 0 20px var(--primary-glow), 0 0 40px rgba(0,153,255,0.15); }
}

.glow-border { animation: borderGlow 3s ease infinite; }

/* =============================================
   分页
============================================= */
.pager {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; margin-top: 32px;
}
.pager-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  background: var(--bg-card); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; transition: var(--transition);
}
.pager-btn:hover { color: var(--primary); border-color: var(--primary); }
.pager-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
