:root {
  --bg-dark: #121212;
  --bg-card: #1e1e1e;
  --red: #e63946;
  --red-hover: #ff4d5a;
  --yellow: #f4a261;
  --text-main: #f1faee;
  --text-muted: #a8a8a8;
  --border-color: #333;
  --glow-red: rgba(230, 57, 70, 0.4);
  --glow-yellow: rgba(244, 162, 97, 0.4);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* 纸巾雨样式 */
.tissue-rain {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 9999; overflow: hidden;
}
.tissue {
  position: absolute; top: -50px;
  width: 20px; height: 20px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px 2px 5px 5px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
  animation: fall linear infinite;
}
.tissue::after {
  content: ''; position: absolute; top: -5px; left: 5px;
  width: 10px; height: 5px; background: inherit;
  border-radius: 5px 5px 0 0;
}
@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(360deg); opacity: 0; }
}
.tissue:nth-child(1) { left: 10%; animation-duration: 8s; animation-delay: 0s; }
.tissue:nth-child(2) { left: 25%; animation-duration: 10s; animation-delay: 2s; }
.tissue:nth-child(3) { left: 45%; animation-duration: 7s; animation-delay: 1s; }
.tissue:nth-child(4) { left: 65%; animation-duration: 9s; animation-delay: 3s; }
.tissue:nth-child(5) { left: 85%; animation-duration: 11s; animation-delay: 4s; }
.tissue:nth-child(6) { left: 50%; animation-duration: 8s; animation-delay: 5s; }
.tissue:nth-child(7) { left: 75%; animation-duration: 12s; animation-delay: 1.5s; }
.tissue:nth-child(8) { left: 30%; animation-duration: 6s; animation-delay: 2.5s; }

/* 导航 */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-area img { height: 32px; border-radius: 6px; }
.logo-area span { font-size: 18px; font-weight: bold; color: var(--yellow); }

.nav-menu { display: flex; gap: 15px; }
.nav-menu a {
  font-size: 14px; color: var(--text-main); padding: 6px 12px;
  border-radius: 20px; border: 1px solid transparent;
  transition: all 0.3s;
}
.nav-menu a:hover {
  border-color: var(--yellow);
  background: rgba(244, 162, 97, 0.1);
  box-shadow: 0 0 10px var(--glow-yellow);
}
.nav-toggle {
  display: none; background: var(--red); color: #fff; border: none;
  padding: 8px 16px; border-radius: 20px; cursor: pointer;
  font-size: 14px; font-weight: bold;
}
@media (max-width: 1024px) {
  .nav-menu { gap: 10px; }
  .nav-menu a { font-size: 12px; padding: 4px 8px; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none; position: absolute; top: 64px; left: 0; width: 100%;
    background: #1a1a1a; flex-direction: column; padding: 20px;
    border-bottom: 1px solid var(--border-color);
  }
  .nav-menu.active { display: flex; }
  .nav-menu a { font-size: 16px; padding: 10px; text-align: center; }
}

/* 首屏 */
.hero {
  padding: 60px 20px; text-align: center; position: relative;
  background: radial-gradient(circle at center, #2a1a1a 0%, var(--bg-dark) 70%);
}
.hero h1 {
  font-size: 32px; color: var(--yellow); margin-bottom: 20px;
  text-shadow: 0 0 20px var(--glow-yellow);
}
.hero p {
  font-size: 16px; color: var(--text-muted); max-width: 800px; margin: 0 auto 30px;
}
.btn-download {
  display: inline-block; background: var(--red); color: #fff;
  padding: 15px 40px; font-size: 20px; font-weight: bold;
  border-radius: 30px; box-shadow: 0 4px 15px var(--glow-red);
  transition: all 0.3s; border: none; cursor: pointer;
}
.btn-download:hover {
  background: var(--red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--glow-red);
}
.update-time {
  display: block; margin-top: 15px; font-size: 12px; color: var(--text-muted);
}

/* 轮播图 */
.carousel-section { padding: 40px 20px; max-width: 1200px; margin: 0 auto; }
.carousel-container {
  display: flex; gap: 15px; overflow-x: auto; padding: 20px 10px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.carousel-container::-webkit-scrollbar { display: none; }
.carousel-card {
  flex: 0 0 260px; height: 360px; border-radius: 16px;
  overflow: hidden; position: relative; scroll-snap-align: center;
  border: 2px solid transparent; transition: border-color 0.3s;
  cursor: pointer;
}
.carousel-card:hover { border-color: var(--yellow); }
.carousel-card img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s;
}
.carousel-card:hover img { transform: scale(1.05); }
.play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 50px; height: 50px; background: rgba(0,0,0,0.5);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s;
}
.carousel-card:hover .play-btn { opacity: 1; }
.play-btn::after {
  content: ''; border-style: solid; border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff; margin-left: 4px;
}
@media (min-width: 768px) {
  .carousel-card { flex: 0 0 300px; height: 420px; }
}

/* 滚动横幅 */
.ticker-wrap {
  width: 100%; overflow: hidden; background: #2a1a1a; padding: 10px 0;
  border-top: 1px solid #4a2a2a; border-bottom: 1px solid #4a2a2a;
}
.ticker {
  display: inline-block; white-space: nowrap;
  animation: ticker 20s linear infinite;
}
.ticker span {
  display: inline-block; padding: 0 30px; color: var(--yellow); font-size: 14px;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 区块通用 */
section { padding: 60px 20px; }
.section-title {
  font-size: 24px; color: var(--yellow); text-align: center; margin-bottom: 40px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.section-title::before, .section-title::after {
  content: ''; width: 40px; height: 2px; background: var(--red);
}
.grid-container {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px;
  max-width: 1200px; margin: 0 auto;
}
@media (min-width: 768px) { .grid-container { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid-container { grid-template-columns: repeat(6, 1fr); } }

.card {
  background: var(--bg-card); border-radius: 12px; overflow: hidden;
  position: relative; cursor: pointer; transition: transform 0.3s;
}
.card:hover { transform: translateY(-5px); }
.card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.card p { padding: 10px; font-size: 13px; text-align: center; color: var(--text-muted); }

/* 软件特色 */
.feature-box {
  max-width: 800px; margin: 0 auto; background: var(--bg-card);
  padding: 30px; border-radius: 16px; border: 1px solid var(--border-color);
}
.feature-box p { font-size: 15px; line-height: 1.8; color: var(--text-main); }

/* 弹幕互动 */
.danmaku-container {
  position: relative; max-width: 800px; margin: 0 auto;
  border-radius: 16px; overflow: hidden; aspect-ratio: 16/9;
  background: #000;
}
.danmaku-container img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.danmaku-layer {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: hidden;
}
.danmaku-item {
  position: absolute; color: #fff; font-size: 16px; font-weight: bold;
  white-space: nowrap; text-shadow: 1px 1px 2px #000;
  animation: danmakuMove linear forwards;
}
@keyframes danmakuMove {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* 排行榜 */
.rank-list { max-width: 800px; margin: 0 auto; }
.rank-item {
  display: flex; align-items: center; gap: 15px; padding: 15px;
  background: var(--bg-card); border-radius: 12px; margin-bottom: 10px;
}
.rank-item img { width: 60px; height: 80px; object-fit: cover; border-radius: 8px; }
.rank-info { flex: 1; }
.rank-info h3 { font-size: 16px; color: var(--text-main); margin-bottom: 5px; }
.rank-stats { display: flex; gap: 15px; font-size: 12px; color: var(--text-muted); }
.rank-num {
  font-size: 20px; font-weight: bold; color: var(--red); width: 30px; text-align: center;
}

/* AcFan历史 */
.history-box {
  max-width: 800px; margin: 0 auto; background: var(--bg-card); padding: 30px;
  border-radius: 16px; border: 1px solid var(--border-color);
}
.history-box p { margin-bottom: 15px; font-size: 15px; color: var(--text-muted); }

/* 常见问题 */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border-color); }
.faq-question {
  width: 100%; text-align: left; background: none; border: none;
  color: var(--text-main); font-size: 16px; padding: 20px 0;
  cursor: pointer; display: flex; justify-content: space-between;
  font-weight: bold;
}
.faq-question::after { content: '+'; font-size: 20px; color: var(--yellow); }
.faq-item.active .faq-question::after { content: '-'; }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.3s;
  font-size: 14px; color: var(--text-muted); padding-bottom: 0;
}
.faq-item.active .faq-answer { padding-bottom: 20px; }

/* 网友热议 */
.comment-section { max-width: 800px; margin: 0 auto; }
.comment-list { margin-bottom: 30px; }
.comment-item {
  display: flex; gap: 15px; margin-bottom: 20px;
  background: var(--bg-card); padding: 15px; border-radius: 12px;
}
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.comment-content { flex: 1; }
.comment-user { font-size: 14px; font-weight: bold; color: var(--yellow); margin-bottom: 5px; }
.comment-text { font-size: 14px; color: var(--text-main); }

.comment-form { display: flex; flex-direction: column; gap: 15px; }
.comment-form textarea {
  width: 100%; height: 100px; background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 12px; padding: 15px; color: var(--text-main); font-size: 14px; resize: none;
}
.comment-form textarea:focus { outline: none; border-color: var(--yellow); }
.btn-submit {
  align-self: flex-end; background: var(--red); color: #fff; border: none;
  padding: 10px 30px; border-radius: 20px; font-size: 16px; cursor: pointer;
  transition: background 0.3s;
}
.btn-submit:hover { background: var(--red-hover); }

/* 弹窗 */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.8); z-index: 1000;
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--bg-card); padding: 40px; border-radius: 16px;
  text-align: center; max-width: 400px; width: 90%;
  border: 1px solid var(--border-color);
}
.modal-box h3 { font-size: 20px; color: var(--yellow); margin-bottom: 15px; }
.modal-box p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.modal-close {
  background: var(--red); color: #fff; border: none; padding: 10px 20px;
  border-radius: 20px; cursor: pointer;
}

/* 页脚 */
footer {
  padding: 40px 20px; text-align: center; color: var(--text-muted);
  border-top: 1px solid var(--border-color); font-size: 12px;
}
footer p { margin-bottom: 10px; }
footer a { color: var(--text-muted); transition: color 0.3s; }
footer a:hover { color: var(--yellow); }