body {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d3748 100%);
  min-height: 1024px;
}

.search-input::-webkit-input-placeholder {
  color: #999;
}

.search-input {
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.version-list {
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

.version-list.active {
  max-height: none;
  opacity: 1;
  visibility: visible;
}

.rotate-icon {
  transform: rotate(90deg);
  transition: transform 0.3s;
}

.software-item {
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.software-item.hidden {
  opacity: 0;
  transform: translateY(10px);
}

.software-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

button {
  position: relative;
  transition: all 0.2s;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 4px;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: all 0.2s;
}

button:hover::after {
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 1;
}

nav a {
  position: relative;
  transition: all 0.2s;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #3B82F6;
  transition: width 0.3s;
}

nav a:hover::after {
  width: 100%;
}

.fa-search {
  transition: transform 0.2s;
}

.search-input:focus + .fa-search {
  transform: translateY(-50%) scale(1.1);
  color: #3B82F6;
}

.category-transition {
  transition: opacity 0.3s ease;
}

.category-transition.fade-out {
  opacity: 0;
}

.category-transition.fade-in {
  opacity: 1;
}

.version-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: all 0.2s;
}

.version-list a:hover {
  transform: translateY(-1px);
}

.version-list a:active {
  transform: translateY(0);
}

.version-list a i {
  font-size: 0.9em;
}

/* 字体 */
.font-pacifico {
  font-family: 'Pacifico', cursive;
}

/* 按钮样式 */
.btn-download, .btn-tutorial {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-download:hover, .btn-tutorial:hover {
  transform: translateY(-2px);
}

.btn-download:active, .btn-tutorial:active {
  transform: translateY(0);
}

/* 波纹效果 */
.btn-download::after, .btn-tutorial::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: all 0.4s ease;
}

.btn-download:active::after, .btn-tutorial:active::after {
  transform: translate(-50%, -50%) scale(2);
  opacity: 0;
}

/* 导航链接动画 */
.nav-link {
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #3B82F6;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* 系统要求标签 */
.system-tag {
  padding: 0.25rem 0.5rem;
  background-color: #f3f4f6;
  border-radius: 4px;
  font-size: 0.75rem;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  line-height: 1;
  height: 20px;
  transition: all 0.2s ease;
}

.system-tag:hover {
  background-color: #e5e7eb;
}

.system-tag i {
  font-size: 0.75rem;
}

/* 版本信息样式 */
.version-info {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: #666;
}

.version-info span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

/* 加载动画 */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.loading {
  animation: pulse 1.5s infinite;
}

/* 箭头图标旋转动画 */
.fa-chevron-right {
  transition: transform 0.3s ease;
}

.fa-chevron-right.rotate {
  transform: rotate(90deg);
}

/* 点击动画效果 */
.software-item .clicked {
  animation: click-pulse 0.2s ease-out;
}

@keyframes click-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

/* 版本卡片悬停效果 */
.version-list .bg-white {
  transition: all 0.2s ease;
}

.version-list .bg-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 视图切换样式 */
.software-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 修改网格视图样式，只影响软件列表整体，不影响软件项的展示方式 */
.software-list.grid-view,
.software-list.grid-view-3 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 版本网格布局样式 */
.version-grid {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* 版本网格不同列数的样式 */
.version-grid.grid-1 {
  grid-template-columns: 1fr;
}

.version-grid.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.version-grid.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* 网格视图中的版本卡片布局 */
.version-grid.grid-2 .version-card > div,
.version-grid.grid-3 .version-card > div {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.version-grid.grid-2 .version-card .flex-1,
.version-grid.grid-3 .version-card .flex-1 {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.version-grid.grid-2 .version-info,
.version-grid.grid-3 .version-info {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.version-grid.grid-2 .version-card .flex.gap-2,
.version-grid.grid-3 .version-card .flex.gap-2 {
  display: flex;
  gap: 0.5rem !important;
  margin-left: 0 !important;
}

.version-grid.grid-2 .version-card .btn-download,
.version-grid.grid-2 .version-card .btn-tutorial,
.version-grid.grid-3 .version-card .btn-download,
.version-grid.grid-3 .version-card .btn-tutorial {
  flex: 1;
  justify-content: center;
}

/* 调整网格视图中的标题样式 */
.version-grid.grid-2 .version-card h4,
.version-grid.grid-3 .version-card h4 {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 0.25rem;
}

/* 调整网格视图中的版本信息样式 */
.version-grid.grid-2 .version-info span,
.version-grid.grid-3 .version-info span {
  font-size: 0.75rem;
  white-space: nowrap;
}

/* 确保按钮在网格视图中的宽度相等 */
.version-grid.grid-2 .version-card .flex.gap-2,
.version-grid.grid-3 .version-card .flex.gap-2 {
  display: flex;
  justify-content: stretch;
  width: 100%;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .version-grid.grid-2,
  .version-grid.grid-3 {
    grid-template-columns: 1fr;
  }
  
  .view-switcher {
    display: none;
  }

  #toggle-sidebar {
    display: block;
  }
  
  #mobile-sidebar {
    display: block;
  }

  /* 调整移动端内容边距 */
  main {
    padding: 1rem !important;
  }

  /* 调整软件项的边距和布局 */
  .software-item {
    margin-bottom: 1rem;
  }

  /* 调整版本列表的布局 */
  .version-list .version-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* 调整版本卡片的内边距 */
  .version-card {
    padding: 1rem !important;
  }

  /* 调整版本信息的布局 */
  .version-info {
    flex-wrap: wrap;
    gap: 0.5rem !important;
  }

  /* 调整按钮组的布局 */
  .version-card .flex.gap-2 {
    flex-direction: row !important;
    gap: 0.5rem !important;
  }
}

/* 小屏幕手机适配 */
@media (max-width: 375px) {
  .version-card .flex.gap-2 {
    flex-direction: column !important;
  }

  .btn-download, .btn-tutorial {
    width: 100%;
  }

  .version-info {
    font-size: 0.75rem;
  }
}

/* 确保在更小的屏幕上也能正常显示 */
@media (max-width: 320px) {
  main {
    padding: 0.75rem !important;
  }

  .software-item .flex.items-center.gap-4 {
    gap: 0.5rem !important;
  }

  .software-item h3 {
    font-size: 1rem;
  }

  .software-item p {
    font-size: 0.75rem;
  }
}

/* 视图切换按钮样式 */
.view-switcher {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.view-btn.active {
  background-color: rgba(59, 130, 246, 0.1);
}

.view-btn.active i {
  color: #3B82F6 !important;
}

/* 版本卡片基础样式 */
.version-card {
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.version-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 系统要求提示图标包装器 */
.system-requirements-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 1rem;
}

/* 系统要求弹出框 */
.system-requirements-popup {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.system-requirements-wrapper:hover .system-requirements-popup {
  opacity: 1;
  visibility: visible;
}

/* 系统要求图标样式 */
.system-requirements-wrapper i.fa-info-circle {
  font-size: 14px;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s ease;
}

.system-requirements-wrapper:hover i.fa-info-circle {
  color: #3B82F6;
}

/* 列表视图特定样式 */
.software-list.list-view .system-requirements-wrapper {
  margin-left: 0.5rem;
}

.software-list.list-view .system-requirements-wrapper i {
  font-size: 0.875rem;
}

/* 两列视图特定样式 */
.software-list.grid-view .system-requirements-wrapper {
  margin-left: 0.5rem;
}

.software-list.grid-view .system-requirements-wrapper i {
  font-size: 0.875rem;
}

/* 三列视图特定样式 */
.software-list.grid-view-3 .system-requirements-wrapper {
  margin-left: 0.4rem;
}

.software-list.grid-view-3 .system-requirements-wrapper i {
  font-size: 0.8rem;
}

/* 移动端侧边栏样式 */
#mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 250px;
  background-color: white;
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

#mobile-sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}

.sidebar-menu {
  padding: 1rem 0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 移动端导航样式 */
.mobile-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #4a5568;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mobile-nav .nav-link:hover {
  background-color: #f7fafc;
  color: #2d3748;
}

.mobile-nav .nav-link.active {
  background-color: #ebf8ff;
  color: #3182ce;
}

.mobile-nav .nav-link i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

/* 移除下划线样式 */
.mobile-nav .nav-link::after {
  display: none;
}

/* 导航样式 */
.navbar-nav .nav-item {
  margin-bottom: 0.25rem;
}

.navbar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  color: #333;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.navbar-nav .nav-link.active {
  background-color: #3b82f6;
  color: white;
}

/* 跑马灯动画 */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* 垂直跑马灯动画 */
@keyframes marquee-vertical {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}

/* 超长链接容器样式 */
.overflow-link-container {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

/* 超长链接文本样式 */
.overflow-link-text {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 15s linear infinite;
}

/* 当文本超出容器宽度时才显示动画 */
.overflow-link-container:hover .overflow-link-text {
  animation-play-state: running;
}

.overflow-link-container:not(:hover) .overflow-link-text {
  animation-play-state: paused;
}

/* 公告样式优化 */
#announcement-area {
  position: relative;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  backdrop-filter: blur(5px);
  background: linear-gradient(135deg, rgba(30, 144, 255, 0.1), rgba(30, 144, 255, 0.2));
  margin-bottom: 1.5rem;
}

#announcement-area.level-normal {
  border-left: 3px solid #1E9FFF;
}

#announcement-area.level-important {
  border-left: 3px solid #FFB800;
}

#announcement-area.level-urgent {
  border-left: 3px solid #FF5722;
}

#announcement-area.vertical-scroll {
  max-height: 80px;
}

#announcement-content {
  padding: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

/* 滚动公告样式 */
#announcement-area.horizontal-scroll #announcement-content {
  display: inline-block;
  white-space: nowrap;
  padding-right: 50px;
  animation: marquee 20s linear infinite;
  animation-play-state: running;
}

#announcement-area.horizontal-scroll:hover #announcement-content {
  animation-play-state: paused;
}

#announcement-area.vertical-scroll #announcement-content {
  display: inline-block;
  white-space: normal;
  animation: marquee-vertical 15s linear infinite;
  animation-play-state: running;
}

#announcement-area.vertical-scroll:hover #announcement-content {
  animation-play-state: paused;
}

/* 公告关闭按钮 */
.announcement-close-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.announcement-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

/* 弹出层和模态框公告样式 */
.announcement-popup, .announcement-modal {
  padding: 20px;
  border-radius: 8px;
  line-height: 1.6;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background-color: white;
  max-width: 520px;
  position: relative;
  color: #333;
}

.announcement-popup.level-normal, .announcement-modal.level-normal {
  border-left: 4px solid #1E9FFF;
}

.announcement-popup.level-important, .announcement-modal.level-important {
  border-left: 4px solid #FFB800;
}

.announcement-popup.level-urgent, .announcement-modal.level-urgent {
  border-left: 4px solid #FF5722;
}

.announcement-popup .announcement-content, .announcement-modal .announcement-content {
  margin-bottom: 8px;
}

/* 动画定义 */
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

@keyframes marquee-vertical {
  0% { transform: translateY(100%); }
  100% { transform: translateY(-100%); }
}

@keyframes float-in {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 为弹出公告添加入场动画 */
.layui-layer.layui-layer-page .announcement-popup {
  animation: float-in 0.4s ease-out forwards;
}

/* 模态框公告背景 */
.layui-layer-shade {
  background-color: rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(2px);
  transition: all 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
  #announcement-area {
    margin: 0 0 1rem 0;
    border-radius: 6px;
  }
  
  .announcement-close-btn {
    right: 5px;
    width: 20px;
    height: 20px;
    font-size: 10px;
  }
  
  #announcement-content {
    padding: 0.75rem;
    font-size: 0.85rem;
  }
}

/* 软件项样式 */
.software-item {
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.software-item .fas.fa-chevron-right,
.software-item .fas.fa-chevron-down {
  transition: transform 0.2s ease;
}

/* 暗色主题支持 */
:root {
  --text-color: #333;
  --bg-color: #121212;
  --card-bg: #fff;
  --card-border: #eee;
  --primary-color: #3B82F6;
  --hover-bg: #f5f5f5;
  --sidebar-bg: #f9fafb;
  --input-bg: #f0f0f0;
  --input-border: #ddd;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

.dark-theme {
  --text-color: #e0e0e0;
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --card-border: #333;
  --primary-color: #60a5fa;
  --hover-bg: #2a2a2a;
  --sidebar-bg: #1a1a1a;
  --input-bg: #2a2a2a;
  --input-border: #444;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

/* 暗色主题样式覆盖 */
.dark-theme body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

.dark-theme .bg-white {
  background-color: var(--card-bg) !important;
}

.dark-theme .text-gray-500 {
  color: #9ca3af !important;
}

.dark-theme .text-gray-600 {
  color: #d1d5db !important;
}

.dark-theme .shadow-sm {
  box-shadow: 0 1px 2px var(--shadow-color) !important;
}

.dark-theme .shadow-md {
  box-shadow: 0 4px 6px var(--shadow-color) !important;
}

.dark-theme .shadow-lg, .dark-theme .shadow-2xl {
  box-shadow: 0 10px 15px var(--shadow-color) !important;
}

.dark-theme .hover\:shadow-md:hover {
  box-shadow: 0 4px 6px var(--shadow-color) !important;
}

.dark-theme .bg-gray-50, .dark-theme .bg-gray-100 {
  background-color: var(--sidebar-bg) !important;
}

.dark-theme .bg-gray-800 {
  background-color: #000 !important;
}

.dark-theme .border-gray-700 {
  border-color: #4b5563 !important;
}

.dark-theme .hover\:bg-gray-50:hover, .dark-theme .hover\:bg-gray-100:hover {
  background-color: var(--hover-bg) !important;
}

.dark-theme .text-white {
  color: #fff !important;
}

.dark-theme .software-item, .dark-theme .version-card {
  background-color: var(--card-bg) !important;
  border-color: var(--card-border) !important;
}

.dark-theme .software-item h3, .dark-theme .software-item h4, 
.dark-theme main h2, .dark-theme nav h2 {
  color: var(--text-color) !important;
}

.dark-theme .text-blue-500, .dark-theme .text-primary {
  color: var(--primary-color) !important;
}

.dark-theme .bg-blue-50 {
  background-color: rgba(96, 165, 250, 0.1) !important;
}

.dark-theme .border-blue-500 {
  border-color: var(--primary-color) !important;
}

.dark-theme .bg-blue-500 {
  background-color: var(--primary-color) !important;
}

.dark-theme .hover\:bg-blue-50:hover {
  background-color: rgba(96, 165, 250, 0.15) !important;
}

.dark-theme .hover\:bg-blue-600:hover {
  background-color: #4f46e5 !important;
}

/* 暗色主题下的公告样式 */
.dark-theme #announcement-area {
  background: linear-gradient(135deg, rgba(30, 144, 255, 0.15), rgba(30, 144, 255, 0.25));
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dark-theme .announcement-popup, .dark-theme .announcement-modal {
  background-color: var(--card-bg);
  color: var(--text-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.dark-theme .layui-layer-title {
  background-color: var(--sidebar-bg) !important;
  border-bottom: 1px solid var(--card-border) !important;
  color: var(--text-color) !important;
}

.dark-theme .layui-layer {
  background-color: var(--card-bg) !important;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5) !important;
}

.dark-theme .layui-layer-btn a {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
}

/* 暗色主题下的动画效果增强 */
.dark-theme .layui-layer-shade {
  background-color: rgba(0, 0, 0, 0.7) !important;
}

/* 适应多端设备的动画效果 */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 软件图标样式 */
.software-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.software-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 暗色主题下的图标样式 */
.dark-theme .software-icon {
  background-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .software-icon i {
  color: rgba(255, 255, 255, 0.6);
} 