/* Reset cơ bản */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; }

/* Ẩn chữ khỏi mắt nhìn nhưng vẫn đọc được cho SEO/screen reader */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  background: #1a0a08 url("assets/images/br_mobi.png") center top / cover no-repeat;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Container mobile-first, tối đa 480px cho desktop preview */
.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* Hero: logo + slogan */
.hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.logo    { width: 78%; max-width: 340px; height: auto; display: block; }
.slogan  { width: 88%; max-width: 380px; height: auto; display: block; }

/* Khung live */
.live-frame {
  position: relative;
  width: 100%;
  border: 3px solid #d33;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  background: #000;
  margin-top: 6px;
}
.live-image { width: 100%; height: auto; display: block; }

/* Video stream trong khung live: tỉ lệ 16:9 */
.live-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.live-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Banner carousel: các ảnh xếp chồng, chỉ hiện ảnh active */
.banner-carousel { position: relative; width: 100%; }
.banner-carousel .live-image {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.banner-carousel .live-image:first-child { position: relative; }
.banner-carousel .live-image.is-active {
  opacity: 1;
  pointer-events: auto;
}

.live-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}
.live-badge img { width: 60px; height: auto; display: block; }

/* Khối 2 nút store */
.stores {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* CTA buttons: dạng ảnh full-width */
.cta {
  display: block;
  width: 100%;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.cta img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.cta:hover  { transform: translateY(-1px); }
.cta:active { transform: translateY(1px); filter: brightness(0.95); }

/* Nút bị ẩn theo hệ điều hành */
.cta[hidden] { display: none; }

.cta-note {
  font-size: 13px;
  line-height: 1.3;
  color: #f5e6c8;
  text-align: center;
  margin-top: -4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* Social icons row */
.socials {
  display: flex;
  gap: 22px;
  justify-content: center;
  margin-top: 8px;
}
.socials a {
  display: inline-block;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.15s ease;
}
.socials a img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.socials a:active { transform: scale(0.95); }

/* Rất hẹp: iPhone SE ~320px */
@media (max-width: 340px) {
  .socials a { width: 54px; height: 54px; }
  .socials    { gap: 16px; }
}

/* Overlay hướng dẫn mở bằng trình duyệt hệ thống (khi ở in-app browser) */
.inapp-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
}
.inapp-overlay[hidden] { display: none; }
.inapp-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 22px 18px;
  border-radius: 16px;
  background: #fffaf2;
  color: #2b1410;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  text-align: center;
}
.inapp-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.inapp-desc  { font-size: 14px; line-height: 1.5; margin-bottom: 12px; color: #5a3a30; }
.inapp-steps {
  list-style-position: inside;
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px;
  padding: 0;
  color: #3a2118;
}
.inapp-btn {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: #8B0000;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.inapp-btn:active { filter: brightness(0.92); }
.inapp-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: #2b1410;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
