/*
================================================
ROYAL47 VIDEO REPLICA — STYLE.CSS
================================================
CSS 的用途：
• 控制颜色
• 控制位置和大小
• 控制 Popup
• 控制轮播图
• 控制手机和电脑排版
• 控制动画和发光效果
================================================
*/


/* 移除浏览器默认间距 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


/* 常用颜色集中管理 */
:root {
  --page-bg: #050403;
  --panel-bg: rgba(18, 17, 16, 0.96);
  --panel-light: rgba(27, 26, 24, 0.94);

  --gold: #f4cf25;
  --gold-light: #fff18e;
  --gold-dark: #c89405;

  --white: #f9f7f2;
  --muted: #aaa397;
  --muted-dark: #747067;

  --green: #32ef8b;
}


/* 页面基础设置 */
html {
  min-height: 100%;
  background: var(--page-bg);
  scroll-behavior: smooth;
}


/* 整个网页背景 */
body {
  min-height: 100vh;
  overflow-x: hidden;

  padding: 18px 12px 38px;

  background:
    radial-gradient(
      circle at 50% -12%,
      rgba(214, 155, 22, 0.19),
      transparent 28%
    ),
    linear-gradient(
      180deg,
      #0a0805 0%,
      #050403 42%,
      #020202 100%
    );

  color: var(--white);

  font-family:
    Arial,
    Helvetica,
    sans-serif;
}


/* 很淡的格子背景 */
body::before {
  content: "";

  position: fixed;
  inset: 0;
  z-index: -1;

  pointer-events: none;

  opacity: 0.12;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px
    );

  background-size: 34px 34px;
}


/* 页面最大宽度 */
.page-shell {
  width: 100%;
  max-width: 760px;

  margin: 0 auto;
}


/* ================================
   顶部 Logo
================================ */
.hero-header {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 13px;

  padding: 13px 0 22px;
}


.main-logo {
  display: block;

  width: 230px;
  max-width: 68%;
  min-height: 70px;

  object-fit: contain;

  filter:
    drop-shadow(
      0 0 12px rgba(244, 207, 37, 0.23)
    );
}


.official-badge,
.welcome-badge,
.section-badge,
.popup-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: fit-content;

  border:
    1px solid rgba(244, 207, 37, 0.28);

  border-radius: 999px;

  background:
    rgba(244, 207, 37, 0.065);

  color: #d6bc5d;

  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.3px;

  padding: 7px 12px;
}


.online-dot {
  width: 7px;
  height: 7px;

  margin-right: 8px;

  border-radius: 50%;

  background: var(--green);

  box-shadow:
    0 0 7px var(--green),
    0 0 15px rgba(50, 239, 139, 0.7);

  animation:
    onlinePulse 1.5s ease-in-out infinite;
}


/* ================================
   主内容卡片
================================ */
.main-panel {
  padding: 25px 14px 18px;

  border:
    1px solid rgba(255, 255, 255, 0.13);

  border-radius: 25px;

  background:
    linear-gradient(
      150deg,
      rgba(31, 29, 28, 0.98),
      rgba(13, 13, 12, 0.98)
    );

  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);

  text-align: center;
}


.welcome-badge {
  margin: 0 auto 17px;
}


.intro-text {
  max-width: 560px;

  margin: 0 auto 22px;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.7;
}


/* ================================
   轮播图 Carousel
================================ */
.carousel {
  position: relative;

  width: 100%;
  overflow: hidden;

  border:
    1px solid rgba(244, 207, 37, 0.35);

  border-radius: 19px;

  background: #090806;

  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.35);
}


/*
Track 是所有 Slide 的横向容器。
JavaScript 会修改 transform，
达到左右切换效果。
*/
.carousel-track {
  display: flex;

  width: 100%;

  transition:
    transform 0.48s cubic-bezier(
      0.22,
      0.72,
      0.22,
      1
    );

  /* 提前告诉浏览器这个元素会移动，手机滑动时更顺畅。 */
  will-change: transform;

  /* 允许页面上下滚动，同时让 JavaScript 处理左右滑动。 */
  touch-action: pan-y;

  /* 拖动时避免选中文字或图片。 */
  user-select: none;
  -webkit-user-select: none;

  cursor: grab;
}

/* 手指或鼠标正在拖动时，关闭过渡动画，让图片紧贴手指移动。 */
.carousel-track.dragging {
  transition: none;
  cursor: grabbing;
}


/* 每一张 Slide 占满轮播图宽度 */
.carousel-slide {
  position: relative;

  flex: 0 0 100%;

  aspect-ratio: 16 / 9;

  overflow: hidden;

  background:
    radial-gradient(
      circle at center,
      rgba(244, 207, 37, 0.12),
      #0a0907
    );
}


/* 轮播图片 */
.carousel-slide img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  /* 防止图片本身被浏览器拖走，让整个 Carousel 拖动更自然。 */
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}


/* 图片没填写时的占位框 */
.image-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  height: 100%;

  border:
    1px dashed rgba(244, 207, 37, 0.45);

  color: #d4b94e;

  background:
    linear-gradient(
      145deg,
      #17140b,
      #080705
    );

  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.1px;

  text-align: center;
}


/* 左右箭头 */
.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;

  width: 36px;
  height: 36px;

  transform: translateY(-50%);

  border:
    1px solid rgba(255, 255, 255, 0.3);

  border-radius: 50%;

  color: #fff;

  background:
    rgba(8, 8, 8, 0.65);

  backdrop-filter: blur(8px);

  cursor: pointer;

  font-size: 28px;
  line-height: 1;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}


.carousel-arrow:hover {
  background:
    rgba(244, 207, 37, 0.78);

  color: #151000;
}


.carousel-prev {
  left: 9px;
}


.carousel-next {
  right: 9px;
}


/* Slide 小圆点 */
.carousel-dots {
  display: flex;
  justify-content: center;

  gap: 7px;

  padding: 13px 0 2px;
}


.carousel-dot {
  width: 7px;
  height: 7px;

  border: 0;
  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.26);

  cursor: pointer;

  transition:
    width 0.25s ease,
    background 0.25s ease;
}


.carousel-dot.active {
  width: 21px;

  background: var(--gold);
}


/* ================================
   金色按钮
================================ */
.primary-button {
  position: relative;

  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  min-height: 58px;

  overflow: hidden;

  border:
    1px solid rgba(255, 255, 255, 0.58);

  border-radius: 14px;

  color: #151100;

  background:
    linear-gradient(
      90deg,
      var(--gold-light),
      var(--gold),
      #e9b70c
    );

  box-shadow:
    0 0 23px rgba(244, 207, 37, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);

  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.6px;

  text-decoration: none;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}


.primary-button::before {
  content: "";

  position: absolute;
  top: 0;
  left: -35%;

  width: 24%;
  height: 100%;

  transform: skewX(-20deg);

  background:
    rgba(255, 255, 255, 0.38);

  animation:
    buttonShine 2.8s ease-in-out infinite;
}


.primary-button:hover {
  transform: translateY(-2px);

  box-shadow:
    0 0 33px rgba(244, 207, 37, 0.39),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}


.main-register-button {
  margin-top: 10px;
}


.button-note {
  margin-top: 11px;

  color: var(--muted-dark);

  font-size: 9px;
}


/* ================================
   快捷卡片
================================ */
.quick-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 9px;

  margin: 13px 0 42px;
}


.quick-card {
  min-height: 95px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 13px 8px;

  border:
    1px solid rgba(255, 255, 255, 0.09);

  border-radius: 12px;

  color: inherit;

  background:
    linear-gradient(
      145deg,
      rgba(28, 26, 25, 0.96),
      rgba(13, 12, 12, 0.96)
    );

  text-align: center;
  text-decoration: none;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}


.quick-card:hover {
  transform: translateY(-3px);

  border-color:
    rgba(244, 207, 37, 0.28);
}


.quick-icon {
  margin-bottom: 9px;

  font-size: 19px;
}


.quick-card h3 {
  font-size: 10px;
  line-height: 1.3;
}


/* ================================
   Why Choose
================================ */
.why-section {
  padding-bottom: 42px;

  text-align: center;
}


.section-badge {
  margin: 0 auto 18px;
}


.why-section > h2 {
  margin-bottom: 12px;

  color: var(--gold);

  font-size: clamp(23px, 5vw, 35px);
  line-height: 1.2;
}


.section-description {
  margin-bottom: 24px;

  color: var(--muted);

  font-size: 12px;
  line-height: 1.6;
}


.benefit-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 10px;
}


.benefit-card {
  min-height: 145px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 21px 14px;

  border:
    1px solid rgba(255, 255, 255, 0.09);

  border-radius: 15px;

  background:
    linear-gradient(
      145deg,
      rgba(29, 27, 26, 0.95),
      rgba(14, 13, 13, 0.96)
    );
}


.benefit-icon {
  margin-bottom: 12px;

  font-size: 24px;
}


.benefit-card h3 {
  margin-bottom: 9px;

  font-size: 14px;
}


.benefit-card p {
  color: var(--muted);

  font-size: 10px;
  line-height: 1.55;
}


/* ================================
   最后 CTA
================================ */
.final-cta {
  padding: 43px 14px 35px;

  border:
    1px solid rgba(244, 207, 37, 0.28);

  border-radius: 23px;

  background:
    radial-gradient(
      circle at center top,
      rgba(244, 207, 37, 0.08),
      transparent 48%
    ),
    linear-gradient(
      145deg,
      rgba(18, 18, 6, 0.97),
      rgba(7, 7, 5, 0.98)
    );

  text-align: center;
}


.final-crown {
  margin-bottom: 18px;

  color: var(--gold);

  font-size: 31px;

  text-shadow:
    0 0 15px rgba(244, 207, 37, 0.35);
}


.final-cta h2 {
  margin-bottom: 15px;

  font-size: clamp(24px, 5vw, 37px);
  line-height: 1.2;
}


.final-cta p {
  margin-bottom: 27px;

  color: var(--muted);

  font-size: 12px;
}


.final-button {
  min-height: 62px;
}


/* ================================
   Footer
================================ */
.site-footer {
  padding: 40px 10px 8px;

  color: #716d66;

  text-align: center;
}


.footer-line {
  width: 78%;
  height: 1px;

  margin: 0 auto 28px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(244, 207, 37, 0.16),
      transparent
    );
}


.site-footer p {
  margin-bottom: 13px;

  font-size: 9px;
  line-height: 1.6;
}


/* ================================
   Popup 背景
================================ */

.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 18px;

  visibility: hidden;
  opacity: 0;

  background: rgba(0, 0, 0, 0);

  backdrop-filter: blur(0);

  transition:
    opacity 0.35s ease,
    visibility 0.35s ease,
    background 0.35s ease,
    backdrop-filter 0.35s ease;
}


/* Popup 显示时的背景效果 */
.popup-overlay.show {
  visibility: visible;
  opacity: 1;

  background: rgba(0, 0, 0, 0.78);

  backdrop-filter: blur(10px);
}


/* ================================
   Popup 本体
================================ */

.popup-modal {
  position: relative;

  width: min(92vw, 620px);
  max-width: 620px;
  max-height: 92vh;

  overflow-y: auto;

/* Firefox */
  scrollbar-width: none;

/* IE / Edge */
  -ms-overflow-style: none;

  padding: 16px;

  opacity: 0;

  transform:
    translateY(45px)
    scale(0.88);

  border: 1px solid rgba(244, 207, 37, 0.38);
  border-radius: 22px;

  background:
    linear-gradient(
      145deg,
      #1a1711,
      #090806
    );

  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.72),
    0 0 30px rgba(244, 207, 37, 0.12);

  text-align: center;

  transition:
    opacity 0.42s ease,
    transform 0.42s cubic-bezier(
      0.16,
      1,
      0.3,
      1
    );

  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* Chrome / Edge / Safari */
  .popup-modal::-webkit-scrollbar {
    display: none;
}
/* Popup 出场 */
.popup-overlay.show .popup-modal {
  opacity: 1;

  transform:
    translateY(0)
    scale(1);
}


/* Popup 出场 */
.popup-overlay.show .popup-modal {
  opacity: 1;

  transform:
    translateY(0)
    scale(1)
    rotateX(0);
}


/* Popup 图片容器 */
.popup-image-box {
  width: 100%;

  /*
  Popup 图片使用 16:9 横向比例
  适合 1920×1080、1600×900、1280×720
  */
  aspect-ratio: 16 / 9;

  overflow: hidden;

  border-radius: 14px;

  background: #090806;

  transform: scale(0.95);

  opacity: 0;

  transition:
    opacity 0.4s ease 0.12s,
    transform 0.4s ease 0.12s;
}


/* Popup 出现后图片显示 */
.popup-overlay.show .popup-image-box {
  opacity: 1;

  transform: scale(1);
}


/* Popup 图片本身 */
.popup-image {
  display: block;

  width: 100%;
  height: 100%;

  /*
  contain = 显示完整图片，不裁切
  但上下或左右可能出现少量空白
  */
  object-fit: contain;

  object-position: center;

  border-radius: 14px;
}
/* Popup Logo 大小与位置 */
.popup-logo {
  display: block;
  width: 105px;
  max-width: 50%;
  height: auto;
  max-height: 65px;
  margin: 8px auto 10px;
  object-fit: contain;
}
.popup-modal h2{
    font-size:18px;
    font-weight:700;
    line-height:1.2;

    margin-top:8px;
    margin-bottom:6px;

    color:#ffffff;
}
.popup-modal p{
    font-size:12px;
    line-height:1.5;
    color:#b8b8b8;
    margin-bottom:16px;
}

/* Logo、标题和按钮依次出现 */
.popup-logo,
.popup-badge,
.popup-modal h2,
.popup-modal p,
.popup-button {
  opacity: 0;
  transform: translateY(14px);

  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}
/* Logo、标题和按钮依次出现 */
.popup-logo,
.popup-badge,
.popup-modal h2,
.popup-modal p,
.popup-button {
  opacity: 0;

  transform: translateY(14px);

  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}


.popup-overlay.show .popup-logo {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}


.popup-overlay.show .popup-badge {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}


.popup-overlay.show .popup-modal h2 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.25s;
}


.popup-overlay.show .popup-modal p {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}


.popup-overlay.show .popup-button {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.35s;
}


/* ================================
   动画
================================ */
@keyframes onlinePulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.82);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}


@keyframes buttonShine {
  0%,
  60% {
    left: -35%;
  }

  100% {
    left: 130%;
  }
}
/* ================================
   Popup 关闭按钮
================================ */

.popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 30;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  padding: 0;

  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;

  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;

  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.38),
    0 0 12px rgba(244, 207, 37, 0.08);

  font-family: Arial, sans-serif;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;

  cursor: pointer;

  transition:
    transform 0.22s ease,
    color 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease;
}

.popup-close:hover {
  transform: rotate(90deg) scale(1.06);

  border-color: rgba(244, 207, 37, 0.75);

  background: var(--gold);
  color: #111000;
}

.popup-close:active {
  transform: rotate(90deg) scale(0.94);
}

.popup-close:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

/* ================================
   手机适配
================================ */
@media (max-width: 520px) {
  body {
    padding:
      12px 8px 30px;
  }

  .hero-header {
    padding-top: 7px;
  }

  .main-logo {
    width: 190px;
  }

  .main-panel {
    padding:
      22px 9px 14px;

    border-radius: 21px;
  }

  .carousel-slide {
    aspect-ratio: 16 / 9.4;
  }

  /* 手机滑动时启用合成层，减少卡顿。 */
  .carousel-track {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  .carousel-arrow {
    width: 31px;
    height: 31px;

    font-size: 24px;
  }

  .quick-grid {
    gap: 6px;
  }

  .quick-card {
    min-height: 85px;

    padding:
      11px 4px;
  }

  .benefit-grid {
    gap: 7px;
  }

  .benefit-card {
    min-height: 135px;

    padding:
      18px 9px;
  }

  .final-cta {
    padding:
      37px 10px 28px;
  }
}


/*
用户系统选择“减少动画”时，
关闭动画，提升可访问性。
*/
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
