/* 全局样式和变量 */
/* 由宅客基地二开优化 */
:root {
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.3);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --highlight-blue: #3498db;
  --highlight-purple: #9b59b6;
  --highlight-pink: #e91e63;
}

/* 重置和基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  background-color: #0a0a0a;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* 背景效果 */
.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.gradient-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 30%, rgba(52, 152, 219, 0.05) 0%, transparent 20%),
              radial-gradient(circle at 80% 40%, rgba(155, 89, 182, 0.05) 0%, transparent 20%),
              radial-gradient(circle at 30% 80%, rgba(233, 30, 99, 0.05) 0%, transparent 20%);
}

.blur-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}

.circle1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, var(--highlight-blue), var(--highlight-purple));
  top: -100px;
  right: -100px;
}

.circle2 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--highlight-purple), var(--highlight-pink));
  bottom: -100px;
  left: -100px;
}

.circle3 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, var(--highlight-blue), var(--highlight-pink));
  top: 50%;
  left: 30%;
  transform: translate(-50%, -50%);
}

/* 玻璃效果基础样式 */
.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--shadow-color);
}

.glass-section {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--shadow-color);
  border-radius: 16px;
  margin-bottom: 30px;
  padding: 25px;
  transition: all 0.3s ease;
}

.glass-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 4px 20px var(--shadow-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
  opacity: 0.5;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.07);
}

.glass-button {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.5s ease;
}

.glass-button:hover::before {
  left: 100%;
}

.glass-button:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.glass-button:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.05);
}

/* 头部公告 */
.announcement-bar {
  width: 100%;
  padding: 10px 0;
  text-align: center;
  position: relative;
}

/* 导航栏 */
.main-nav {
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-logo {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(45deg, var(--text-primary), var(--glass-highlight));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* 主要内容 */
.content-wrapper {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
  text-align: center;
}

/* 站长推荐 */
.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

.rec-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 15px;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
}

.rec-card i {
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.rec-card span {
  font-weight: 500;
  margin-bottom: 5px;
}

.rec-card p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* iOS应用 */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.cert-notice {
  font-size: 12px;
  margin-top: 5px;
  color: inherit; /* 使用系统默认文字颜色 */
  background-color: var(--glass-background);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--glass-border);
  font-family: 'SF Mono', Monaco, Inconsolata, monospace;
  text-align: center; /* 居中显示 */
  display: inline-block;
  width: auto;
}

.marquee-text {
  /* 移除跑马灯效果，保持居中显示 */
  display: inline-block;
  width: auto;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.app-card {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 14px;
}

.section-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.category-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 系统相关 */
.system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.system-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: all 0.3s ease;
}

.system-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.07);
}

.system-info {
  margin-bottom: 15px;
}

.system-info h3 {
  font-size: 18px;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.system-info p {
  font-size: 14px;
  color: var(--text-secondary);
}

.system-card .glass-button {
  align-self: flex-start;
}

/* 广告位置样式 */
.ad-section {
  margin-bottom: 30px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  padding: 15px;
}

.ad-container {
  display: flex;
  flex-direction: row;
  gap: 15px;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1100px;
}

.ad-banner {
  display: block;
  width: 50%;
  max-width: 540px;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ad-banner:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ad-image {
  width: 100%;
  height: 166px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  transition: all 0.3s ease;
}

/* 找到我们 */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
}

.contact-card i {
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.contact-card span {
  font-weight: 500;
  margin-bottom: 5px;
}

.contact-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 页脚 */
.main-footer {
  margin-top: 50px;
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .content-wrapper {
    padding: 0 15px;
  }
  
  .glass-section {
    padding: 20px 15px;
  }
  
  .section-title {
    font-size: 20px;
  }
  
  .recommendation-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .apps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .system-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .category-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .category-buttons .glass-button {
    width: 100%;
  }
  
  .ad-section {
    margin-bottom: 20px;
    padding: 10px;
  }
  
  .ad-container {
    flex-direction: column;
    gap: 10px;
    max-width: 540px;
  }
  
  .ad-banner {
    width: 100%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  }
  
  .ad-banner:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.12);
  }
  
  .ad-image {
    height: 75px;
  }
  
  /* 平板设备上的证书通知样式 */
  .marquee-text {
    max-width: 250px;
  }
}

@media (max-width: 480px) {
  .recommendation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .apps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .ad-section {
    margin-bottom: 15px;
    padding: 10px 10px;
  }
  
  .ad-container {
    flex-direction: column;
    gap: 10px;
  }
  
  .ad-banner {
    width: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  }
  
  .ad-banner:hover {
    transform: translateY(-2px) scale(1.005);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .ad-image {
    height: 50px;
  }
  
  /* 移动设备上的证书通知样式 */
  .marquee-text {
    max-width: 200px;
  }
}