/* ============================================================
   MaxVin Landing — style.css
   Mobile-first, responsive breakpoint at 768px
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  --gold:        #c9a227;
  --gold-light:  #f5d87a;
  --gold-dark:   #7a4a00;
  --gold-glow:   rgba(200, 162, 39, 0.65);
  --purple:      #7c22c7;
  --red-btn:     #c0392b;
  --dark-bg:     #1a0800;
  --panel-bg:    rgba(16, 8, 0, 0.78);
  --radius-btn:  50px;
  --shadow-img:  drop-shadow(0 6px 18px rgba(0, 0, 0, 0.65));
}

/* SEO: ẩn h1 cho screen reader, vẫn đọc được */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  overflow-x: hidden;
  background: var(--dark-bg);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
}

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.page {
  min-height: 100vh;
  background-color: var(--dark-bg);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;          /* anchor for absolute light */
  animation: pageIn 0.6s ease both;
}

@keyframes pageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Mobile: chỉ load Mobile/bg.jpg */
@media (max-width: 767px) {
  .page { background-image: url('Mobile/bg.jpg'); }
}

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 10px 6px;
  position: relative;
  z-index: 20;
  animation: slideDown 0.6s ease both;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.logo-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 11;
}

.logo-img {
  width: clamp(130px, 50vw, 190px);
  filter: var(--shadow-img);
  animation: logoPulse 3.5s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 12px var(--gold-glow)) drop-shadow(0 2px 8px rgba(0,0,0,0.4)); }
  50%       { filter: drop-shadow(0 0 28px rgba(255, 220, 40, 0.95)) drop-shadow(0 0 40px rgba(255, 200, 0, 0.4)) drop-shadow(0 2px 8px rgba(0,0,0,0.4)); }
}

.social-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.social-link:hover {
  transform: scale(1.12);
}

.social-icon {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}

/* ============================================================
   DECORATIVE LIGHT + LINE
   ============================================================ */

/* Light: phía sau, logo đè lên tạo hiệu ứng phát sáng */
.deco-light {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  width: clamp(90px, 32vw, 140px);
  text-align: center;
}

.logo-wrap .logo-img {
  position: relative;
  z-index: 1;
}

.light-img {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  opacity: 0.92;
}

/* Line: PC dưới header (absolute), Mobile trong col-center */
.deco-line--header {
  display: none;
}

/* Mobile: line trong cụm CTA, sát mép dưới banner */
.deco-line--cta {
  width: 72%;
  max-width: 340px;
  margin: -8px auto 2px;
  text-align: center;
}

.line-img {
  width: 100%;
}

/* ============================================================
   CONTENT GRID  (mobile = single column)
   ============================================================ */
.content-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 8px 24px;
  gap: 10px;
  animation: fadeUp 0.7s ease both 0.15s;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hide PC-only columns on mobile */
.col-left,
.col-right,
.btn-caidat {
  display: none;
}

/* ============================================================
   CENTER COLUMN
   ============================================================ */
.col-center {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ---- Banner Main ---- */
.banner-wrap {
  width: 100%;
  text-align: center;
}

.banner-img {
  width: 100%;
  max-width: min(540px, 95vw);
  margin: 0 auto;
  filter: var(--shadow-img);
  animation: fadeUp 0.8s ease both 0.2s;
}

/* ---- ĐẲNG CẤP THỜI THƯỢNG ---- */
.cta-dangcap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 92%;
  max-width: 400px;
  padding: 15px 24px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: default;
  font-size: clamp(13px, 4.2vw, 19px);
  font-weight: 900;
  letter-spacing: 1.6px;
  color: #2d1200;
  background: linear-gradient(180deg,
    #ffe566 0%,
    #d49010 38%,
    #f6cb1e 66%,
    #9b6200 100%
  );
  box-shadow:
    0 0 0 3px #7a4a00,
    0 0 0 5px #e8be3a,
    0 6px 22px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 200, 0.45);
  text-shadow: 0 1px 2px rgba(255, 240, 180, 0.4);
  animation: goldGlow 2.5s ease-in-out infinite;
  user-select: none;
}

@keyframes goldGlow {
  0%, 100% {
    box-shadow:
      0 0 0 3px #7a4a00,
      0 0 0 5px #e8be3a,
      0 6px 22px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 rgba(255, 255, 200, 0.45);
  }
  50% {
    box-shadow:
      0 0 0 3px #7a4a00,
      0 0 0 5px #e8be3a,
      0 6px 32px rgba(200, 155, 0, 0.7),
      0 0 48px rgba(255, 200, 0, 0.25),
      inset 0 1px 0 rgba(255, 255, 200, 0.45);
  }
}

.cta-orn {
  font-size: 1.1em;
  opacity: 0.8;
}

/* ---- Download buttons (mobile only) ---- */
.dl-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: -6px;
}

.dl-link {
  display: block;
  width: 92%;
  max-width: 360px;
  transition: transform 0.2s, filter 0.2s;
}

.dl-link:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
}

.dl-img {
  width: 100%;
  filter: drop-shadow(0 4px 14px rgba(100, 0, 200, 0.45));
}

/* ---- iOS download choice popup ---- */
.ios-dl-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ios-dl-modal[hidden] {
  display: none !important;
}

.ios-dl-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
}

.ios-dl-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  animation: iosDlIn 0.28s ease both;
}

@keyframes iosDlIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ios-dl-frame {
  position: relative;
  width: 100%;
}

.ios-dl-frame-bg {
  width: 100%;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.55));
}

.ios-dl-actions {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 26%;
  bottom: 14%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding-top: 2%;
}

.ios-dl-opt {
  display: block;
  width: 100%;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.ios-dl-opt:last-child {
  margin-top: 10px;
}

.ios-dl-opt:active {
  transform: scale(0.97);
  filter: brightness(1.08);
}

.ios-dl-opt-img {
  width: 100%;
  height: auto;
}

body.ios-dl-open {
  overflow: hidden;
}

/* ---- Suits separator ---- */
.suits-bar {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin: 2px 0;
}

.suit {
  font-size: 18px;
  opacity: 0.9;
}

.suit-heart  { color: #e53e3e; }
.suit-club   { color: var(--gold); }
.suit-dia    { color: var(--gold); }
.suit-spade  { color: var(--gold); }

/* ---- Chơi nhanh bản Web ---- */
.btn-web {
  display: block;
  width: 92%;
  max-width: 360px;
  transition: transform 0.2s, filter 0.2s;
}

.btn-web:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
}

.btn-web-img {
  width: 100%;
  filter: drop-shadow(0 4px 14px rgba(180, 140, 0, 0.5));
}

/* ---- Cài đặt 1.1.1.1 (PC-only, hidden mobile) ---- */
.btn-caidat {
  display: none;
}

.btn-caidat-img {
  width: 100%;
  filter: drop-shadow(0 4px 16px rgba(200, 0, 0, 0.45));
}

/* ============================================================
   CAROUSEL  (inside col-left, hidden mobile)
   ============================================================ */
.carousel {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
  user-select: none;
  pointer-events: none;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(200, 162, 39, 0.35);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  padding: 0;
}

.dot:hover {
  background: rgba(200, 162, 39, 0.65);
}

.dot.active {
  background: var(--gold);
  transform: scale(1.3);
  box-shadow: 0 0 7px var(--gold-glow);
}

/* ============================================================
   LINK PANEL  (col-right, hidden mobile)
   ============================================================ */
.link-panel {
  border: 2px solid var(--gold-dark);
  border-radius: 14px;
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px 14px 14px;
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(200, 162, 39, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.6);
}

.lp-header {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--gold);
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(200, 162, 39, 0.3);
  margin-bottom: 10px;
}

.lp-brand {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--gold-light);
  text-shadow: 0 0 14px rgba(245, 216, 122, 0.8);
  margin-bottom: 16px;
}

.lp-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 14px;
}

.lp-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.step-num {
  flex-shrink: 0;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 0 8px var(--gold-glow);
}

.step-body {
  flex: 1;
}

.step-lbl {
  display: block;
  font-size: 11px;
  color: #bbb;
  margin-bottom: 3px;
}

.step-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.step-appicon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 7px;
}

.step-val {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
}

.step-accent {
  color: #7dd3fc;
  text-shadow: 0 0 8px rgba(125, 211, 252, 0.5);
}

.step-gold {
  color: var(--gold-light);
  text-shadow: 0 0 8px rgba(245, 216, 122, 0.6);
}

.lp-note {
  font-size: 10px;
  color: #999;
  line-height: 1.5;
  text-align: center;
  border-top: 1px solid rgba(200, 162, 39, 0.25);
  padding-top: 10px;
}

/* ============================================================
   PC BREAKPOINT  ≥ 768px  —  zero-scroll, fits exactly 100vh
   ============================================================ */
@media (min-width: 768px) {

  /* Lock viewport — no scroll on desktop */
  html, body {
    height: 100%;
    overflow: hidden;
  }

  /* PC: chỉ load PC/bg.jpg */
  .page {
    height: 100vh;
    overflow: hidden;
    background-image: url('PC/bg.jpg');
    background-position: center center;
    position: relative;
  }

  /* ---- Top bar — icons sát mép ---- */
  .top-bar {
    flex-shrink: 0;
    padding: 14px 12px 6px;
    position: relative;
    z-index: 10;
  }

  .logo-img {
    width: clamp(150px, 14vw, 210px);
  }

  .social-icon {
    width: 50px;
    height: 50px;
  }

  /* ---- Light: nhỏ (PC) — logo đè lên phát sáng ---- */
  .deco-light {
    width: clamp(110px, 12vw, 170px);
  }

  /* ---- Line: PC dưới header (absolute) ---- */
  .deco-line--header {
    display: block;
    position: absolute;
    top: 82px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    max-width: 440px;
    margin: 0;
    z-index: 3;
  }

  .deco-line--cta {
    display: none;
  }

  /* ---- 3-column grid — banners sát mép trái/phải (như social icons) ---- */
  .content-grid {
    flex: 1;
    min-height: 0;
    position: relative;
    z-index: 5;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px 32px;
    gap: 12px;
    max-width: 100%;
    width: 100%;
  }

  /* ---- Left col — banner sát mép trái ---- */
  .col-left {
    display: flex;
    flex-direction: column;
    align-self: center;
    flex: 0 0 clamp(140px, 16vw, 220px);
    animation: slideInLeft 0.7s ease both 0.2s;
  }

  @keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-28px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  /* Carousel image height-constrained */
  .carousel-slide {
    max-height: 55vh;
    object-fit: cover;
  }

  /* ---- Center col ---- */
  .col-center {
    flex: 1 1 auto;
    max-width: 560px;
    align-self: center;
    gap: 8px;
  }

  /* Banner scales by height, not width */
  .banner-img {
    max-height: 48vh;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
  }

  .cta-dangcap {
    font-size: clamp(13px, 1.5vw, 18px);
    padding: 11px 28px;
    max-width: 430px;
  }

  /* Hide mobile download buttons */
  .dl-wrap {
    display: none;
  }

  .suits-bar {
    margin: 0;
  }

  .btn-web {
    max-width: 300px;
  }

  /* Show btn-caidat */
  .btn-caidat {
    display: block;
    width: 80%;
    max-width: 240px;
    transition: transform 0.2s, filter 0.2s;
  }

  .btn-caidat:hover {
    transform: translateY(-2px) scale(1.03);
    filter: brightness(1.08);
  }

  /* ---- Right col — banner sát mép phải ---- */
  .col-right {
    display: flex;
    flex-direction: column;
    align-self: center;
    flex: 0 0 clamp(140px, 16vw, 220px);
    animation: slideInRight 0.7s ease both 0.2s;
  }

  @keyframes slideInRight {
    from { opacity: 0; transform: translateX(28px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  /* Right panel: scale font down so it fits */
  .lp-brand     { font-size: 18px; margin-bottom: 10px; }
  .lp-steps     { gap: 10px; margin-bottom: 10px; }
  .step-val     { font-size: 13px; }
  .step-appicon { width: 26px; height: 26px; }
  .link-panel   { padding: 12px 12px 10px; }

}

/* ============================================================
   LARGE DESKTOP  ≥ 1200px  —  give more breathing room
   ============================================================ */
@media (min-width: 1200px) {
  .col-left,
  .col-right {
    flex: 0 0 240px;
  }

  .content-grid {
    gap: 26px;
  }

  .banner-img {
    max-height: 50vh;
  }

  .cta-dangcap {
    font-size: 18px;
    padding: 13px 34px;
  }

  .btn-web   { max-width: 330px; }
  .btn-caidat { max-width: 260px; }
}

/* ============================================================
   MOBILE  < 768px  — cụm CTA sát banner, tránh scroll mới thấy nút
   ============================================================ */
@media (max-width: 767px) {
  .col-center {
    gap: 6px;
  }

  .banner-wrap {
    margin-bottom: -4px;
  }

  .banner-img {
    max-height: 46vh;
    object-fit: contain;
  }

  .deco-line--cta {
    margin: -12px auto 0;
  }

  .dl-wrap {
    margin-top: -14px;
    gap: 12px;
  }

  .suits-bar {
    margin: 0;
  }

  .btn-web {
    margin-top: -2px;
  }

  .content-grid {
    padding: 0 8px 16px;
  }
}

/* ============================================================
   SMALL MOBILE  ≤ 380px  — tighten spacing, icons sát mép
   ============================================================ */
@media (max-width: 380px) {
  .top-bar {
    padding: 10px 8px 4px;
  }

  .social-icon {
    width: 38px;
    height: 38px;
  }

  .logo-img {
    width: 44vw;
  }

  .cta-dangcap {
    font-size: 12px;
    padding: 12px 18px;
  }

  .content-grid {
    gap: 8px;
    padding: 0 6px 20px;
  }
}
