:root {
  --bg-dark: #0a0f1c;
  --bg-card: #111827;
  --primary: #10b981;
  --primary-hover: #059669;
  --accent-red: #ef4444;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border-color: #1f2937;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
}

/* Header & Nav */
header {
  position: sticky;
  top: 0;
  background-color: rgba(10, 15, 28, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: bold;
}
.logo-area img {
  height: 32px;
  border-radius: 4px;
}
.nav-links {
  display: flex;
  gap: 20px;
}
.nav-links a {
  color: var(--text-main);
  font-size: 0.9rem;
  transition: color 0.3s;
}
.nav-links a:hover {
  color: var(--primary);
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}
@media (max-width: 767px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
  }
  .nav-links.active {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
}

/* Hero Section */
.hero {
  padding: 60px 20px;
  text-align: center;
  background: radial-gradient(circle at top, #1e293b 0%, var(--bg-dark) 70%);
}
.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 30px;
}
.download-btn {
  display: inline-block;
  background-color: var(--accent-red);
  color: #fff;
  padding: 15px 40px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 50px;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}
.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}
.update-time {
  margin-top: 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Card Carousel */
.carousel-section {
  padding: 40px 20px;
  overflow: hidden;
  position: relative;
}
.carousel-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  perspective: 1000px;
  height: 350px;
  max-width: 1200px;
  margin: 0 auto;
}
.carousel-card {
  position: relative;
  width: 200px;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.5s ease;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.carousel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel-card.active {
  transform: scale(1.15) translateZ(50px);
  z-index: 10;
  border: 2px solid var(--primary);
}
.carousel-card:not(.active) {
  opacity: 0.6;
  transform: scale(0.9);
}
@media (max-width: 767px) {
  .carousel-container {
    height: 250px;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 20px;
  }
  .carousel-card {
    width: 140px;
    height: 210px;
    flex-shrink: 0;
  }
  .carousel-card.active {
    transform: scale(1.05);
  }
}

/* Play Button Overlay */
.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s;
}
.play-overlay::after {
  content: '';
  width: 50px;
  height: 50px;
  background: rgba(16, 185, 129, 0.8);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-size: 30px;
  background-position: center;
  background-repeat: no-repeat;
}
.carousel-card:hover .play-overlay {
  background: rgba(0,0,0,0.2);
}

/* Marquee Banner */
.marquee-wrapper {
  background-color: var(--primary-hover);
  color: #fff;
  padding: 10px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-content {
  display: inline-block;
  animation: marquee 20s linear infinite;
  font-weight: bold;
}
@keyframes marquee {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* General Section Styles */
.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--primary);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 767px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Feature Text */
.feature-text {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}
.feature-text h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.feature-text p {
  color: var(--text-muted);
  margin-bottom: 15px;
}

/* Movie Cards */
.movie-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s;
  cursor: pointer;
  position: relative;
}
.movie-card:hover {
  transform: translateY(-5px);
}
.movie-card .img-wrapper {
  position: relative;
  aspect-ratio: 3/4;
}
.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.movie-card .info {
  padding: 15px;
}
.movie-card .info h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}
.movie-card .info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Ranking */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.rank-item {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  padding: 15px;
  border-radius: 12px;
  gap: 20px;
}
.rank-num {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  width: 40px;
  text-align: center;
}
.rank-item img {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}
.rank-info {
  flex: 1;
}
.rank-info h4 {
  margin-bottom: 5px;
}
.rank-stats {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 15px;
}
.hot-value {
  color: var(--accent-red);
}

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

/* Timeline */
.timeline {
  border-left: 2px solid var(--primary);
  padding-left: 30px;
  margin-left: 20px;
}
.timeline-item {
  position: relative;
  margin-bottom: 30px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 5px;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
}
.timeline-item h4 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}
.timeline-item p {
  color: var(--text-muted);
}

/* FAQ Accordion */
details {
  background: var(--bg-card);
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
}
summary {
  padding: 15px 20px;
  cursor: pointer;
  font-weight: bold;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--primary);
}
details[open] summary::after {
  content: '-';
}
.faq-content {
  padding: 0 20px 15px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
}

/* Comments */
.comment-section {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 12px;
}
.comment-form textarea {
  width: 100%;
  height: 100px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 15px;
  resize: none;
}
.comment-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}
.comment-list {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.comment-item {
  display: flex;
  gap: 15px;
}
.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.comment-body {
  flex: 1;
}
.comment-body .name {
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 5px;
}
.comment-body .text {
  font-size: 0.95rem;
}

/* Footer */
footer {
  background: #050810;
  padding: 40px 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
}
footer a {
  color: var(--text-muted);
  text-decoration: underline;
}
details.site-about {
  background: none;
  margin: 20px auto;
  max-width: 800px;
  text-align: left;
  border-radius: 0;
}
summary[data-site-about] {
  padding: 0;
  font-size: 0.85rem;
  font-weight: normal;
  color: var(--text-muted);
  display: inline-block;
  cursor: pointer;
}
summary[data-site-about]::after {
  display: none;
}
details.site-about p {
  margin-top: 10px;
  line-height: 1.8;
  font-size: 0.8rem;
  color: #6b7280;
}
.friend-links {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}
.friend-links a {
  color: #4b5563;
  text-decoration: none;
  font-size: 0.8rem;
}
.friend-links a:hover {
  text-decoration: underline;
}