/* ================================
   Xingba - Dark Theme Landing Page
   ================================ */

/* Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0A0A0A;
  --bg-card: #1A1A1A;
  --bg-card-hover: #222222;
  --cta-primary: #FF4081;
  --cta-secondary: #FF6D00;
  --text-primary: #EDEDED;
  --text-secondary: #888888;
  --online-green: #00E676;
  --overlay-dark: rgba(0, 0, 0, 0.75);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.4;
  padding-bottom: 80px;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ======== HEADER ======== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.logo-img {
  height: 30px;
  width: auto;
  border-radius: 6px;
  object-fit: contain;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #FF4081;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.header-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 1;
  min-width: 0;
}

.header-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  color: #888;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 4px 0;
}

.nav-link:hover,
.nav-link:active {
  color: #FF4081;
}

.apk-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--cta-secondary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.apk-btn:hover {
  background: #e56000;
}

/* ======== HERO ======== */
.hero {
  position: relative;
  width: 100%;
  margin-top: 52px;
  padding: 36px 20px 32px;
  background: linear-gradient(180deg, #1a0a12 0%, var(--bg-primary) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 64, 129, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(255, 64, 129, 0.15);
  border: 1px solid rgba(255, 64, 129, 0.3);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--cta-primary);
  margin-bottom: 28px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--online-green);
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.hero-accent {
  display: block;
  font-size: 34px;
  font-weight: 700;
  color: var(--cta-primary);
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.hero-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-weight: 400;
  line-height: 1.6;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

.hero-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--cta-primary) 0%, var(--cta-secondary) 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all var(--transition);
  animation: pulse-glow 2.5s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}

.hero-download-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 0 40px rgba(255, 64, 129, 0.5);
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 64, 129, 0.3); }
  50% { box-shadow: 0 0 40px rgba(255, 64, 129, 0.6); }
}

.hero-note {
  font-size: 11px;
  color: #555;
  margin-top: 14px;
  margin-bottom: 28px;
  line-height: 1.5;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.hero-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-badge-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

.hero-badge-sub {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* ======== SECTIONS ======== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.section-badge {
  padding: 3px 10px;
  background: var(--cta-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 4px;
  text-transform: uppercase;
}

.live-badge-sm {
  background: rgba(0, 230, 118, 0.15);
  color: var(--online-green);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ======== VIDEO GRID ======== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.video-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.video-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.video-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at center, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.8) 40%, rgba(0,0,0,0.7) 75%, rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(ellipse 60% 55% at center, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.8) 40%, rgba(0,0,0,0.7) 75%, rgba(0,0,0,0) 100%);
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  transition: background var(--transition);
}

.play-overlay svg {
  width: 32px;
  height: 32px;
}

.video-card:hover .play-overlay {
  background: rgba(0, 0, 0, 0.5);
}

.video-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.video-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ======== PEOPLE LIST ======== */
.social-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 40px;
}

.people-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.person-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.person-card:hover {
  background: var(--bg-card-hover);
}

.person-avatar {
  position: relative;
  flex-shrink: 0;
}

.person-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: var(--online-green);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

.person-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.person-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.person-status {
  font-size: 13px;
  color: var(--text-secondary);
}

.person-action {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--cta-primary);
  color: var(--cta-primary);
  border-radius: 50px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  min-height: 38px;
}

/* ======== REVIEWS SECTION ======== */
.reviews-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 40px;
}

.reviews-summary {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.reviews-avg {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reviews-avg-score {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.reviews-avg-stars {
  display: flex;
  gap: 2px;
}

.reviews-avg-count {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.star {
  font-size: 14px;
  color: #444;
  line-height: 1;
}

.star.filled {
  color: #FFD700;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  transition: background var(--transition);
}

.review-card:hover {
  background: var(--bg-card-hover);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.review-avatar {
  flex-shrink: 0;
}

.review-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.review-user {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.review-stars {
  display: flex;
  gap: 1px;
}

.review-stars .star {
  font-size: 12px;
}

.review-time {
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.review-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ======== STICKY BOTTOM ======== */
.sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 12px 20px;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.98) 60%, transparent);
  display: flex;
  justify-content: center;
}

.cta-btn {
  width: 100%;
  max-width: 500px;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--cta-primary), var(--cta-secondary));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition);
  animation: cta-pulse 2s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}

.cta-btn:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(255, 64, 129, 0.4); }
  50% { box-shadow: 0 4px 40px rgba(255, 64, 129, 0.7); }
}

/* ======== TOAST ======== */
.toast {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.4s ease;
  cursor: pointer;
  max-width: 320px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-avatar {
  position: relative;
  flex-shrink: 0;
}

.toast-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.toast-online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--online-green);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

.toast-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.toast-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.toast-msg {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-action {
  padding: 8px 16px;
  background: var(--cta-primary);
  border: none;
  border-radius: 50px;
  color: #fff;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  min-height: 34px;
}

.toast-action:hover {
  background: #e5366f;
}

/* ======== APK DOWNLOAD MODAL ======== */
.apk-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.apk-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.apk-modal {
  max-width: 380px;
  width: 90%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--cta-primary);
  background: var(--bg-card);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.apk-modal-overlay.active .apk-modal {
  transform: scale(1);
}

/* Top Bar */
.apk-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 64, 129, 0.08);
  border-bottom: 1px solid rgba(255, 64, 129, 0.15);
}

.apk-modal-badge {
  padding: 3px 12px;
  background: #E53935;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 50px;
  text-transform: uppercase;
}

.apk-modal-topbar-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.apk-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all var(--transition);
}

.apk-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

/* Body */
.apk-modal-body {
  padding: 24px 24px 28px;
  text-align: center;
}

.apk-modal-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.apk-modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Social Preview Row */
.apk-modal-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: -8px;
  margin-bottom: 22px;
}

.apk-modal-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--bg-card);
  margin-left: -6px;
}

.apk-modal-avatar:first-child {
  margin-left: 0;
}

.apk-modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.apk-modal-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cta-primary), var(--cta-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  margin-left: -6px;
  border: 2px solid var(--bg-card);
  flex-shrink: 0;
}

/* Feature List */
.apk-modal-features {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apk-modal-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.apk-modal-features li svg {
  flex-shrink: 0;
}

/* CTA */
.apk-modal-cta {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--cta-primary), var(--cta-secondary));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.apk-modal-cta:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.apk-modal-hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ======== RESPONSIVE ======== */
@media (min-width: 600px) {
  .header-nav {
    gap: 24px;
  }

  .nav-link {
    font-size: 14px;
  }

  .hero-content {
    max-width: 520px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-accent {
    font-size: 44px;
  }

  .hero-subtitle {
    font-size: 14px;
    margin-bottom: 28px;
  }

  .hero-download-btn {
    padding: 16px 40px;
    font-size: 16px;
    border-radius: 14px;
  }

  .hero-badges {
    gap: 36px;
  }

  .hero-badge-title {
    font-size: 15px;
  }

  .hero::before {
    width: 450px;
    height: 450px;
  }

  .video-grid {
    gap: 14px;
  }

  .video-card .play-overlay svg {
    width: 38px;
    height: 38px;
  }

  .section-title {
    font-size: 17px;
  }

  .play-overlay svg {
    width: 36px;
    height: 36px;
  }
}

@media (min-width: 900px) {
  .header-inner {
    height: 60px;
  }

  .hero {
    margin-top: 60px;
    padding: 56px 24px 44px;
  }

  .hero-content {
    max-width: 600px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-accent {
    font-size: 52px;
  }

  .hero-subtitle {
    font-size: 15px;
    max-width: 460px;
    margin-bottom: 32px;
  }

  .hero-download-btn {
    padding: 16px 44px;
    font-size: 17px;
  }

  .hero-badges {
    gap: 48px;
  }

  .hero-badge-title {
    font-size: 16px;
  }

  .hero::before {
    width: 600px;
    height: 600px;
  }

  .video-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .section-title {
    font-size: 18px;
  }

  .play-overlay svg {
    width: 40px;
    height: 40px;
  }

  .toast {
    left: auto;
    max-width: 320px;
  }
}
