/* 镜像交互增强:汉堡侧边抽屉 + Top/Bottom 浮动按钮
   样式 1:1 对齐原站(shadcn/vaul 左侧抽屉:w-[80%] max-w-[600px] bg-[#481185] 等) */

/* —— 遮罩(原站 overlay: bg-black/10 + backdrop-blur;层级低于 header z-999) —— */
.mrr-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}
.mrr-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* —— 抽屉主体(原站:bg-[#481185] w-[80%] max-w-[600px] rounded-none border-none) —— */
.mrr-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 80%;
  max-width: 600px;
  background: #481185;
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
.mrr-drawer-overlay.open .mrr-drawer {
  transform: translateX(0);
}

/* 抽屉内顶部条(原站 h-header,被真实 header 覆盖,主要作占位) */
.mrr-drawer-head {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  left: 0;
  height: 5.5rem;
  background: rgba(72, 17, 133, 0.2);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: 0 3rem;
}
.mrr-drawer-close {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  line-height: 0;
}

/* 内容区(原站 px-[3rem] pb-[3rem] overflow-y-auto) */
.mrr-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 3rem 3rem;
}
.mrr-drawer-list {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 菜单项(原站:min-h-[3rem] text-[1.25rem] font-bold uppercase text-white/50 hover:text-primary) */
.mrr-drawer-item {
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.15s ease;
}
.mrr-drawer-item:hover,
.mrr-drawer-item.mrr-active {
  color: #54dfff; /* --primary */
}
.mrr-drawer-item .mrr-chevron {
  flex-shrink: 0;
  display: inline-flex;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.25s ease;
}
.mrr-drawer-item .mrr-chevron.mrr-rot {
  transform: rotate(180deg);
}

/* —— 移动抽屉 GAMES 折叠子菜单(还原原站 Collapsible;尺寸用 rem 随根字号缩放) —— */
.mrr-drawer-games {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.mrr-drawer-games.open {
  grid-template-rows: 1fr;
}
.mrr-dg-inner {
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.25rem 0;
}
.mrr-dg-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mrr-dg-cat {
  position: relative;
  margin-left: 0.5rem;
  padding: 0.25rem 1rem;
  font-size: 1.125rem;
  font-weight: 500;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}
.mrr-dg-cat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.75);
}
.mrr-dg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.mrr-dg-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-height: 6.5rem;
  border-radius: 0.75rem;
  background: rgba(255, 18, 215, 0.15);
  padding: 0.75rem;
  text-decoration: none;
}
.mrr-dg-icon {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}
.mrr-dg-name {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 0 7px rgba(90, 9, 11, 1);
}

/* —— Top / Bottom 浮动按钮:箭头缎带造型(金边 + 粉/绿渐变) —— */
/* 原站:fixed right-[0px] bottom-[6.25rem] gap-[10px] z-50;滚过一屏才显示 */
.mrr-scroll-controls {
  position: fixed;
  right: 0;
  bottom: 6.25rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}
.mrr-scroll-controls.mrr-visible {
  opacity: 1;
  visibility: visible;
}
/* 直接使用原站真实按钮图 to-top.webp / to-bottom.webp(md:182x61 / 移动 120x40) */
.mrr-scroll-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: block;
  line-height: 0;
  width: 7.5rem;
  height: 2.5rem;
  transition: transform 0.3s ease;
}
.mrr-scroll-btn:hover {
  transform: scale(1.1);
}
.mrr-scroll-btn img {
  display: block;
  width: 100%;
  height: 100%;
}
@media (min-width: 768px) {
  .mrr-scroll-btn {
    width: 182px;
    height: 61px;
  }
}

/* header 滚动后实心背景(原站 bg-[#290056]) */
header.mrr-header-solid {
  background-color: #290056 !important;
}

/* —— GAMES 分类轮播(还原 Swiper:3/屏、分页点、拖动) —— */
.mrr-swiper {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  width: 100%;
}
.mrr-swiper::-webkit-scrollbar {
  display: none;
}
.mrr-swiper.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}
.mrr-slide {
  scroll-snap-align: start;
}
.mrr-swiper-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 1.5rem;
}
.mrr-bullet {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}
.mrr-bullet.active {
  width: 26px;
  background: #54dfff;
}

/* —— BLOG 轮播(原站 opacity-0 网格 → 横向 Swiper:桌面3/屏、移动2/屏) —— */
.mrr-blog-swiper {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.mrr-blog-swiper::-webkit-scrollbar {
  display: none;
}
.mrr-blog-swiper.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}
.mrr-blog-swiper > .swiper-slide {
  flex: 0 0 auto;
  width: 49%;
  scroll-snap-align: start;
}
@media (min-width: 768px) {
  .mrr-blog-swiper > .swiper-slide {
    width: 32%;
  }
}
/* 到头/尾:箭头变暗且不可点(对齐原站 swiper-button-disabled) */
.mrr-disabled {
  opacity: 0.35 !important;
  cursor: auto !important;
  pointer-events: none !important;
}

/* —— footer「Request Postal Code」弹窗(原站 AlertDialog:max-w-480 rounded-24 p-40 bg-background) —— */
.mrr-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}
.mrr-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.mrr-modal {
  width: 90%;
  max-width: 480px;
  border-radius: 24px;
  padding: 40px;
  background: #481185; /* --popover(dark) */
  color: #fafafa; /* --popover-foreground */
  text-align: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 10px 40px rgba(0, 0, 0, 0.4); /* ring-1 ring-foreground/10 */
  transform: scale(0.95);
  transition: transform 0.15s ease;
}
.mrr-modal-overlay.open .mrr-modal {
  transform: scale(1);
}
.mrr-modal-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  user-select: none;
}
.mrr-modal-body {
  font-size: 20px;
  margin-top: 0.375rem; /* header gap-1.5 */
  color: #a3a3a3; /* --muted-foreground */
}
.mrr-modal-ok {
  margin-top: 1rem; /* content gap-4 */
  padding: 12px 32px;
  background: #ff5cd1;
  color: #fff;
  border: none;
  border-radius: 9999px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: filter 0.15s ease;
}
.mrr-modal-ok:hover {
  filter: contrast(1.5);
}

/* —— GAMES 悬停大菜单(原站 NavigationMenuContent) —— */
.mrr-games-menu {
  margin-top: 8px;
  width: min(92vw, 538px);
  max-height: 70vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.25rem 2.5rem;
  border-radius: 10px; /* 原站可见容器(radix viewport)圆角为 10px,非内层 24px */
  background: #481185;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: auto; /* host 恒 pointer-events:none,面板需自身可点(见 enhance.js) */
}
.mrr-games-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mrr-gm-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.mrr-gm-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mrr-gm-cat {
  position: relative;
  margin-left: 0.5rem;
  height: 3rem;
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 8px; /* 原站 rounded-lg */
  font-size: 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}
.mrr-gm-cat:hover {
  background: oklch(0.269 0 0); /* 原站 hover:bg-muted 深灰 */
}
.mrr-gm-cat::before {
  content: "";
  position: absolute;
  left: -0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.75);
}
.mrr-gm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.mrr-gm-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-height: 6.5rem;
  border-radius: 0.75rem;
  background: rgba(255, 18, 215, 0.15); /* #FF12D726 */
  padding: 0.75rem;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.mrr-gm-item:hover {
  transform: translateY(-2px);
}
.mrr-gm-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.mrr-gm-name {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 0 7px rgba(90, 9, 11, 1);
}
.mrr-top .mrr-scroll-inner {
  background: linear-gradient(180deg, #ff6ec7 0%, #d81a93 100%);
}
.mrr-bottom .mrr-scroll-inner {
  background: linear-gradient(180deg, #7ee54f 0%, #35b021 100%);
}
