/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

body {
  background-color: #f8fafc;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 页首样式 */
header {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: white;
  text-align: center;
  padding: 2.5rem 1rem;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.2);
  position: relative;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: cover;
}

.header-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto;
}

/* 内容区域样式 */
main {
  flex: 1;
  padding: 2.5rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.apps-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.app-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #eef2f7;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(42, 82, 152, 0.15);
  border-color: #2a5298;
}

.app-icon {
  background: linear-gradient(135deg, #2a5298, #3a6bc5);
  color: white;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.app-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.app-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e3c72;
  margin-bottom: 0.8rem;
}

.app-description {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.app-category {
  display: inline-block;
  background: #eef5ff;
  color: #2a5298;
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  align-self: flex-start;
}

.app-link {
  display: inline-block;
  background: #2a5298;
  color: white;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid #2a5298;
}

.app-link:hover {
  background: white;
  color: #2a5298;
}

.section-title {
  font-size: 1.8rem;
  color: #1e3c72;
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.8rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, #1e3c72, #2a5298);
  border-radius: 2px;
}

.intro-text {
  text-align: center;
  color: #666;
  max-width: 800px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

/* 搜索和筛选样式 */
.search-container {
  margin-top: 3rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-box {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 1.5rem;
}

.search-box i {
  color: #64748b;
  margin-right: 0.8rem;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: #334155;
  outline: none;
}

.filter-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.filter-container span {
  font-weight: 500;
  color: #475569;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.filter-tag {
  background: #eef5ff;
  color: #2a5298;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 1px solid #eef5ff;
}

.filter-tag:hover {
  background: #dbeafe;
}

.filter-tag.active {
  background: #2a5298;
  color: white;
}

/* 页脚样式 */
footer {
  background: #1e3c72;
  color: white;
  padding: 2rem 1rem;
  text-align: center;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.footer-link:hover {
  color: white;
  text-decoration: underline;
}

.icp-info {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.icp-info a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
}

/* 空状态样式 */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
  grid-column: 1 / -1;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: #cbd5e1;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #475569;
}

/* 响应式设计 */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .apps-container {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .section-title {
    font-size: 1.5rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.8rem;
  }

  .filter-container {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  header {
    padding: 2rem 1rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .apps-container {
    grid-template-columns: 1fr;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-card {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

.app-card:nth-child(1) {
  animation-delay: 0.1s;
}
.app-card:nth-child(2) {
  animation-delay: 0.2s;
}
.app-card:nth-child(3) {
  animation-delay: 0.3s;
}
.app-card:nth-child(4) {
  animation-delay: 0.4s;
}
.app-card:nth-child(5) {
  animation-delay: 0.5s;
}
.app-card:nth-child(6) {
  animation-delay: 0.6s;
}
