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

:root {
  --brand-deep: #061b27;
  --brand-forest: #082c3a;
  --brand-mint: #17d889;
  --brand-gold: #f5c85b;
  --brand-gold-soft: #ffe39b;
  --surface-deep: rgba(4, 22, 32, 0.92);
  --surface-soft: rgba(9, 46, 59, 0.72);
  --line-green: rgba(72, 171, 213, 0.22);
  --line-gold: rgba(245, 200, 91, 0.32);
  --text-soft: rgba(244, 255, 249, 0.72);
  --shadow-green: 0 18px 45px rgba(0, 0, 0, 0.38);
}

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

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 50% 16%, rgba(23, 216, 137, 0.08) 0%, transparent 34%),
    linear-gradient(180deg, #061b27 0%, #041722 48%, #061b27 100%);
  color: #fff;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch; 
}

/* ===== Sparkle Background ===== */
.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(245, 200, 91, 0.38);
  border-radius: 50%;
  animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

/* ===== Middle Content Wrapper ===== */
.middle-content {
  position: relative;
}

.middle-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(37, 94, 122, 0.2) 0%, transparent 38%),
    linear-gradient(180deg, rgba(6, 27, 39, 0.92), rgba(3, 16, 25, 0.98));
  z-index: 0;
  pointer-events: none;
}

.middle-content::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(180deg, rgba(6, 27, 39, 0.82) 0%, rgba(4, 23, 34, 0.9) 56%, rgba(6, 27, 39, 0.98) 100%);
  z-index: 1;
  pointer-events: none;
}

.middle-content > * {
  position: relative;
  z-index: 2;
}

/* ===== Top Bar ===== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(180deg, #061b27 0%, #041722 100%);
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line-green);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.top-bar-logo img {
  height: 60px;
  width: auto;
}

.top-bar-support {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--brand-gold-soft), var(--brand-gold));
  color: #062015;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(245, 200, 91, 0.18);
}

.top-bar-support img {
  width: 30px;
  height: 30px;
}

/* ========== Main Banner Carousel ========== */
#bannerCarousel {
  margin: 14px 12px 16px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-green), 0 0 0 1px rgba(245, 200, 91, 0.22);
  position: relative;
  aspect-ratio: var(--banner-aspect-ratio, 618 / 452);
  background: var(--surface-deep);
}

#bannerCarousel .banner-slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

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

#bannerCarousel .banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  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.4);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

#bannerCarousel .banner-indicators span.active {
  background: var(--brand-gold);
  transform: scale(1.3);
}

/* ===== Announcement Bar ===== */
.announcement-bar {
  margin: 0 12px 12px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(4, 20, 30, 0.96), rgba(8, 45, 60, 0.86));
  border: 1px solid var(--line-gold);
  display: flex;
  align-items: center;
}

.announcement-icon {
  flex-shrink: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
}

.announcement-icon img {
  width: 22px;
  height: 22px;
}

.marquee-wrapper {
  overflow: hidden;
  flex: 1;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  width: max-content;
  animation: marquee-scroll var(--marquee-duration, 28s) linear infinite;
}

.announcement-bar:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-gold-soft);
  letter-spacing: 0.3px;
  display: inline-block;
  padding-right: 64px;
}

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

/* ===== Showcase Area ===== */
.showcase-area {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0 22px;
}

.section-heading {
  margin-bottom: 12px;
}

.section-kicker {
  margin-bottom: 4px;
  color: var(--brand-mint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.action-grid {
  display: grid;
  gap: 14px;
}

/* ===== Section Links ===== */
.section-links {
  padding: 18px 12px 20px;
  background: linear-gradient(180deg, rgba(5, 24, 35, 0.72), rgba(3, 16, 25, 0.58));
  border-top: 1px solid rgba(245, 200, 91, 0.16);
  border-bottom: 1px solid rgba(245, 200, 91, 0.16);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  min-height: 48px;
  position: relative;
  text-align: center;
}

.section-title {
  font-size: 17px;
  font-weight: 900;
  color: var(--brand-gold-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.link-nav {
  display: flex;
  gap: 6px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.link-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(4, 22, 32, 0.82);
  border: 1px solid var(--line-green);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.link-nav-btn:hover {
  background: rgba(23, 216, 137, 0.18);
}

.link-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.links-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Row: [ping] [URL] [Visit] — 三部分用间隙隔开 */
.link-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.18));
  min-height: 56px;
}

/* Ping / latency pill */
.link-ping {
  background: rgba(3, 16, 25, 0.9);
  color: var(--brand-mint);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  min-width: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--line-green);
}

/* URL pill */
.link-url {
  background: linear-gradient(135deg, rgba(4, 22, 32, 0.95), rgba(8, 45, 60, 0.88));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 8px;
  border: 1px solid var(--line-green);
}

/* Visit button */
.link-visit {
  background: linear-gradient(135deg, var(--brand-gold-soft), var(--brand-gold));
  color: #062015;
  font-size: 13px;
  font-weight: 800;
  border: none;
  min-width: 74px;
  padding: 12px 14px;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  border-radius: 8px;
}

.link-visit:hover {
  opacity: 0.85;
}

/* ===== App Download Section ===== */
.section-download {
  padding: 4px 12px 0;
}

.section-download .section-heading {
  text-align: center;
}

.download-card {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(4, 22, 32, 0.94), rgba(8, 45, 60, 0.82));
  border: 1px solid var(--line-gold);
  border-radius: 8px;
  padding: 14px 12px;
  margin-bottom: 10px;
  gap: 12px;
  box-shadow: var(--shadow-green);
}

.download-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand-gold-soft), var(--brand-gold));
  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: 14px;
  font-weight: 700;
  color: var(--brand-gold-soft);
}

.download-card-desc {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 4px;
  line-height: 1.3;
}

.download-card-btn {
  background: linear-gradient(135deg, var(--brand-gold-soft), var(--brand-gold));
  color: #062015;
  font-size: 13px;
  font-weight: 800;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.download-card-btn:hover {
  opacity: 0.85;
}

/* ===== Social Links ===== */
.section-social {
  padding: 0 12px;
}

.section-social .section-heading {
  text-align: center;
}

.social-intro {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
  text-align: center;
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social-item {
  background: linear-gradient(180deg, rgba(4, 22, 32, 0.94) 0%, rgba(8, 45, 60, 0.84) 100%);
  border: 1px solid var(--line-green);
  border-radius: 8px;
  padding: 18px 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.social-item:hover {
  transform: translateY(-2px);
  border-color: var(--line-gold);
}

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

.social-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-gold-soft);
  text-align: center;
  line-height: 1.3;
}

.social-btn {
  background: linear-gradient(135deg, var(--brand-gold-soft), var(--brand-gold));
  color: #062015;
  font-size: 12px;
  font-weight: 800;
  border: none;
  padding: 6px 24px;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.social-btn:hover {
  opacity: 0.85;
}

/* ===== Provider Logo Carousel ===== */
.provider-strip {
  margin: 0 12px 0;
  padding: 18px 0 16px;
  overflow: hidden;
  display: none;
  background: #030607;
  border: 1px solid rgba(245, 200, 91, 0.26);
  border-bottom: 2px solid rgba(196, 129, 27, 0.78);
  border-radius: 8px;
  box-shadow: var(--shadow-green), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.provider-strip.is-visible {
  display: block;
}

.provider-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 0;
  animation: provider-scroll 34s linear infinite;
}

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

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

.provider-image-item {
  flex-shrink: 0;
  height: 52px;
  display: flex;
  align-items: center;
}

.provider-strip-image {
  height: 52px;
  width: auto;
  display: block;
}

.provider-item {
  min-width: 138px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  white-space: nowrap;
  opacity: 0.96;
  margin-right: 44px;
}

.provider-item img {
  max-height: 38px;
  max-width: 120px;
  object-fit: contain;
  display: block;
}

.provider-wordmark {
  color: var(--provider-color);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: 0 0 12px rgba(245, 200, 91, 0.28);
}

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

.games-scroll {
  width: 100%;
  overflow: hidden;
  padding: 0 0;
  touch-action: pan-x;
  cursor: grab;
}

.games-scroll:active {
  cursor: grabbing;
}

.games-track {
  display: flex;
  gap: 12px;
  width: max-content;
  transition: transform 0s;
}

.game-card {
  min-width: 140px;
  max-width: 140px;
  background: linear-gradient(180deg, rgba(4, 22, 32, 0.94), rgba(8, 45, 60, 0.82));
  border: 1px solid var(--line-green);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

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

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

.game-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(245, 200, 91, 0.95);
  color: #062015;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

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

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

.game-amount {
  font-size: 12px;
  color: var(--brand-gold-soft);
  font-weight: 700;
  margin-top: 3px;
}

/* ===== Footer ===== */
.footer {
  padding: 20px 16px 30px;
  text-align: center;
  background: #061b27;
  border-top: 1px solid var(--line-gold);
  box-shadow: inset 0 1px 0 rgba(255, 227, 155, 0.08);
}

.footer-text {
  font-size: 12px;
  color: rgba(255, 227, 155, 0.72);
  line-height: 1.6;
}

/* ===== Deep Blue Overlay for Middle Sections ===== */
.bg-overlay {
  position: relative;
}

.bg-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(37, 94, 122, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(6, 27, 39, 0.28), rgba(3, 16, 25, 0.72));
  z-index: -1;
  opacity: 0.3;
  border-radius: inherit;
  pointer-events: none;
}

/* ===== Responsive ===== */
@media (min-width: 481px) {
  body {
    border-left: 1px solid rgba(245, 200, 91, 0.16);
    border-right: 1px solid rgba(245, 200, 91, 0.16);
    box-shadow: 0 0 70px rgba(0, 0, 0, 0.58);
  }
}

@media (max-width: 480px) {
  .announcement-bar {
    margin: 0 10px 8px;
    min-height: 36px;
    border-radius: 7px;
  }

  .announcement-icon {
    padding: 5px 8px;
  }

  .announcement-icon img {
    width: 14px;
    height: 14px;
  }

  .marquee-text {
    font-size: 9px;
    line-height: 1.2;
    font-weight: 700;
    padding-right: 36px;
  }
}
