:root {
  --bg-dark: #0a0a0a;
  --bg-card: #161616;
  --primary-red: #e50914;
  --accent-yellow: #f5c518;
  --text-main: #f2f2f2;
  --text-muted: #999;
  --border: #2a2a2a;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  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: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-red);
}
.logo-wrap img {
  height: 32px;
  border-radius: 6px;
}
.nav-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: block;
}
.nav-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.nav-menu.active {
  display: flex;
}
.nav-menu a {
  padding: 12px 20px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
}
.nav-menu a:hover {
  color: var(--primary-red);
}
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
  .nav-menu {
    display: flex;
    flex-direction: row;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    width: auto;
    gap: 20px;
  }
  .nav-menu a {
    padding: 0;
    border: none;
  }
}

/* Hero & Carousel */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}
h1 {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--text-main);
}
h1 span {
  color: var(--primary-red);
}
.download-btn {
  display: inline-block;
  background: var(--accent-yellow);
  color: #000;
  font-size: 20px;
  font-weight: bold;
  padding: 15px 40px;
  border-radius: 50px;
  margin-bottom: 40px;
  box-shadow: 0 4px 15px rgba(245, 197, 24, 0.3);
  transition: transform 0.2s;
}
.download-btn:hover {
  transform: scale(1.05);
}

/* Carousel */
.carousel-wrap {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  overflow: hidden;
}
.carousel {
  position: relative;
  width: 200px;
  height: 300px;
  transform-style: preserve-3d;
  transition: transform 0.5s;
}
.card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.8);
  transition: transform 0.5s, opacity 0.5s;
  cursor: pointer;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(0,0,0,0.5);
  border: 2px solid #fff;
  border-radius: 50%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8 5v14l11-7z"/></svg>');
  background-size: 30px;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.card:hover::after {
  opacity: 1;
}
/* Card positions */
.card[data-pos="0"] { transform: translateX(0) scale(1.2); z-index: 5; opacity: 1; }
.card[data-pos="1"] { transform: translateX(120px) scale(0.9); z-index: 4; opacity: 0.8; }
.card[data-pos="2"] { transform: translateX(220px) scale(0.7); z-index: 3; opacity: 0.6; }
.card[data-pos="3"] { transform: translateX(-120px) scale(0.9); z-index: 4; opacity: 0.8; }
.card[data-pos="4"] { transform: translateX(-220px) scale(0.7); z-index: 3; opacity: 0.6; }
.card[data-pos="hidden"] { transform: translateX(0) scale(0.5); z-index: 1; opacity: 0; pointer-events: none; }

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}
.carousel-controls button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
}
@media (max-width: 767px) {
  .carousel-wrap { height: 300px; }
  .carousel { width: 140px; height: 210px; }
  .card[data-pos="1"] { transform: translateX(80px) scale(0.9); }
  .card[data-pos="2"] { transform: translateX(140px) scale(0.7); }
  .card[data-pos="3"] { transform: translateX(-80px) scale(0.9); }
  .card[data-pos="4"] { transform: translateX(-140px) scale(0.7); }
}

/* Sections */
section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}
.section-title {
  font-size: 24px;
  color: var(--text-main);
  margin-bottom: 30px;
  border-left: 4px solid var(--primary-red);
  padding-left: 15px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 20px;
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-6 { grid-template-columns: repeat(6, 1fr) !important; }
}
.grid-6 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}
.card-item {
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.card-item img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}
.card-item .info {
  padding: 10px;
}
.card-item .info h3 {
  font-size: 14px;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-item .info p {
  font-size: 12px;
  color: var(--text-muted);
}
.card-item .stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--accent-yellow);
  margin-top: 5px;
}

/* Scrolling Banner */
.marquee-wrap {
  background: var(--primary-red);
  color: #fff;
  padding: 10px 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 14px;
  font-weight: bold;
}
.marquee {
  display: inline-block;
  animation: marquee 15s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Features */
.feature-content {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
  color: #ccc;
  line-height: 1.8;
}

/* History & Danmaku */
.danmaku-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}
.danmaku-player img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}
.danmaku-item {
  position: absolute;
  white-space: nowrap;
  color: #fff;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
  animation: danmaku 8s linear infinite;
  font-size: 16px;
}
@keyframes danmaku {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

/* FAQ */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
}
.faq-item summary {
  padding: 15px;
  cursor: pointer;
  font-weight: bold;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
  padding: 0 15px 15px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Comments */
.comment-box {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}
.comment-box textarea {
  width: 100%;
  height: 80px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  resize: none;
}
.comment-box button {
  background: var(--primary-red);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
}
.comment-list .item {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  background: var(--bg-card);
  padding: 15px;
  border-radius: 8px;
}
.comment-list img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.comment-list .text b {
  color: var(--accent-yellow);
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.comment-list .text p {
  font-size: 14px;
  color: #ccc;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}
.modal.active {
  display: flex;
}
.modal-content {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  max-width: 90%;
  width: 400px;
}
.modal-content h3 {
  margin-bottom: 15px;
  color: var(--accent-yellow);
}
.modal-content a {
  display: inline-block;
  background: var(--accent-yellow);
  color: #000;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: bold;
  margin-top: 15px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 30px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
footer p {
  margin-bottom: 10px;
}
footer a {
  color: var(--text-muted);
  text-decoration: underline;
}
details.about-details {
  margin-top: 15px;
  text-align: left;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
details.about-details summary {
  cursor: pointer;
  display: inline-block;
  color: var(--text-muted);
  font-size: 12px;
}
details.about-details summary::-webkit-details-marker { display: none; }
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  font-size: 12px;
}