/* 苹果官网风格样式 */

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 页面淡入效果 */
body {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 113, 227, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 113, 227, 0.8);
}

/* 字体设置 - 苹果风格 */
/* 背景图片样式（电脑默认） */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  color: white;
  background: url('/images/neom.jpg') no-repeat center center fixed;
  background-size: cover;
  line-height: 1.6;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 背景渐变叠加层 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.2) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(128, 0, 128, 0.1) 100%);
  pointer-events: none;
  z-index: 0;
}

/* 背景图片样式（手机） */
@media (max-width: 768px) {
  body {
    background: url('/images/neom-xiao.jpg') no-repeat center center fixed;
    background-size: cover;
  }
}

/* 导航栏样式 */
header {
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
  position: relative;
  padding-bottom: 5px;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #0071e3, transparent);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

nav a:hover {
  opacity: 1;
  color: #0071e3;
}

/* 标题样式 */
h1 {
  font-size: 48px;
  font-weight: 600;
  text-align: center;
  margin: 50px 0 20px;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff, #b0c4de);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

/* 搜索框样式 */
.search-box {
  position: relative;
  max-width: 580px;
  margin: 20px auto 40px;
  padding: 0 20px;
}

.search-box input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  font-size: 17px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1zm0 13a6 6 0 1 0 0-12 6 6 0 0 0 0 12z'/%3E%3Cpath d='M8 4a4 4 0 1 1 0 8 4 4 0 0 1 0-8zm0 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0-2a1 1 0 1 1 0-2 1 1 0 0 1 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px center;
  background-size: 18px;
}

.search-box input:focus {
  outline: none;
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
  transform: translateY(-2px);
}

/* 搜索建议动画 */
#search-history {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: none;
}

#search-history.active {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

.search-box input:focus {
  outline: none;
  border-color: #0071e3;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.2);
}

/* 分区标题样式 */
.section {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

/* 分区标题样式 */
.section-title {
  font-size: 24px;
  font-weight: 600;
  margin: 40px 0 20px;
  padding-left: 10px;
  border-left: 4px solid #0071e3;
  color: white;
  position: relative;
  overflow: hidden;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10px;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #0071e3, transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.section:hover .section-title::after {
  transform: scaleX(1);
}

/* 滚动动画 */
.section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 网格布局样式 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

/* 卡片样式 */
.card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.85));
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 0;
  text-decoration: none;
  color: #1d1d1f;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease, background 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(0, 113, 227, 0.5);
  animation: glow 1.5s infinite alternate;
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(0, 113, 227, 0.3), 0 0 10px rgba(0, 113, 227, 0.2);
  }
  100% {
    box-shadow: 0 0 10px rgba(0, 113, 227, 0.5), 0 0 20px rgba(0, 113, 227, 0.3), 0 0 30px rgba(0, 113, 227, 0.1);
  }
}

/* 卡片装饰元素 */
.card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 0;
}

.card:hover::after {
  opacity: 1;
  animation: shine 1.5s forwards;
}

@keyframes shine {
  to {
    transform: rotate(45deg) translateX(50%);
  }
}

.card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
}

/* 卡片图片容器 */
.card-img-container {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #f5f5f7;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-img-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover .card-img-container img {
  transform: scale(1.05);
}

/* 卡片内容 */
.card-content {
  padding: 16px;
  position: relative;
  z-index: 1;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-desc {
  font-size: 14px;
  color: #6e6e73;
  line-height: 1.4;
}

/* 滚动动画样式 */
.section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 搜索历史样式 */
.search-history-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* 触摸反馈优化 */
@media (hover: none) {
  .card:hover {
    transform: translateY(-3px) scale(1.01);
  }

  nav a:hover {
    opacity: 1;
    color: #0071e3;
  }
}

/* 每日弹窗样式 */
.daily-popup {
  position: fixed !important;
  bottom: 20px;
  right: 20px;
  width: 300px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
  z-index: 1000;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.daily-popup.show {
  transform: translateY(0);
  opacity: 1;
}

.daily-popup-header {
  background: linear-gradient(135deg, #0071e3, #40c8e0);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.daily-popup-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.countdown {
  color: white;
  font-size: 14px;
  margin-right: 15px;
  opacity: 0.9;
}

.close-popup {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0 5px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.close-popup:hover {
  opacity: 1;
}

.daily-popup-content {
  padding: 20px;
  color: #333;
}

.daily-popup-content p {
  margin-bottom: 15px;
  font-size: 14px;
  line-height: 1.5;
}

.popup-button {
  background: #0071e3;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.popup-button:hover {
  background: #005ec2;
}

.popup-button:active {
  transform: scale(0.98);
}

/* 响应式调整 */
@media (max-width: 480px) {
  .daily-popup {
    width: calc(100% - 40px);
    max-width: 300px;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  h1 {
    font-size: 36px;
    margin: 40px 0 15px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
  }

  .search-box {
    max-width: 90%;
  }

  .section-title {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }

  nav {
    gap: 12px;
    padding: 0 10px;
  }

  nav a {
    font-size: 12px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }

  .card-img-container {
    height: 120px;
  }

  .card-title {
    font-size: 16px;
  }

  .card-desc {
    font-size: 13px;
  }

  .section {
    padding: 0 15px;
  }

  .search-box input {
    padding: 12px 14px 12px 40px;
    font-size: 15px;
  }
}  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }

  .card-img-container {
    height: 120px;
  }
}

/* 粒子背景容器 */
#tsparticles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* 页面其他元素置于粒子层上方 */
body > *:not(#tsparticles) {
  position: relative;
  z-index: 1;
}