html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: #a33737;
}

.header {
  background-color: #fff;
  height: 80px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 1000;
  position: relative; /* 可改成 fixed 看需求 */
}

.header-logo {
  width: 150px;
  height: auto;
}

.header-home {
  color: #333;
  text-decoration: none;
  font-size: 18px;
  font-weight: normal;
  transition: color 0.3s;
}

.header-home:hover {
  color: #888;
}

.floating-list-link {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #f44;
  color: #fff;
  padding: 10px 15px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  margin-left: 10px;
}

.section.visual {
  width: 100%;
  /* 移除固定高度，改用高寬比或讓內容決定高度 */
  /* height: auto;  或者使用 padding-top 來維持比率 */
  background: url(../images/mainVision.jpg) no-repeat top center;
  background-size: contain;
}

/* --- 右側漂浮的主圖 --- */
.visual-pin {
  position: absolute;
  top: 65%;
  right: min(4vw, 80px); /* 靠右一些，隨視窗微調 */
  width: min(34.2vw, 378px); /* 縮小 10% */
  height: auto;
  pointer-events: none; /* 不擋到點擊 */
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.25));
  transform: translate3d(0,-52%,0);
  animation: pinFloat 4.6s ease-in-out infinite;
  will-change: transform;
}

/* 上下輕微漂浮 */
@keyframes pinFloat {
  0%,100% { transform: translate3d(0,-52%,0); }
  50%     { transform: translate3d(0,-60%,0); }
}

.section.content {
  padding: 40px;
  font-size: 18px;
  font-weight: 300;
  line-height: 2.3em;
  color: rgb(253, 241, 222);

  /* 新背景：柔和漸層 + 紋理線條 + 金色小圖樣 */
  background-color: #a92b2b; /* 底色 */
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.06)), /* 光影層 */
    repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 14px), /* 細緻布紋 */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'><g fill='%23ffd29a' opacity='0.25'><path d='M80 20c8 0 14 8 14 16s-6 16-14 16-14-8-14-16 6-16 14-16z'/><circle cx='120' cy='40' r='6'/><circle cx='40' cy='120' r='6'/></g><g fill='none' stroke='%23ffd29a' stroke-width='1' opacity='0.06'><circle cx='80' cy='80' r='72'/></g></svg>");
  background-repeat: repeat;
  background-size: auto, auto, 160px 160px;
  background-position: center;
  background-blend-mode: overlay;
  box-shadow: inset 0 0 0 1000px rgba(0,0,0,0.06); /* 提升文字對比 */
  border-radius: 12px;
}

/* 手機：縮小圖樣並減少 padding */
@media (max-width: 768px) {
  .section.content {
    background-size: auto, auto, 100px 100px;
    padding: 24px;
    box-shadow: inset 0 0 0 1000px rgba(0,0,0,0.08);
  }
}

/* 右側浮動連結 */
.floating-list-link {
  position: fixed;
  right: 30px;
  bottom: 80px;
  z-index: 1100;
  background-color: #8a8a8a;
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 30px;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  text-decoration: none;
  transition: background 0.3s, transform 0.3s;
  font-weight: 400;
  letter-spacing: 1px;
}

.floating-list-link:hover {
  background-color: #74375c;
  transform: scale(1.07);
}

.floating-list-link:nth-of-type(2) {
  bottom: 140px;
  background-color: #fb5252;
}
/* 右側浮動連結end */

.section {
  padding: 20px;
}

.section p {
  font-size: 18px;
  line-height: 28px;
  color: #333;
}

.visual {
  height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

.content {
  padding: 30px 20px;
  text-align: center;
}

.content h2 {
  font-size: 5rem;
  margin-bottom: 3rem;
  color: #ffea64;
}

.yuji-mai-regular {
  font-family: "Yuji Mai", serif;
  font-weight: 400;
  font-style: normal;
}

.content_title {
  font-size: 1.6rem;
  color: #631313;
  margin-top: 30px;
  margin-bottom: 30px;
  font-weight: 400;
  background-color: #feb53f;
  border-radius: 18px;
  text-align: center;
  display: block;
  width: 50%;
  margin-left: auto;
  margin-right: auto;
}

.buttons {
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 15px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;

  /* 淡淡暖色底，讓按鈕更跳 */
  background: rgba(194, 60, 32, 0.12);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.buttons a button {
  position: relative;
  padding: 10px 70px;
  font-size: 1.6rem;
  letter-spacing: 1px;
  border-radius: 999px;
  border: 1px solid #ffd9a3;
  cursor: pointer;
  white-space: nowrap;

  color: #fff;
  font-weight: 500;

  /* 外框較暗、內部亮橘紅 */
  background-image:
    linear-gradient(to bottom, #ffe6b8 0%, #ffbf6a 12%, #ff8a3b 45%, #f4542a 75%, #d2261a 100%);
  box-shadow:
    0 3px 0 #a82616,
    0 6px 14px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    filter 0.18s ease-out;
  overflow: hidden;
}

/* 上半部高光，做出立體感 */
.buttons a button::before {
  content: "";
  position: absolute;
  inset: 2px 2px auto 2px;
  height: 55%;
  border-radius: inherit;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.72),
    rgba(255, 255, 255, 0.25),
    rgba(255, 255, 255, 0)
  );
  pointer-events: none;
}

/* 紅包 icon */
.buttons a button .hongbao-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  font-size: 1.4em;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.2));
}

/* 文字 */
.buttons a button .button-label {
  position: relative;
  z-index: 1;
}

/* hover：稍微變亮、抬起來一點 */
.buttons a button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 0 #902013,
    0 10px 20px rgba(0, 0, 0, 0.4);
  filter: brightness(1.05);
}

/* 鍵盤焦點 */
.buttons a button:focus-visible {
  outline: 2px solid #ffe49c;
  outline-offset: 3px;
  transform: translateY(-2px);
}

/* 手機版微調：左右留白、按鈕不擠 */
@media (max-width: 768px) {
  .buttons {
    justify-content: center;
    padding: 12px 8px;
    gap: 10px;
  }

  .buttons a {
    flex: 0 1 auto;
  }

  .buttons a button {
    padding: 10px 28px;
    font-size: 1.4rem;
  }
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 20px;
  background-image: url(../images/bg.png);
  background-size: contain;
  background-position: center;
  background-repeat: repeat;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
}

.card {
  position: relative;
  background-color: #fff;
  animation: fadeSlideIn 0.6s ease forwards;
  opacity: 0;
  transform: translateY(30px);
  width: 80%;
  margin: 0 auto;
  border-radius: 10px;
  overflow: visible;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }
.card:nth-child(5) { animation-delay: 0.4s; }

@keyframes fadeSlideIn {
  to { opacity: 1; transform: translateY(0); }
}

.card-img-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow: visible;
}

.card img {
  width: 50%;
  /* height: 200px; */
  object-fit: contain;
}

.card-body {
  padding: 0px 20px 40px;
  position: relative;
  text-align: center;
  overflow: hidden; /* 避免 pseudo-element 溢出 */
}

/* 半透明背景圖層 */
.card-body::before {
  content: "";
  position: absolute;
  inset: 0; /* 等同 top:0; right:0; bottom:0; left:0; */
  background-image: url(../images/horse-year-pattern.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover; /* 或 contain，看你圖騰需求 */
  opacity: 0.15;          /* 這裡調整透明度：0~1 */
  pointer-events: none;   /* 不影響滑鼠事件 */
  z-index: 0;
}

/* 確保內容在圖層上面 */
.card-body > * {
  position: relative;
  z-index: 1;
}
.card-body-label{
  right:initial;
  left:10px;
  width: 100%;
  height: auto;
  position: relative;
  text-align: center;
  margin: 0 auto;
  background-image: url(../images/600.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  font-size: 90px;
  }
.card-body-label-150{
  background-image: url(../images/150.png);
  }
.card-title {
  position: relative;
  top: 30px;
  left: -10px;
  padding: 5px 82px;
  z-index: 1;
  border-top-right-radius: 10px;
  color: #c23f3f;
}

.card-title span {
  font-size: 2rem;
  font-weight: 600;
  color: #000000;
  padding: 0px 5px;
  display: inline-block;
  transform: rotate(10deg) translateY(-5px);
  transform-origin: center;
  line-height: 1;
  vertical-align: middle;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.card p {
  margin: 30px 0;
}

.card p.card-price {
  font-size: 1.4rem;
  color: #872828;
  font-weight: bold;
  margin-top: 10px;
}

.card p.card-gift {
  font-size: 1.2rem;
  color: #872828;
  margin-top: 10px;
  font-weight: bold;
}

.card-label {
  position: absolute;
  top: 10px;
  right: -10px;
  background-color: #ffcc00;
  padding: 5px 55px;
  font-size: 1.4rem;
  font-weight: bold;
  color: #5c3333;
  border-radius: 5px;
  clip-path: polygon(0 0, 90% 0, 100% 50%, 90% 100%, 0 100%, 10% 50%);
}

.card-label span {
  color: red;
  font-size: 1.8rem;
  padding: 0px 5px;
}

.Copyright_Notice {
  text-align: left;
  font-size: 0.8rem;
  color: #757575;
  padding: 10px 10px 150px 10px;
  justify-content: space-between;
  background-color: #ffffff;
}

.notice_word {
  margin: 30px 0;
  font-size: 18px;
  color: #513434;
  padding: 10px 15px;
  line-height: 1.6rem;
}

.notice_word ol {
  padding-left: 1.2rem;
  margin-left: 0;
  list-style-type: decimal;
  list-style-position: outside;
}

.notice_word ol li {
  margin-top: 8px;
  display: list-item;
  line-height: 1.6;
  color: #fddfdf;
  white-space: normal;
}

/* 桌機版按鈕破框浮出圖片右下 */
@media (min-width: 769px) {
  .card-button {
    position: absolute;
    left: 50%;
    bottom: -20px;
    transform: translateX(-50%);
    width: auto;
    margin: 0;
    margin-top: 10px;
    border-radius: 5px;
    background-color: #51b9b9;
    color: white;
    padding: 10px 55px;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    transition: transform 0.3s;
    z-index: 2;
  }

  .card-button:hover {
    background-color: #fc64a0;
    box-shadow: 0 4px 16px rgba(155, 78, 135, 0.18);
    transform: scale(1.08) rotate(-2deg);
  }
}

/* 手機版 */
@media (max-width: 768px) {
  .visual,
  .section.visual {
    height: 250px;
    width: 100%;
    font-size: 1.8rem;
    text-align: center;
    padding: 20px;
    background-size: cover;
  }

  .visual-pin {
    right: 8px;
    width: 30%;
    animation-duration: 3.6s;
  }

  .section.content {
    /* font-size: 1.4rem; */
    line-height: 2.2rem;
    padding: 60px 10px 30px 10px;
  }

  .content h2 {
    margin-top: -30px;
    margin-bottom: 1rem;
    font-size: 2.1rem;
    line-height: normal;
  }

  .content_title {
    font-size: 1.2rem;
    width: 100%;
  }

  .buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 8px;
    padding: 15px 5px;
  }

  .buttons a {
    flex: 1 1 calc(50% - 10px);
    text-align: center;
  }

  .buttons a button {
    width: 90%;
  }

  .card-body {
    text-align: left;
  }
  .card-body-label{
    right:initial;
    left:10px;
    width: 80%;
    height: auto;
    position: relative;
    text-align: center;
    margin: 0 auto;
  }
  /* .card-body p{font-size: 1.4rem;} */
  .card-title {
    font-size: 1.4rem;
    top: 25px;
    left: -8px;
    padding: 4px 50px;
    white-space: nowrap;
  }
  .card img{
    width: 145%;
    margin-left: -18%;
  }
  .card {
    width: 100%;
  }

  .card p {
    margin-top: 30px;
  }

  .card-button {
    position: static;
    display: block;
    margin: 24px auto 0 auto;
    width: 90%;
    border-radius: 8px;
    border: none;
    background-color: #51b9b9;
    color: #fff;
    font-size: 1.3rem;
    box-shadow: 0 2px 8px rgba(155, 78, 135, 0.08);
    text-align: center;
    padding: 12px 0;
    letter-spacing: 1px;
    font-weight: bold;
    transition: background 0.3s, transform 0.3s;
  }

  .card-button:hover {
    background-color: #fc64a0;
    transform: scale(1.04);
  }

  .header-logo {
    width: 60%;
  }

  .floating-list-link {
    right: 5px;
    bottom: 70px;
    padding: 12px 20px;
    font-size: 16px;
  }
}

/* 光標動畫 */
.animated-cursor {
  display: inline-block;
  margin-left: 8px;
  animation: cursor-bounce 0.8s infinite;
  font-size: 1em;
  vertical-align: middle;
}

@keyframes cursor-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
/* 光標動畫結束 */

/* 禁止酒駕警示 */
.alcohol-warning {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #000;
  color: white;
  text-align: center;
  padding: 10px 0;
  font-size: 1.4rem;
  z-index: 1000;
}

/* ========= 新增：按鈕排版與一致樣式（不動原站 CSS） ========= */
.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

/* ========= 新增：Modal 樣式 ========= */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-panel {
  position: relative;
  width: 92%;
  max-width: 1100px;
  height: 90vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.modal-header {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid #eee;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
  font-weight: 600;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10 !important;
  pointer-events: auto;
}

.modal-close svg {
  width: 18px;
  height: 18px;
  fill: #b23b2f;
}

.modal-body {
  height: calc(100% - 44px);
  position: relative;
}

.modal-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* === Unified button styles (clean) — prize/add-to-list — 20251031_063013 === */
.btn-row .prize-btn,
.btn-row .add-to-list-btn {
  font-size: 18px;
  font-weight: 400;
  padding: 12px 18px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  white-space: nowrap;
  line-height: 1.2;
  width: auto;
  border: 0;
  color: floralwhite;
  background-color: #16675D; /* base color */
  cursor: pointer;
  transition:
    transform 220ms cubic-bezier(.22,.9,.35,1),
    background-color 180ms ease,
    box-shadow 220ms cubic-bezier(.22,.9,.35,1);
  will-change: transform, box-shadow, background-color;
}

.btn-row .prize-btn:hover,
.btn-row .add-to-list-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(170, 65, 65, 0.30);
  background-color: #1a796e;
}

.btn-row .prize-btn:focus-visible,
.btn-row .add-to-list-btn:focus-visible {
  outline: 2px solid #aa4141;
  outline-offset: 2px;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(170, 65, 65, 0.35);
}

/* 只在桌機隱藏 Lottie（>1024px） */
@media (min-width: 1025px) {
  .card-img-wrapper dotlottie-wc {
    display: none !important;
  }
}

/* 手機／平板顯示 Lottie（<=1024px） */
@media (max-width: 1024px) {
  .card-img-wrapper dotlottie-wc {
    display: block;
    margin: 0 auto; /* 居中 */
  }
}
