/* =========================================================
   MENU - fantasy gold style
   ========================================================= */

/* 基本層 */
.bg_headmenu {
  width: 100%;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 998;
  pointer-events: none;
  transform: translateY(0) !important; /* 強制顯示 */
  opacity: 1 !important; /* 強制顯示 */
  pointer-events: auto !important;
}

.headmenu {
  width: 100%;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0rem 2.2rem 0rem;
  background: linear-gradient(to bottom, rgba(10, 7, 5, 0.7) 0%, rgba(10, 7, 5, 0.4) 45%, rgba(10, 7, 5, 0) 100%);
  transform: translateY(0) scale(1);
  transform-origin: top center;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.42s ease,
    background 0.35s ease,
    filter 0.45s ease;
  will-change: transform, opacity, filter;
  pointer-events: auto;
  /* 0.6s 使動畫更慢，cubic-bezier 提供那種緩慢起步、優雅停止的感覺 */
  transition:
    transform 1.5s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.5s ease !important;
  will-change: transform;
}

/* 下滑後隱藏 */
.headmenu.menu-hidden {
  transform: translateY(-85%) scale(0.98);
  opacity: 0;
  filter: blur(4px);
  pointer-events: none;
}

/* =========================================================
   左側區
   ========================================================= */
.menu_flex01 {
  width: auto;
  min-width: 180px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  position: relative;
  z-index: 1000;
}

/* logo */
.btn_logo {
  width: 14rem;
  position: relative;
  top: 0;
  left: 0;
}

.btn_logo a {
  display: block;
  transition:
    transform 0.25s ease,
    filter 0.25s ease,
    opacity 0.25s ease;
}

.btn_logo a:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn_logo img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 1;
}

/* 原本手機預約按鈕 */
.btn_toggle_sure {
  position: relative;
  display: none;
  max-width: 11rem;
  margin: 0;
  animation: btntogglesure 1.2s infinite alternate;
}

.btn_toggle_sure img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes btntogglesure {
  from {
    filter: brightness(1);
    transform: scale(1);
  }
  to {
    filter: brightness(1.12);
    transform: scale(1.03);
  }
}

/* =========================================================
   中間主選單
   ========================================================= */
.menu_flex02 {
  width: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  z-index: 999;
}

.menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu li {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
  background: none !important;
}

.lang-ch .menu li,
.lang-ch .menu li:hover,
.lang-ch .menu li.active {
  background-image: none !important;
}

/* 原本圖片字按鈕關掉 */
.menu li img {
  display: none !important;
}

/* 主選單文字風格 */
.menu li a {
  position: relative;
  display: inline-block;
  padding: 0.25rem 0;
  font-family: 'Times New Roman', 'Noto Serif TC', 'PMingLiU', serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  color: #d8c08a;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow:
    0 0 1px rgba(255, 241, 204, 0.18),
    0 1px 0 #6a4720,
    0 2px 8px rgba(15, 8, 4, 0.92);
  transition:
    color 0.25s ease,
    transform 0.25s ease,
    text-shadow 0.25s ease,
    opacity 0.25s ease;
  margin-top: 1rem;
}
.menu li a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 0;
  height: 2px;
  transform: translateX(-50%);
  /* 使用徑向漸層，讓線段兩頭變尖、變透明 */
  background: radial-gradient(circle, #f2dfaa 0%, rgba(216, 192, 138, 0) 80%);
  filter: blur(0.5px);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu li a:hover,
.menu li.active a,
.menu li a.active {
  color: #f2dfaa;
  /* 讓文字也帶一點點發光 */
  filter: drop-shadow(0 0 5px rgba(242, 223, 170, 0.8));
}

.menu li a:hover::after,
.menu li.active a::after,
.menu li a.active::after {
  width: 120%; /* 線段比文字長一點點會更有延展感 */
}

/* 點擊裝飾可保留但不影響 */
.btn_click {
  display: none;
}

/* =========================================================
   右上社群按鈕
   ========================================================= */
.menu_flex04 {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  z-index: 999;
  margin-top: 0.05rem;
}

.menu_flex04 .social {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social li,
.social_mb li {
  list-style: none;
}

/* 社群圖示主體 */
.social li {
  width: 2.6rem;
  height: 2.6rem;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background-color: rgba(45, 27, 12, 0.42);
  border: 1px solid rgba(214, 182, 116, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 238, 196, 0.15),
    0 2px 10px rgba(0, 0, 0, 0.38);
  transition:
    transform 0.25s ease,
    filter 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  margin-top: 1rem;
}

.social li:hover {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.08);
  border-color: rgba(244, 220, 162, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 204, 0.28),
    0 0 14px rgba(255, 214, 120, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.45);
}

.social li a,
.social_mb li a {
  width: 100%;
  height: 100%;
  display: block;
}

/* 透明 img 只拿來撐背景，不要拉壞比例 */
.social li img,
.social_mb li img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.01;
}

/* 你原本的背景圖仍保留 */
.social li:nth-of-type(1),
.social_mb li:nth-of-type(1) {
  background: url(../images/btn_top_01_yt.png) no-repeat center center;
  background-size: 100% auto;
}

.social li:nth-of-type(2),
.social_mb li:nth-of-type(2) {
  background: url(../images/btn_top_05_line.png) no-repeat center center;
  background-size: 100% auto;
}

.social li:nth-of-type(3),
.social_mb li:nth-of-type(3) {
  background: url(../images/btn_top_04_ba.png) no-repeat center center;
  background-size: 100% auto;
}

.social li:nth-of-type(4),
.social_mb li:nth-of-type(4) {
  background: url(../images/btn_top_03_fb.png) no-repeat center center;
  background-size: 100% auto;
}

/* .social li:nth-of-type(2),
.social_mb li:nth-of-type(2) {
  background: url(../images/btn_top_02_discord.png) no-repeat center center;
  background-size: 100% auto;
} */

/* .social li:nth-of-type(6),
.social_mb li:nth-of-type(6) {
  background: url(../images/btn_top_07_twi.png) no-repeat center center;
  background-size: 100% auto;
} */

/* .social li:nth-of-type(7),
.social_mb li:nth-of-type(7) {
  background: url(../images/btn_top_06_en.png) no-repeat center center;
  background-size: 100% auto;
} */

/* 手機社群先隱藏 */
.social_mb {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* =========================================================
   手機/桌機共用 toggle
   ========================================================= */
.btn_toggle {
  margin: 0;
  position: relative;
  display: none;
  z-index: 1001;
}

.btn_toggle a,
.btn_toggle.close a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  border-radius: 50%;
  /* border: 1px solid rgba(214, 182, 116, 0.62); */
  /* background-color: rgba(28, 18, 10, 0.72); */
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 70% auto;
  /* box-shadow:
    inset 0 0 0 1px rgba(255, 238, 196, 0.12),
    0 2px 10px rgba(0, 0, 0, 0.35); */
  transition:
    transform 0.25s ease,
    filter 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.btn_toggle a {
  background-image: url(../images/btn_toggle.webp);
}

.btn_toggle.close a {
  background-image: url(../images/btn_toggle_ov.webp);
}

.btn_toggle a img {
  display: none;
}

.btn_toggle a:hover,
.btn_toggle.close a:hover {
  transform: translateY(-1px) scale(1.04);
  filter: brightness(1.08);
  /* box-shadow:
    inset 0 0 0 1px rgba(255, 238, 196, 0.22),
    0 0 12px rgba(255, 214, 120, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.45); */
}

/* 左側 PC 社群直排目前不用 */
.menu_flex03 {
  display: none;
}

/* 右側 section menu */
.menu_flex05 {
  width: 100%;
  max-width: 100px;
  display: flex;
  align-items: center;
  position: absolute;
  top: 30vh;
  right: 0;
  z-index: 9;
  margin-right: 6%;
}

.menu_flex05 li a {
  width: 160px;
  height: 60px;
  list-style: none;
  background-color: transparent;
  border-radius: 0;
  opacity: 1;
  font-weight: 600;
  font-size: 1.2rem;
  color: #d8c08a;
  line-height: 40px;
  padding-right: 1rem;
  text-align: right;
  box-sizing: border-box;
  text-decoration: none;
  filter: drop-shadow(2px 3px 10px rgba(2, 3, 73, 0.2));
}

.menu_flex05 li a.active {
  background: url(../images/btn_rmenu.png) no-repeat;
  background-size: 100% auto;
  text-align: center;
  font-size: 1.3rem;
  letter-spacing: 1px;
  font-weight: 800;
  transform: scale(1.06);
  transition: transform 0.2s ease-in-out;
  filter: none;
}

.menu_flex05 li a.active span {
  background: linear-gradient(to bottom, #4b1e10 40%, #882c07 60%, #8b0000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* =========================================================
   動畫
   ========================================================= */
@keyframes fat {
  0% {
    opacity: 0;
    transform: translateY(-100%);
  }
  100% {
    opacity: 1;
    transform: translateY(0%);
  }
}

@keyframes close_menu_anim {
  0% {
    opacity: 1;
    transform: translateY(0%);
  }
  100% {
    opacity: 0;
    transform: translateY(20%);
  }
}

@keyframes toggleFloat {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
  100% {
    transform: translateY(0);
  }
}

/* =========================================================
   IE legacy
   ========================================================= */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  .select_menu.lang select {
    position: absolute;
    left: 2.25rem;
    top: 0%;
  }
}

.select_menu.lang select::-ms-expand {
  display: none;
}

.select_menu.lang option {
  margin: 0;
  padding: 0;
  border: #73653f solid 1px;
  background-color: #e7d49c7a;
  color: #504118;
}

.select_menu.lang:hover {
  background-image: url('../images/btn_arrow_ov.webp'), url('../images/btn_lang_ov.webp');
  border: #ebcf83 solid 2px;
}

/* =========================================================
   桌機版：下滑後右側出現 btn_toggle，點開抽屜
   ========================================================= */
@media screen and (min-width: 1001px) {
  .btn_toggle {
    display: block;
    position: fixed;
    right: 1.2rem;
    top: 5%;
    transform: translateY(-50%) translateX(18px) scale(0.92);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 2005;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0));
    transition:
      opacity 0.35s ease,
      transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0.35s ease,
      filter 0.35s ease;
  }

  body.desktop-toggle-show .btn_toggle {
    transform: translateY(-50%) translateX(0) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.3));
  }

  body.desktop-toggle-show .btn_toggle a,
  body.desktop-toggle-show .btn_toggle.close a {
    width: 3.4rem;
    height: 3.4rem;
    background-color: rgba(27, 18, 10, 0.82);
    border: 1px solid rgba(214, 182, 116, 0.75);
    box-shadow:
      inset 0 0 0 1px rgba(255, 238, 196, 0.12),
      0 6px 18px rgba(0, 0, 0, 0.38);
  }

  body.desktop-toggle-show .btn_toggle a {
    animation: toggleFloat 2.2s ease-in-out infinite;
  }

  body.desktop-toggle-show .btn_toggle a:hover,
  body.desktop-toggle-show .btn_toggle.close a:hover {
    animation: none;
  }

  body.desktop-toggle-show .menu_flex02 {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    padding-top: 4.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(38px);
    /* transition:
      opacity 0.32s ease,
      transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0.32s ease; */
  }

  body.desktop-toggle-show .menu_flex02::after {
    content: '';
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(20, 13, 9, 0.92) 0%, rgba(28, 17, 10, 0.88) 55%, rgba(28, 17, 10, 0.76) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    border-left: 1px solid rgba(180, 140, 86, 0.18);
    box-shadow:
      -18px 0 40px rgba(0, 0, 0, 0.28),
      inset 1px 0 0 rgba(255, 234, 188, 0.05);
  }

  body.desktop-toggle-show.desktop-menu-open .menu_flex02 {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  body.desktop-toggle-show .menu {
    width: 86%;
    margin: 0 auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1rem;
  }

  body.desktop-toggle-show .menu li,
  body.desktop-toggle-show .social_mb li {
    opacity: 0;
    transform: translateX(14px);
    transition:
      opacity 0.35s ease,
      transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }

  body.desktop-toggle-show.desktop-menu-open .menu li,
  body.desktop-toggle-show.desktop-menu-open .social_mb li {
    opacity: 1;
    transform: translateX(0);
  }

  body.desktop-toggle-show.desktop-menu-open .menu li:nth-child(1) {
    transition-delay: 0.05s;
  }
  body.desktop-toggle-show.desktop-menu-open .menu li:nth-child(2) {
    transition-delay: 0.1s;
  }
  body.desktop-toggle-show.desktop-menu-open .menu li:nth-child(3) {
    transition-delay: 0.15s;
  }
  body.desktop-toggle-show.desktop-menu-open .menu li:nth-child(4) {
    transition-delay: 0.2s;
  }
  body.desktop-toggle-show.desktop-menu-open .menu li:nth-child(5) {
    transition-delay: 0.25s;
  }

  body.desktop-toggle-show.desktop-menu-open .social_mb li:nth-child(1) {
    transition-delay: 0.18s;
  }
  body.desktop-toggle-show.desktop-menu-open .social_mb li:nth-child(2) {
    transition-delay: 0.22s;
  }
  body.desktop-toggle-show.desktop-menu-open .social_mb li:nth-child(3) {
    transition-delay: 0.26s;
  }
  body.desktop-toggle-show.desktop-menu-open .social_mb li:nth-child(4) {
    transition-delay: 0.3s;
  }
  body.desktop-toggle-show.desktop-menu-open .social_mb li:nth-child(5) {
    transition-delay: 0.34s;
  }
  body.desktop-toggle-show.desktop-menu-open .social_mb li:nth-child(6) {
    transition-delay: 0.38s;
  }

  body.desktop-toggle-show .menu li {
    width: 100%;
  }

  body.desktop-toggle-show .menu li a {
    width: 100%;
    display: block;
    text-align: center;
    font-size: 1.08rem;
    letter-spacing: 0.08em;
    padding: 1rem 0;
    /* border-bottom: 1px solid rgba(216, 192, 138, 0.12); */
  }

  body.desktop-toggle-show .menu li a::after {
    bottom: 0.45rem;
  }

  body.desktop-toggle-show .social_mb {
    padding: 0.8rem 1rem 1.2rem !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.8rem;
  }

  body.desktop-toggle-show .social_mb li {
    height: 2.8rem;
    width: 2.8rem;
    margin: 0;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(214, 182, 116, 0.4);
    background-color: rgba(45, 27, 12, 0.38);
    box-shadow:
      inset 0 0 0 1px rgba(255, 238, 196, 0.08),
      0 2px 10px rgba(0, 0, 0, 0.18);
  }

  body.desktop-toggle-show .social_mb li a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.desktop-toggle-show .menu_flex04 .social {
    display: none;
  }
}

/* =========================================================
   官網儲值領回饋 - 圖片按鈕
   ========================================================= */
.menu li.menu_go {
  flex: 0 0 auto;
}

.menu li.menu_go a {
  display: block;
  width: 190px; /* 可依 btn_go.png 實際比例調整 */
  height: 64px; /* 可依 btn_go.png 實際比例調整 */
  margin: auto;
  margin-top: 0.4rem;
  padding: 0;
  background: url(../images/btn_go.png) no-repeat center center;
  background-size: contain;
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  filter: drop-shadow(0 0 5px rgba(255, 210, 90, 0.35));
  animation: menuGoBreath 2.2s ease-in-out infinite;
}

/* 關掉原本文字底線效果 */
.menu li.menu_go a::after {
  display: none !important;
}

/* 發光外圈 */
.menu li.menu_go a::before {
  content: '';
  position: absolute;
  inset: 2px 5px;
  border-radius: 999px;

  filter: blur(16px);
  z-index: -1;
  animation: menuGoGlow 2.2s ease-in-out infinite;
}

.menu li.menu_go a:hover {
  transform: translateY(-2px) scale(1.04);
  filter: drop-shadow(0 0 2px rgba(255, 225, 130, 0.25)) drop-shadow(0 0 12px rgba(255, 185, 60, 0.35));
}

.menu li.menu_go a:hover::before {
  opacity: 1;
}

/* 給無障礙用，畫面不顯示 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes menuGoBreath {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(255, 210, 90, 0.35));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 2px rgba(255, 228, 140, 0.25)) drop-shadow(0 0 12px rgba(255, 184, 72, 0.28));
  }
}

@keyframes menuGoGlow {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

/* Header 專用 GO 按鈕 */
.head_go {
  display: none;
  flex: 0 0 auto;
  position: relative;
  z-index: 1002;
}

.head_go a {
  display: block;
  width: 180px;
  height: 42px;
  top: -16px;
  background: url('../images/btn_go.png') center center / contain no-repeat;
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  filter: drop-shadow(rgba(255, 210, 90, 0.35) 0px 0px 8px);
  animation: 2.2s ease-in-out 0s infinite normal none running menuGoBreath;
}

.head_go a::before {
  content: '';
  position: absolute;
  inset: 2px 5px;
  border-radius: 999px;
  filter: blur(16px);
  z-index: -1;
  animation: menuGoGlow 2.2s ease-in-out infinite;
}

.head_go a:hover {
  transform: translateY(-2px) scale(1.04);
  filter: drop-shadow(0 0 2px rgba(255, 225, 130, 0.25)) drop-shadow(0 0 12px rgba(255, 185, 60, 0.35));
}

.head_go {
  display: none;
}

/* =========================================================
   響應式 - 1600
   ========================================================= */
@media screen and (max-width: 1600px) {
  .menu_flex05 li a {
    width: 140px;
    height: 42px;
    font-size: 1rem;
    line-height: 38px;
    padding-right: 1rem;
    margin-top: 0.5rem;
  }

  .menu_flex05 li a.active {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    transform: scale(1.06);
  }

  .menu {
    gap: 5rem;
  }

  .menu li a {
    font-size: 1.12rem;
  }

  .menu li.menu_go a {
    width: 170px;
    height: 58px;
  }
}

/* =========================================================
   響應式 - 1280 / 1200
   ========================================================= */
@media screen and (max-width: 1280px) {
  .headmenu {
    padding: 0.8rem 1.4rem 0.7rem;
  }

  .menu {
    gap: 1rem;
  }

  .menu li a {
    font-size: 1.04rem;
    letter-spacing: 0.06em;
  }

  .menu_flex04 .social {
    gap: 0.55rem;
  }

  .social li {
    width: 2.35rem;
    height: 2.35rem;
  }

  .menu li.menu_go a {
    width: 150px;
    height: 52px;
  }
}

/* =========================================================
   響應式 - 1040
   ========================================================= */
@media screen and (max-width: 1040px) {
  .menu_flex01 {
    min-width: auto;
  }

  .btn_logo {
    width: 8.2rem;
  }

  .menu_flex01 {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .btn_logo {
    margin-right: 0;
  }
}

/* =========================================================
   響應式 - mobile
   ========================================================= */
@media screen and (max-width: 1000px) {
  .headmenu {
    width: 100%;
    display: block;
    height: 60px;
    padding: 0.35rem 0.8rem;
    background: linear-gradient(to bottom, rgba(18, 12, 8, 0.94) 0%, rgba(18, 12, 8, 0.82) 100%);
    /* border-bottom: 1px solid rgba(180, 140, 86, 0.2); */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: none;
    transition:
      transform 0.4s ease,
      opacity 0.3s ease !important;
    will-change: transform;
  }

  .headmenu.menu-hidden {
    transform: translateY(-100%) !important;
    opacity: 1;
    pointer-events: auto;
    filter: none;
  }

  .menu_flex01 {
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.7rem;
  }

  .btn_logo {
    width: 9.5rem;
    margin-right: auto;
  }

  .btn_toggle_sure,
  .btn_toggle {
    display: block;
    right: 2%;
    margin-top: 1%;
  }

  .btn_toggle {
    position: fixed;
    /* left: 85%; */
    /* top: auto; */
    height: 60px;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    filter: none !important;
    z-index: 1003;
    /* margin: 2%; */
  }

  .btn_toggle_sure {
    position: relative;
    max-width: 11rem;
    margin: 0;
    animation: btntogglesure 1.2s infinite alternate;
    /* margin-right: 5%; */
    /* margin-top: -2% !important; */
  }

  .btn_toggle a,
  .btn_toggle.close a {
    width: 3rem;
    height: 3rem;
    animation: none;
  }

  .menu_flex04 .social {
    display: none;
  }

  .menu_flex02 {
    width: 280px;
    height: auto;
    position: absolute;
    top: 0;
    right: 0;
    padding-top: 4.3rem;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
  }

  .menu_show .menu_flex02 {
    display: flex;
    animation: fat 0.5s ease;
  }

  .menu_close .menu_flex02 {
    display: flex;
    animation: close_menu_anim 0.5s ease forwards;
  }

  .menu_flex02::after {
    content: '';
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom, rgba(20, 13, 9, 0.97) 0%, rgba(28, 17, 10, 0.93) 55%, rgba(28, 17, 10, 0.78) 100%);
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    border-left: 1px solid rgba(180, 140, 86, 0.16);
    box-shadow: -12px 0 30px rgba(0, 0, 0, 0.24);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .menu {
    width: 86%;
    margin: 0 auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.4rem;
  }

  .menu li {
    width: 100%;
    margin: 0;
    padding: 0;
    opacity: 1;
    transform: none;
  }

  .menu li a {
    width: 100%;
    display: block;
    text-align: center;
    font-size: 1.08rem;
    letter-spacing: 0.08em;
    padding: 0.75rem 0;
    /* border-bottom: 1px solid rgba(216, 192, 138, 0.12); */
  }

  .menu li a::after {
    bottom: 0.45rem;
  }

  .btn_click {
    display: none;
  }

  .social_mb {
    padding: 0.8rem 1rem 1.2rem !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.8rem;
  }

  .social_mb li {
    width: 2.8rem;
    height: 2.8rem;
    margin: 0;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(214, 182, 116, 0.4);
    background-color: rgba(45, 27, 12, 0.38);
    box-shadow:
      inset 0 0 0 1px rgba(255, 238, 196, 0.08),
      0 2px 10px rgba(0, 0, 0, 0.18);
    opacity: 1;
    transform: none;
  }

  .social_mb li a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .menu_flex03,
  .menu_flex05 {
    display: none;
  }

  .select_menu.lang {
    width: 8.5rem;
    height: 2.5rem;
    margin: 0 auto;
    background-size:
      2.5rem auto,
      2.5rem auto;
  }
}

/* =========================================================
   響應式 - 769
   ========================================================= */
@media screen and (max-width: 769px) {
  .menu_flex02 {
    width: 300px;
  }

  .menu li a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0;
    height: 2px;
    transform: translateX(-50%);
    /* 使用徑向漸層，讓線段兩頭變尖、變透明 */
    background: none;
    filter: blur(0.5px);
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .menu li a:hover,
  .menu li.active a,
  .menu li a.active {
    color: #f2dfaa;
    /* 讓文字也帶一點點發光 */
    filter: none;
  }

  .menu li a:hover::after,
  .menu li.active a::after,
  .menu li a.active::after {
    width: 120%; /* 線段比文字長一點點會更有延展感 */
  }

  .head_go {
    display: block;
    margin-left: auto;
    margin-right: 1rem; /* 留給 btn_toggle 的空間 */
  }

  .head_go {
    display: block;
  }

  .menu li.menu_go {
    display: none;
  }
}

/* =========================================================
   響應式 - 640
   ========================================================= */
@media screen and (max-width: 640px) {
  .btn_toggle a,
  .btn_toggle.close a {
    width: 3.5rem;
    height: 3.5rem;
  }

  .btn_logo {
    width: 8.8rem;
  }

  .select_menu.lang {
    padding-left: 2rem;
  }

  .btn_toggle_sure,
  .btn_toggle {
    display: block;
    right: 2%;
    margin-top: 2%;
  }
}

/* =========================================================
   響應式 - 550
   ========================================================= */
@media screen and (max-width: 550px) {
  .menu_flex02 {
    /* width: 82%; */
    width: 100%;
  }

  .select_menu {
    padding: 0.35rem 1rem 0.5rem 2rem;
  }

  .head_go a {
    display: block;
    width: 140px;
    height: 42px;
    top: -10px;
  }
}

/* =========================================================
   響應式 - 400
   ========================================================= */
@media screen and (max-width: 400px) {
  .btn_logo,
  .btn_toggle_sure {
    max-width: 10.2rem;
  }
}

/* =========================================================
   響應式 - 370
   ========================================================= */
@media screen and (max-width: 370px) {
  .btn_logo {
    width: 8.8rem;
  }

  .btn_toggle_sure {
    max-width: 9.2rem;
  }
}
