/* MMK33 缅甸风升级版：金红喜庆、高亮奖励、易读缅文（本地落地页常见审美） */

:root {
  --mm-bg-deep: #1a0a14;
  --mm-bg-mid: #2d1420;
  --mm-gold: #f4c430;
  --mm-gold-light: #fff3c4;
  --mm-red-warm: #c41e3a;
  --mm-orange: #ea580c;
  --mm-green-luck: #16a34a;
  --mm-text: #fffaf0;
  --mm-text-soft: #fde8d0;
  --top-bar-h: 54px;
  --bottom-bar-h: 88px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans Myanmar", "Myanmar Text", "Padauk", "Pyidaungsu", sans-serif;
  color: var(--mm-text);
  background: var(--mm-bg-deep);
  -webkit-text-size-adjust: 100%;
}

body.page-mm {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: var(--bottom-bar-h);
  position: relative;
  overflow-x: hidden;
}

/* 暖色金粉光晕（喜庆感） */
.mm-shimmer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(244, 196, 48, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 60%, rgba(234, 88, 12, 0.1) 0%, transparent 45%),
    radial-gradient(ellipse 60% 45% at 10% 70%, rgba(196, 30, 58, 0.08) 0%, transparent 40%),
    linear-gradient(180deg, #2a1018 0%, var(--mm-bg-deep) 45%, #140810 100%);
}

/* 顶栏/主内容/底栏叠在 shimmer 之上（#autoModal 须保持 fixed，勿与此处同组写 relative） */
body.page-mm > header,
body.page-mm > main,
body.page-mm > footer {
  position: relative;
  z-index: 1;
}

/* —— 顶栏：橙金红渐变（促销感强） —— */
.mm-top {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--top-bar-h);
  padding: 8px 14px;
  background: linear-gradient(92deg, #9f1239 0%, #dc2626 25%, #f97316 55%, #fbbf24 100%);
  background-size: 200% 100%;
  animation: mm-bar-glow 8s ease infinite;
  border-bottom: 3px solid rgba(253, 224, 71, 0.85);
  box-shadow: 0 6px 24px rgba(180, 30, 50, 0.45);
}

@keyframes mm-bar-glow {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

.mm-hot {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 5px 9px;
  color: #7f1d1d;
  background: linear-gradient(180deg, #fef9c3 0%, var(--mm-gold) 100%);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.mm-top .banner-text {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: clamp(0.88rem, 2.6vw, 1.12rem);
  font-weight: 800;
  color: #fffef5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.mm-close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.15);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

.mm-close:hover {
  background: rgba(0, 0, 0, 0.3);
}

.mm-close:active {
  transform: scale(0.94);
}

/* —— 主图区：金框 + 暖光 —— */
.mm-page {
  width: min(430px, 100%);
  margin: 0 auto;
  min-height: calc(100vh - var(--top-bar-h) - var(--bottom-bar-h));
  min-height: calc(100dvh - var(--top-bar-h) - var(--bottom-bar-h));
}

.mm-hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - var(--top-bar-h) - var(--bottom-bar-h));
  min-height: calc(100dvh - var(--top-bar-h) - var(--bottom-bar-h));
  margin: 0 8px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, #3d1528 0%, #2a1018 50%, #1a080e 100%);
  border: 2px solid rgba(244, 196, 48, 0.45);
  border-top: none;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.3),
    inset 0 0 60px rgba(244, 196, 48, 0.06);
}

.mm-hero-ring {
  position: absolute;
  inset: 0;
  border-radius: 0 0 16px 16px;
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 0 0 100px rgba(244, 196, 48, 0.06);
}

.mm-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  z-index: 2;
  pointer-events: none;
  border-color: var(--mm-gold);
  border-style: solid;
  opacity: 0.85;
  filter: drop-shadow(0 0 4px rgba(244, 196, 48, 0.5));
}

.mm-corner--tl {
  top: 10px;
  left: 10px;
  border-width: 3px 0 0 3px;
  border-radius: 4px 0 0 0;
}
.mm-corner--tr {
  top: 10px;
  right: 10px;
  border-width: 3px 3px 0 0;
}
.mm-corner--bl {
  bottom: 10px;
  left: 10px;
  border-width: 0 0 3px 3px;
}
.mm-corner--br {
  bottom: 10px;
  right: 10px;
  border-width: 0 3px 3px 0;
}

.mm-hero .poster-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - var(--top-bar-h) - var(--bottom-bar-h));
  max-height: calc(100dvh - var(--top-bar-h) - var(--bottom-bar-h));
  object-fit: contain;
  object-position: top center;
  border-radius: 0 0 14px 14px;
  filter: drop-shadow(0 12px 36px rgba(0, 0, 0, 0.55)) saturate(1.05);
}

/* —— 底栏：金边悬浮岛（信任感 + 绿色下载 = 吉利） —— */
.mm-bottom {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom, 0));
  width: min(420px, calc(100% - 16px));
  z-index: 90;
  padding: 12px 14px;
  background: linear-gradient(180deg, #2a1818 0%, #1a0f10 100%);
  border: 2px solid rgba(244, 196, 48, 0.5);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(244, 196, 48, 0.08);
}

.mm-bottom .bottom-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bottom-left {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bottom-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.bottom-logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: contain;
  border: 2px solid rgba(244, 196, 48, 0.55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.bottom-text strong {
  color: var(--mm-gold-light);
  font-size: clamp(0.95rem, 3.1vw, 1.18rem);
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-text span {
  color: var(--mm-text-soft);
  font-size: clamp(0.78rem, 2.4vw, 0.92rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-btn-wrap {
  position: relative;
  flex-shrink: 0;
}

.bottom-btn-gift {
  position: absolute;
  top: -10px;
  right: -6px;
  z-index: 2;
  font-size: 1.45rem;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  animation: mm-gift 1.15s ease-in-out infinite;
}

@keyframes mm-gift {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }
  50% {
    transform: translateY(-5px) rotate(6deg) scale(1.08);
  }
}

.mm-dl {
  min-width: 128px;
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  font-size: clamp(0.85rem, 2.5vw, 0.98rem);
  color: #f0fdf4;
  cursor: pointer;
  background: linear-gradient(180deg, #4ade80 0%, var(--mm-green-luck) 45%, #15803d 100%);
  box-shadow:
    0 4px 18px rgba(22, 163, 74, 0.55),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.bottom-btn-wrap:hover .mm-dl {
  filter: brightness(1.08);
}

.mm-dl:active {
  transform: scale(0.97);
}

/* —— 弹窗：红金红包感 + 缅文 ribbon —— */
.mm-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 5, 10, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mm-modal-bg.show {
  display: flex;
}

.modal-card--mm {
  position: relative;
  width: min(392px, 100%);
  padding: 28px 18px 22px;
  text-align: center;
  border-radius: 16px;
  border: 3px solid #f4d03f;
  background:
    radial-gradient(ellipse 90% 40% at 50% 0%, rgba(255, 240, 200, 0.2) 0%, transparent 55%),
    linear-gradient(165deg, #e85d4e 0%, #b91c3c 42%, #7f1d1d 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: mm-modal-in 0.45s cubic-bezier(0.22, 1.1, 0.36, 1) both;
}

@keyframes mm-modal-in {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.mm-modal-ribbon {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 14px;
  font-size: clamp(0.78rem, 2.5vw, 0.95rem);
  font-weight: 800;
  color: #78350f;
  background: linear-gradient(180deg, #fffbeb 0%, var(--mm-gold) 100%);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.modal-card--mm h3 {
  margin: 0;
  padding: 0 28px;
  color: #fffef5;
  font-size: clamp(1.08rem, 3.5vw, 1.38rem);
  font-weight: 900;
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.modal-card--mm p {
  margin: 12px 0 0;
  color: #ffeedd;
  font-size: clamp(0.9rem, 2.9vw, 1.05rem);
  line-height: 1.55;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.mm-x {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.mm-x:hover {
  background: rgba(0, 0, 0, 0.45);
}

.modal-cta-wrap {
  position: relative;
  display: inline-block;
  margin-top: 18px;
}

.modal-cta-hongbao {
  position: absolute;
  top: -8px;
  right: -6px;
  z-index: 2;
  font-size: 1.35rem;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  animation: mm-gift 1s ease-in-out infinite;
}

.mm-claim {
  min-width: 200px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  font-size: 1.05rem;
  color: #422006;
  cursor: pointer;
  background: linear-gradient(180deg, #fff7c2 0%, var(--mm-gold) 40%, #d97706 100%);
  box-shadow:
    0 8px 24px rgba(245, 158, 11, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.modal-cta-wrap:hover .mm-claim {
  filter: brightness(1.06);
}

.mm-claim:active {
  transform: scale(0.97);
}

.hongbao-rain {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
  contain: layout paint;
}

.hongbao-drop {
  position: absolute;
  top: -12vh;
  left: 0;
  line-height: 1;
  user-select: none;
  animation-name: hongbao-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  opacity: 0.92;
}

@keyframes hongbao-fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(var(--drift, 0px), 120vh, 0) rotate(var(--spin, 540deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hongbao-rain {
    display: none !important;
  }

  .mm-top,
  .bottom-btn-gift,
  .modal-cta-hongbao,
  .modal-card--mm {
    animation: none;
  }
}

@media (max-width: 380px) {
  :root {
    --top-bar-h: 50px;
    --bottom-bar-h: 82px;
  }

  .mm-bottom {
    width: calc(100% - 12px);
    padding: 10px 12px;
  }

  .bottom-logo {
    width: 44px;
    height: 44px;
  }

  .mm-dl {
    min-width: 118px;
    min-height: 46px;
  }

  .mm-claim {
    min-width: 160px;
    min-height: 48px;
    font-size: 0.95rem;
  }
}
