@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@700;800&family=Nunito:wght@500;600;700;800;900&display=swap');

:root {
  --dl-bg: #FAF2E9;
  --dl-brown-dark: #362118;
  --dl-brown-subtle: #6E5245;
  --dl-orange-accent: #EB612A;
  --dl-green-android: #6BA336;
  --dl-green-android-hover: #5B8D2D;
  --dl-dark-ios: #3C2B25;
  --dl-dark-ios-hover: #2B1D18;
  --dl-card-border: #F2E3D2;
  --dl-notice-bg: #FFF3E4;
  --dl-notice-border: #F5DEC8;
}

/* ========================================================
   CONTAINER CHÍNH CỦA TRANG TẢI XUỐNG
   ======================================================== */
.download-page-container {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 64px - 70px);
  background: var(--dl-bg);
  background: linear-gradient(180deg, #FDF7F0 0%, #FAF1E5 55%, #F6ECE0 100%);
  padding: 42px 20px 80px 20px;
  font-family: 'Nunito', 'Inter', -apple-system, sans-serif;
  color: var(--dl-brown-dark);
  overflow: hidden;
  box-sizing: border-box;
}

/* ========================================================
   CÁC HỌA TIẾT NỀN TRANG TRÍ (PAWS, CLOUDS, SPARKLES)
   ======================================================== */
.dl-cloud-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 95px;
  background-image: radial-gradient(circle at 50% 100%, #FFFFFF 65%, transparent 66%);
  background-size: 140px 95px;
  background-repeat: repeat-x;
  pointer-events: none;
  z-index: 1;
  opacity: 0.85;
}

.dl-cloud-decor-top-left {
  position: absolute;
  top: -40px;
  left: -60px;
  width: 320px;
  height: 180px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

.dl-cloud-decor-top-right {
  position: absolute;
  top: -40px;
  right: -60px;
  width: 340px;
  height: 200px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

/* Dấu chân mèo rải rác */
.dl-paw-bg {
  position: absolute;
  color: #ECC8AC;
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

.paw-pos-1 { top: 90px; left: 6%; transform: rotate(-25deg); opacity: 0.85; width: 34px; height: 34px; }
.paw-pos-2 { top: 80px; right: 8%; transform: rotate(20deg); opacity: 0.75; width: 32px; height: 32px; }
.paw-pos-3 { top: 210px; right: 3%; transform: rotate(-15deg); opacity: 0.8; width: 36px; height: 36px; }
.paw-pos-4 { bottom: 120px; left: 4%; transform: rotate(18deg); opacity: 0.75; width: 34px; height: 34px; }
.paw-pos-5 { bottom: 130px; right: 7%; transform: rotate(-22deg); opacity: 0.85; width: 36px; height: 36px; }

/* Ngôi sao lấp lánh ✦ */
.dl-sparkle-bg {
  position: absolute;
  color: #F5A623;
  pointer-events: none;
  z-index: 1;
  user-select: none;
  opacity: 0.85;
}

.sparkle-dl-1 { top: 180px; left: 13%; font-size: 20px; }
.sparkle-dl-2 { top: 140px; right: 44%; font-size: 18px; }

/* ========================================================
   HERO SECTION (MÈO THÒ ĐẦU + TIÊU ĐỀ LỚN)
   ======================================================== */
.download-hero-section {
  position: relative;
  max-width: 980px;
  margin: 0 auto 36px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  z-index: 3;
}

/* Khối tranh bé mèo bên trái */
.download-cat-illu {
  position: relative;
  width: 240px;
  max-width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-cat-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
}

/* Khối tiêu đề bên phải */
.download-hero-text {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.download-main-title {
  font-family: 'Comfortaa', 'Nunito', sans-serif;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.18;
  color: #3C2216;
  margin: 0;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.download-main-title .title-sticker-part {
  color: #EA5E27;
}

.title-paw-decor {
  color: #EDC6A9;
  width: 32px;
  height: 32px;
  transform: rotate(18deg) translateY(-4px);
  flex-shrink: 0;
  user-select: none;
}

.download-main-subtitle {
  font-size: 15.5px;
  font-weight: 600;
  color: #5E473A;
  margin: 8px 0 0 0;
  line-height: 1.5;
}

.download-main-subtitle .heart-icon {
  color: #E54848;
  display: inline-block;
  margin-left: 3px;
}

/* ========================================================
   KHỐI 2 THẺ TẢI ỨNG DỤNG (ANDROID & IOS)
   ======================================================== */
.download-cards-grid {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  position: relative;
  z-index: 4;
}

.download-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Tab tiêu đề hệ điều hành */
.download-platform-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 9999px;
  padding: 10px 34px;
  font-family: 'Nunito', sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: -20px;
  z-index: 3;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  user-select: none;
}

/* Pill Android màu xanh lá */
.pill-dl-android {
  background: var(--dl-green-android);
  box-shadow: 0 4px 16px rgba(107, 163, 54, 0.35);
}

/* Pill iOS màu nâu đen */
.pill-dl-ios {
  background: var(--dl-dark-ios);
  box-shadow: 0 4px 16px rgba(60, 43, 37, 0.35);
}

.download-card-wrapper:hover .download-platform-pill {
  transform: translateY(-2px);
}

/* Thân Card bo tròn trắng */
.download-card-box {
  background: #FFFFFF;
  width: 100%;
  border-radius: 26px;
  border: 1.5px solid var(--dl-card-border);
  box-shadow: 0 10px 30px rgba(145, 100, 65, 0.07);
  padding: 44px 28px 26px 28px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.download-card-wrapper:hover .download-card-box {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(145, 100, 65, 0.12);
}

/* Nội dung bên trong card (Điện thoại + Danh sách & Nút tải) */
.download-card-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

/* ========================================================
   MOCKUP SMARTPHONE VỚI LOGO STICKERHUB
   ======================================================== */
.dl-phone-mockup-wrap {
  position: relative;
  width: 140px;
  height: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dl-phone-device {
  position: relative;
  width: 128px;
  height: 195px;
  background: #FFFFFF;
  border: 4px solid #2B2827;
  border-radius: 24px;
  box-shadow: 0 8px 22px rgba(43, 40, 39, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}

/* Tai thỏ notch */
.dl-phone-notch {
  position: absolute;
  top: 8px;
  width: 32px;
  height: 4.5px;
  background: #2B2827;
  border-radius: 4px;
}

/* Logo StickerHub hiển thị trên màn hình */
.dl-phone-screen-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dl-screen-cat-logo {
  width: 36px;
  height: 36px;
}

.dl-screen-brand-text {
  font-family: 'Comfortaa', 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #2E1C14;
}

.dl-screen-brand-text span {
  color: #EB612A;
}

/* Hình minh họa kèm theo ngoài khung điện thoại */
/* Android: Robot Android xanh đứng vẫy tay */
.dl-android-robot-badge {
  position: absolute;
  left: -14px;
  bottom: 12px;
  width: 48px;
  height: 52px;
  z-index: 2;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

/* iOS: Logo quả táo Apple 3D nổi bật */
.dl-apple-badge-popping {
  position: absolute;
  left: -12px;
  bottom: 10px;
  width: 44px;
  height: 48px;
  z-index: 2;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
}

/* Tia hành động cạnh điện thoại */
.dl-phone-ticks {
  position: absolute;
  color: #F5A623;
  pointer-events: none;
}

.dl-ticks-left {
  left: -14px;
  top: 38%;
  transform: translateY(-50%);
}

.dl-ticks-right {
  right: -14px;
  top: 38%;
  transform: translateY(-50%);
}

/* ========================================================
   CỘT NỘI DUNG BÊN PHẢI (CHECKLIST + NÚT TẢI)
   ======================================================== */
.download-right-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-grow: 1;
}

/* Danh sách 3 điểm nổi bật */
.download-features-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.download-feature-item {
  display: flex;
  align-items: center;
  gap: 11px;
}

/* Icon tích chọn tròn */
.dl-check-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.dl-check-icon.check-android {
  background: var(--dl-green-android);
  box-shadow: 0 2px 6px rgba(107, 163, 54, 0.25);
}

.dl-check-icon.check-ios {
  background: var(--dl-dark-ios);
  box-shadow: 0 2px 6px rgba(60, 43, 37, 0.25);
}

.dl-check-icon svg {
  width: 13px;
  height: 13px;
  stroke-width: 3.2;
}

.dl-feature-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--dl-brown-dark);
  line-height: 1.35;
}

/* ========================================================
   NÚT TẢI VỀ (DOWNLOAD BUTTONS)
   ======================================================== */
.dl-btn-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
}

.btn-download-app {
  width: 100%;
  border-radius: 9999px;
  padding: 12px 24px;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
  user-select: none;
}

/* Nút Android APK */
.btn-dl-android {
  background: var(--dl-green-android);
  box-shadow: 0 4px 14px rgba(107, 163, 54, 0.3);
}

.btn-dl-android:hover {
  background: var(--dl-green-android-hover);
  transform: translateY(-2px);
  box-shadow: 0 7px 18px rgba(107, 163, 54, 0.4);
}

/* Nút iOS App Store */
.btn-dl-ios {
  background: var(--dl-dark-ios);
  box-shadow: 0 4px 14px rgba(60, 43, 37, 0.3);
}

.btn-dl-ios:hover {
  background: var(--dl-dark-ios-hover);
  transform: translateY(-2px);
  box-shadow: 0 7px 18px rgba(60, 43, 37, 0.4);
}

.btn-download-app:active {
  transform: translateY(0);
}

/* Chú thích bên dưới nút APK */
.dl-btn-subnote {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #557E2E;
}

.dl-btn-subnote-icon {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #6BA336;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dl-btn-subnote-icon svg {
  width: 10px;
  height: 10px;
  stroke-width: 3.5;
}

/* ========================================================
   THANH THÔNG BÁO TƯƠNG THÍCH DƯỚI CÙNG
   ======================================================== */
.download-notice-wrapper {
  position: relative;
  max-width: 860px;
  margin: 38px auto 10px auto;
  z-index: 4;
}

.download-notice-pill {
  background: var(--dl-notice-bg);
  border: 1.5px solid var(--dl-notice-border);
  border-radius: 9999px;
  padding: 13px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(150, 100, 65, 0.06);
  box-sizing: border-box;
}

.dl-notice-bulb {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7E4126;
  filter: drop-shadow(0 0 5px rgba(255, 215, 60, 0.5));
}

.dl-notice-text {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--dl-brown-dark);
  margin: 0;
  line-height: 1.4;
}

/* Bàn chân mèo thò vào ở góc dưới bên phải (Đã loại bỏ hiệu ứng rung lắc) */
.dl-cat-paw-corner {
  position: absolute;
  right: -55px;
  bottom: -20px;
  width: 90px;
  height: 90px;
  z-index: 5;
  pointer-events: none;
}

/* ========================================================
   MODAL QR CODE / HƯỚNG DẪN CÀI ĐẶT
   ======================================================== */
.dl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 15, 0.65);
  backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.dl-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.dl-modal-card {
  background: #FFFFFF;
  width: 100%;
  max-width: 480px;
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(25, 15, 10, 0.3);
  border: 2px solid #F3E4D4;
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  display: flex;
  flex-direction: column;
}

.dl-modal-overlay.active .dl-modal-card {
  transform: translateY(0) scale(1);
}

.dl-modal-header {
  background: #FAF2E9;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid #F0DFCE;
}

.dl-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--dl-brown-dark);
  margin: 0;
}

.dl-modal-close-btn {
  background: #FFFFFF;
  border: 1px solid #E6D4C3;
  color: #795747;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dl-modal-close-btn:hover {
  background: #E54848;
  border-color: #E54848;
  color: #FFFFFF;
}

.dl-modal-body {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dl-qr-box {
  width: 180px;
  height: 180px;
  background: #FDF9F4;
  border: 2px dashed #E2D1C1;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.dl-qr-box svg {
  width: 140px;
  height: 140px;
}

.dl-modal-desc {
  font-size: 14.5px;
  color: #6C5245;
  font-weight: 600;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.btn-direct-download {
  background: var(--dl-orange-accent);
  color: #FFFFFF;
  border: none;
  padding: 10px 28px;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(235, 97, 42, 0.3);
}

.btn-direct-download:hover {
  background: #D95320;
  transform: translateY(-2px);
}

/* ========================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ======================================================== */
@media (max-width: 960px) {
  .download-hero-section {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .download-hero-text {
    text-align: center;
    align-items: center;
  }

  .download-main-title {
    font-size: 34px;
    justify-content: center;
  }
}

@media (max-width: 820px) {
  .download-cards-grid {
    grid-template-columns: 1fr;
    max-width: 460px;
    gap: 36px;
  }

  .download-notice-pill {
    padding: 14px 20px;
    border-radius: 20px;
    text-align: center;
    flex-direction: column;
  }

  .dl-cat-paw-corner {
    display: none;
  }
}

@media (max-width: 520px) {
  .download-page-container {
    padding: 28px 14px 60px 14px;
  }

  .download-cat-illu {
    width: 190px;
    height: auto;
  }

  .download-main-title {
    font-size: 26px;
    justify-content: center;
  }

  .download-card-box {
    padding: 38px 18px 22px 18px;
  }

  .download-card-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .dl-phone-mockup-wrap {
    margin-bottom: 6px;
  }

  .dl-feature-text {
    font-size: 14px;
    text-align: left;
  }
}

