* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  touch-action: pan-y;
}

html {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Segoe UI', sans-serif;
  background-color: #1a0a0d;
  color: #fff;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
}

/* ===== Background Texture ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(139, 0, 0, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(139, 34, 82, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ===== Top Bar ===== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(180deg, #120508 0%, #1a0a0d 100%);
  position: relative;
  z-index: 10;
}

.top-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.4), transparent);
}

.top-bar-logo img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 0 6px rgba(196, 30, 58, 0.3));
}

.top-bar-support {
  width: 33px;
  height: 33px;
  background: linear-gradient(135deg, #8B2252, #C41E3A);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(196, 30, 58, 0.3);
}

.top-bar-support:hover {
  transform: scale(1.05);
}

/* ========== Main Banner Carousel ========== */
#bannerCarousel {
  margin: 16px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 40px rgba(196, 30, 58, 0.1);
  position: relative;
  background: transparent;
  border: 1px solid rgba(196, 30, 58, 0.15);
}

#bannerCarousel .banner-slides {
  display: flex;
  width: 100%;
  height: 100%;
}

#bannerCarousel .banner-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
}

#bannerCarousel .banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#bannerCarousel .banner-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

#bannerCarousel .banner-indicators span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

#bannerCarousel .banner-indicators span.active {
  background: #E8C4A0;
  box-shadow: 0 0 8px rgba(232, 196, 160, 0.5);
}

/* ===== Sub-Header Marquee ===== */
.sub-header {
  margin: 12px 16px 0;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(139, 0, 0, 0.15);
  border: 1px solid rgba(139, 34, 82, 0.3);
  backdrop-filter: blur(8px);
}

.marquee-wrapper {
  overflow: hidden;
  padding: 10px 0;
  white-space: nowrap;
}

.marquee-track {
  display: inline-block;
  animation: marquee-scroll 15s linear infinite;
}

.marquee-text {
  font-size: 12px;
  font-weight: 600;
  color: #E8C4A0;
  letter-spacing: 1px;
  padding: 0 16px;
}

@keyframes marquee-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ===== Section Links ===== */
.section-links {
  padding: 20px 16px 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: #E8C4A0;
  letter-spacing: 3px;
  margin-bottom: 16px;
  position: relative;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.section-title::before,
.section-title::after {
  content: '—';
  display: inline-block;
  margin: 0 12px;
  opacity: 0.5;
  font-weight: 300;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.link-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(45, 15, 20, 0.6);
  border: 1px solid rgba(139, 34, 82, 0.3);
  border-radius: 12px;
  padding: 14px 8px;
  text-decoration: none;
  position: relative;
}

.link-btn:hover {
  background: rgba(139, 0, 0, 0.3);
  border-color: rgba(196, 30, 58, 0.5);
}

.link-btn-icon {
  width: 56px;
  height: 56px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: 10px;
}

.link-btn-icon img {
  width: 100%;
}

.link-btn-text {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  line-height: 1.3;
  word-break: break-all;
}

/* ===== App Download Section ===== */
.section-download {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.download-card {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(45, 15, 20, 0.7), rgba(26, 10, 13, 0.8));
  border: 1px solid rgba(139, 34, 82, 0.3);
  border-radius: 16px;
  padding: 16px;
  gap: 14px;
  backdrop-filter: blur(8px);
}

.download-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.5), rgba(196, 30, 58, 0.3));
  border: 1px solid rgba(196, 30, 58, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-card-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.download-card-info {
  flex: 1;
  min-width: 0;
}

.download-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #E8C4A0;
  margin-bottom: 4px;
}

.download-card-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.3;
}

.download-card-btn {
  background: linear-gradient(135deg, #C41E3A, #8B0000);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(196, 30, 58, 0.3);
}

.download-card-btn:hover {
  background: linear-gradient(135deg, #d42a4a, #a00000);
}

/* ===== Social Links ===== */
.section-social {
  padding: 24px 16px;
}

.social-intro {
  font-size: 16px;
  font-weight: 700;
  color: #E8C4A0;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.social-item {
  background: rgba(45, 15, 20, 0.7);
  border: 1px solid rgba(139, 34, 82, 0.3);
  border-radius: 14px;
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.social-item:hover {
  background: rgba(139, 0, 0, 0.3);
  border-color: rgba(196, 30, 58, 0.5);
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
}

.social-name {
  font-size: 11px;
  font-weight: 600;
  color: #E8C4A0;
  text-align: center;
  line-height: 1.3;
}

.social-btn {
  background: rgba(196, 30, 58, 0.2);
  color: #E8C4A0;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid rgba(196, 30, 58, 0.4);
  padding: 6px 16px;
  border-radius: 16px;
  cursor: pointer;
}

.social-btn:hover {
  background: rgba(196, 30, 58, 0.4);
}

/* ===== Winner Graphic ===== */
.winner-section {
  text-align: center;
  padding: 28px 16px;
  margin: 20px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.15), rgba(26, 10, 13, 0.5));
  border: 1px solid rgba(139, 34, 82, 0.2);
}

.winner-text {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 8px;
  color: #E8C4A0;
  text-shadow:
    0 2px 4px rgba(0,0,0,0.5),
    0 0 20px rgba(232, 196, 160, 0.2);
}

.winner-stars {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: -4px;
}

.winner-stars .star {
  font-size: 18px;
}

/* ===== Game Feed ===== */
.section-games {
  padding: 20px 0;
  overflow: hidden;
}

.games-scroll {
  width: 100%;
  overflow: hidden;
  padding: 0 16px;
}

.games-track {
  display: flex;
  gap: 12px;
  animation: games-scroll-left 25s linear infinite;
  width: max-content;
}

.games-scroll:hover .games-track {
  animation-play-state: paused;
}

@keyframes games-scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.game-card {
  min-width: 145px;
  max-width: 145px;
  background: rgba(45, 15, 20, 0.7);
  border: 1px solid rgba(139, 34, 82, 0.3);
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

.game-card-img {
  position: relative;
  width: 100%;
  height: 105px;
  overflow: hidden;
}

.game-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #C41E3A, #8B0000);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.game-card-info {
  padding: 10px 12px;
}

.game-user {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

.game-amount {
  font-size: 12px;
  color: #E8C4A0;
  font-weight: 700;
  margin-top: 4px;
}

/* ===== Footer ===== */
.footer {
  padding: 20px 16px 28px;
  text-align: center;
  border-top: 1px solid rgba(139, 34, 82, 0.15);
  margin: 0 16px 16px;
  background: rgba(26, 10, 13, 0.3);
  border-radius: 12px;
}

.footer-text {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.7;
}

/* ===== Background Sparkles ===== */
.sparkle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(232, 196, 160, 0.5);
  border-radius: 50%;
}

/* ===== Responsive ===== */
@media (min-width: 481px) {
  body {
    border-left: 1px solid rgba(139, 34, 82, 0.15);
    border-right: 1px solid rgba(139, 34, 82, 0.15);
  }
}

.support-icon {
  width: 100%;
}