/* 全局樣式 */
:root {
    --primary-color: #ffffff;
    --secondary-color: #3BCDC0;
    --text-color: #000000;
    --bg-color: #f3f8f8;
    --card-bg: rgba(149, 237, 243, 0.6);
    --border-color: rgba(218, 165, 32, 0.2);
    --shadow-color: rgba(218, 165, 32, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 50px;
}

body {
    font-family: 'Microsoft JhengHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* ✅ 調整主體區距離避免 header 遮住 */
main {
    padding-top: 72px; /* 對應 header 高度 */
}

/* 導航欄樣式 */
header {
    height: 60px; /* 你可以調整為 80px 或其他高度 */
    background: var(--bg-color);
    box-shadow: 0 2px 20px var(--shadow-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex; /* ⬅ 為了讓 nav 可以垂直置中 */
    align-items: center;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center; /* ✅ 垂直置中選單與按鈕 */
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 5%; /* 左右內距 */
  height: 100%; /* ⬅ 填滿 header 高度 */
}

.logo {
    max-width: 150px; /* 設定最大寬度，確保不會過大 */
    height: auto;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: #0A4E9A;
    font-weight: 700;
    transition: var(--transition);
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: #0A4E9A;
}

dl, ol, ul {
  margin-top: 0;
  margin-bottom:0;
}

/* --- 從這裡開始是按鈕區塊樣式 --- */
.header-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn {
    text-decoration: none;
    background-color: #0A4E9A;
    color: #fbfbfb;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-weight: 600;
}

.btn:hover {
    background-color: #9fcdf1;
}


/* 英雄區域樣式 */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
                url('newbackground.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-color);
    padding: 0 1rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(89, 88, 88, 0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 15px rgba(0,0,0,0.2);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
    color: #fbfbfb;
}

.cta-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.start-button {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: #000;
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.4);
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(218, 165, 32, 0.6);
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
}

.contact-button {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.2);
}

.contact-button:hover {
    background: rgba(218, 165, 32, 0.1);
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(218, 165, 32, 0.4);
    border-color: var(--secondary-color);
}

/* 關於我們區域樣式 */
.about {
    padding: 3rem 1rem;
    background: linear-gradient(to bottom, rgba(182, 227, 212, 0.9), rgba(51, 167, 181, 0.9));
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(218, 165, 32, 0.05), transparent);
    pointer-events: none;
}

.about h2 {
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(45deg, #000000, rgb(2, 3, 129));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.8rem;
    text-shadow: 0 0 10px rgba(32, 218, 137, 0.3);
    position: relative;
}

.about h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.about-text {
    padding: 2.5rem;
    background: rgb(223, 223, 223);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.about-image {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(218, 165, 32, 0.2);
    transition: transform 0.3s ease;
    object-fit: cover;
}

.about-image img:hover {
    transform: scale(1.02);
}

/* 遊戲區域樣式 */
.services {
    padding: 3rem 1rem;
    background: linear-gradient(to bottom, rgba(51, 167, 181, 0.9), rgba(182, 227, 212, 0.9));
    position: relative;
}

.services h2 {
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(45deg, #000000, rgb(2, 3, 129));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.8rem;
    text-shadow: 0 0 10px rgba(32, 218, 137, 0.3);
    position: relative;
}

.services h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

.services-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: stretch; /* 讓每張卡片高度一致 */
}

.service-card {
    display: flex; /* ✅ 設為 flex 容器 */
    flex-direction: column; /* ✅ 垂直排列內容 */
    text-align: center;
    padding: 3rem 2rem;
    background: rgb(51, 167, 181);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 40px var(--shadow-color);
    border-color: var(--primary-color);
}

.service-card i {
    font-size: 3.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* 📦 APP下載區塊樣式 */
.appdownload {
  padding: 4rem 1rem;
  background: linear-gradient(to bottom, rgba(182, 227, 212, 0.9), rgba(51, 167, 181, 0.9));
  position: relative;
}

.appdownload h2 {
  text-align: center;
  margin-bottom: 4rem;
  background: linear-gradient(45deg, #000000, rgb(2, 3, 129));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 2.8rem;
  position: relative;
}

.appdownload h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

/* ✅ 背景圖片放在此容器左側 */
.appdownload-info {
  display: flex;
  justify-content: flex-end; /* 內容推向右側 */
  align-items: stretch; /* ✅ 讓所有子項目的高度一致 */
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  
  background-image: url('OTyb_app.png');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  min-height: 300px; /* 可調整依實際圖片 */
}

/* 🧱 卡片基本樣式 */
.appdownload-item {
  text-align: center;
  padding: 3rem;
  display: flex;
  flex-direction: column;       /* ✅ 垂直排列內部元素 */
  justify-content: flex-start;  /* ✅ 內容從上方開始，不壓縮內容 */
  background: rgb(51, 167, 181);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex: 1 1 280px;
  max-width: 300px;
}


/* 📸 QR Code 圖片樣式 */
.appdownload-item.qr img {
  width: 140px;
  height: 140px;
  display: block;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transform: scale(1.2);
}

.appdownload-item.qr h3 {
  margin-top: 2rem;
  color: #fff;
  font-size: 1.1rem;
  top: 30px;
  transform: scale(1.4); /* ✅ 視覺放大，不撐開容器 */
  display: inline-block; /* ✅ 確保 transform 有效 */
}

/* 📲 按鈕排列 */
.appdownload-item.buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.appdownload-item.buttons .btn {
  background-color: rgba(182, 227, 212, 0.9);
  color: #ffffff;
  min-width: 100px;
  max-width: 200px;
  width: 80%;
  padding: 0.8rem 1.6rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.appdownload-item.buttons .btn:hover {
  background-color: var(--secondary-color);
}

/* ✨ Hover 效果 */
.appdownload-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 40px var(--shadow-color);
  border-color: var(--primary-color);
}

/* 🎨 標題與內容 */
.appdownload-item h3 {
  color: var(--primary-color);
  margin-top: 1rem;
  font-size: 1.4rem;
}

.appdownload-item p {
  color: var(--text-color);
  font-size: 1.2rem;
}

/* 頁尾樣式 */
footer {
    background: #3bcdc0;
    color: #fff;
    padding: 4rem 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.8rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
    text-shadow: 0 0 15px rgba(218, 165, 32, 0.5);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid white;
    color: rgba(255, 255, 255, 0.8);
    align-items: center;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

.bottom-logo {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    align-items: center;
}

.bottom-logo img{
      max-width: 200px;
}


/* 遊戲介紹區域樣式 */
.introduction {
    padding: 4rem 1rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.9));
    position: relative;
    overflow: hidden;
}

.introduction::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(218, 165, 32, 0.05), transparent);
    pointer-events: none;
}

.introduction h2 {
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.8rem;
    text-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
    position: relative;
}

.introduction h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

.introduction-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.introduction-text {
    padding: 2.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.introduction-image {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.introduction-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(218, 165, 32, 0.2);
    transition: transform 0.3s ease;
    object-fit: cover;
}

.introduction img:hover {
    transform: scale(1.02);
}

/* 遊戲特色樣式 */
.features {
    padding: 3rem 1rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.85));
    position: relative;
}

.features h2 {
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.8rem;
    position: relative;
}

.features h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.features-card {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.features-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.features-card:hover::before {
    opacity: 1;
}

.features-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 40px var(--shadow-color);
    border-color: var(--primary-color);
}

.features-card i {
    font-size: 3.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.features-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.promotions {
  padding: 2rem;
  background: linear-gradient(to bottom, rgba(51, 167, 181, 0.9), rgba(182, 227, 212, 0.9));
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.promo-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1rem;
  transition: transform 0.3s;
}

.promo-card:hover {
  transform: translateY(-5px);
}

.promo-card img {
  width: 100%;
  border-radius: 8px;
}

.promo-card h3 {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: #333;
}

.promo-card p {
  color: #666;
  font-size: 0.95rem;
}

/* 通用按鈕樣式 */
.promo-card .btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background-color: #e63946; /* 你可以換成你想要的顏色 */
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

/* 滑過時的效果 */
.promo-card .btn:hover {
  background-color: #c9283b;
  transform: translateY(-2px);
}

/* 限制輪播圖容器寬度，並保持居中 */
.promo-image {
  padding: 2rem 1rem 3rem;
  background: linear-gradient(to bottom, rgba(182, 227, 212, 0.9), rgba(51, 167, 181, 0.9));
  max-width: 1200px;
  margin: 0 auto;
}

/* 確保圖片自動調整，並保持比例不失真 */
.carousel-inner img {
  width: 100%;
  height: auto;
  object-fit: cover; /* 保持圖片比例填滿容器，可改為 contain */
  border-radius: 12px; /* 圓角美化，可自行調整 */
}

/* 自訂左右箭頭按鈕外觀 */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-size: 60% 60%;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  padding: 1.5rem;
}

/* 行動裝置時縮小箭頭 */
@media (max-width: 768px) {
  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    padding: 1rem;
  }
}

/* ✅ Header 按鈕區塊排版 */
.header-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* ✅ 自訂登入註冊按鈕樣式 */
.custom-btn {
  text-decoration: none;
  background-color: #299C8E !important;
  color: #fbfbfb !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 5px !important;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.custom-btn:hover {
  background-color: #9fcdf1;
  color: #000;
}

/* ✅ 優惠文章區塊樣式 */
.promo-articles {
  padding: 3rem 1rem;
  background: linear-gradient(to bottom, rgba(51, 167, 181, 0.9), rgba(182, 227, 212, 0.9));
  text-align: center;
}
.promo-articles:last-of-type {
  padding: 3rem 1rem;
  background: linear-gradient(to bottom,rgba(182, 227, 212, 0.9), rgba(51, 167, 181, 0.9));
  text-align: center;
}

.promo-articles h2 {
  font-size: 2.2rem;
  margin-bottom: 2.5rem;
  background: linear-gradient(45deg, #000000, rgb(2, 3, 129)); 
  position: relative;
}

.news-section .promo-articles {
  margin-bottom: 0rem; /* 增加與下方距離 */
}

.promo-articles .article-grid {
  margin-top: 2rem; /* 增加標題與卡片之間的距離 */
}

.article-card {
  margin-top: 1.5rem; /* 每個卡片上方間距（如有需要） */
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.article-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.article-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.article-card h3 {
  font-size: 1.4rem;
  color: #333;
  margin-bottom: 1rem;
}

.article-card p {
  font-size: 1rem;
  color: #555;
  flex-grow: 1;
}
.article-card ul {
  list-style: none;
  padding: 0;
}
.article-card li {
  margin-bottom: 0.75rem;
}
.article-card a {
  color: #0055aa;
  text-decoration: none;
}
.article-card a:hover {
  text-decoration: underline;
  color: #1d4ed8; /* 深藍色 hover */
}
.btn-wrapper {
  text-align: center;
  margin-top: 1rem;
}

.custom-btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background-color: #299C8E;
  color: #fff;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.custom-btn:hover {
  background-color: #247a6d;
  transform: translateY(-2px);
}


/* 響應式設計 */
@media (max-width: 768px) {
  /* ✅ 字體縮小設定 */
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  p,
  li,
  a,
  .btn,
  .cta-button {
    font-size: 0.9rem;
  }

  /* ✅ 原有的響應式設計設定 */
  .nav-links {
    display: none;
  }

  .hero-content h1 {
    font-size: 2.4rem; /* 適度保留視覺重點 */
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .introduction-content {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .cta-button {
    width: 100%;
  }

  .contact-info {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }

  .contact-item {
    width: 100%;
    max-width: none;
  }
}

/* 性能優化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 打印樣式 */
@media print {
    header, .cta-buttons, .social-links {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .hero, .about, .services, .contact .introduction, .features {
        background: none;
        padding: 1rem;
    }
    
    .hero-content, .about-text, .service-card, .contact-item .introduction-text, .features-card{
        background: none;
        border: none;
        box-shadow: none;
    }
} 

.faq-main {
  background: linear-gradient(to bottom, rgba(182, 227, 212, 0.9), rgba(51, 167, 181, 0.9));
  padding-bottom: 3rem;
}

.faq-section {
  max-width: 800px;
  margin: 0.5rem auto;
  padding: 0 1rem;
}

.faq-section h2 {
  text-align: center;
  font-size: 2rem;
  color: #015951;
  margin-bottom: 0.5rem;
}

.faq-item {
  border-bottom: 1px solid #ccc;
  padding: 1rem 0;
}

.faq-question {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #02685d;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.3s;
}

.faq-question:hover {
  color: #01998c;
}

.faq-answer {
  display: none;
  padding: 0.5rem 0 0 1rem;
  color: #333;
  line-height: 1.6;
}

.faq-section .container {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

/* ✅ 優惠彈窗統一風格設計 */
.modal-content {
  border-radius: 1rem;
  background: linear-gradient(to bottom, rgba(182, 227, 212, 0.95), rgba(51, 167, 181, 0.95));
  color: #025952;
  border: 2px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  font-family: 'Microsoft JhengHei', sans-serif;
}

.modal-header {
  border-bottom: none;
  padding: 1.5rem;
  background-color: rgba(255, 255, 255, 0.5);
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.modal-title {
  font-size: 1.6rem;
  font-weight: bold;
  color: #02685d;
}

.modal-body {
  padding: 2rem;
  text-align: center;
}

.modal-body p {
  font-size: 1.1rem;
  color: #025952;
  margin-top: 1rem;
}

.modal-body img {
  max-height: 150px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}

/* ✅ 彈窗內按鈕統一樣式 */
.modal-body .btn {
  background-color: #299C8E;
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-body .btn:hover {
  background-color: #247a6d;
  transform: translateY(-2px);
}

/* ✅ 關閉按鈕樣式 */
.modal-header .btn-close {
  background-color: rgba(2, 101, 93, 0.2);
  border-radius: 50%;
  padding: 0.5rem;
}

/* 🎯 最新消息區塊主體 */
.news-section {
  padding: 4rem 1rem;
  background: linear-gradient(to bottom, rgba(182, 227, 212, 0.9), rgba(51, 167, 181, 0.9));
  position: relative;
}
/* 📝 區塊標題樣式 */
.news-section h2 {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 3rem;
  background: linear-gradient(45deg, #20a7e1, #02685d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(32, 218, 137, 0.3);
  position: relative;
}

.news-section h2::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(to right, transparent, #ffffff, transparent);
}

/* 📦 消息列表排版 */
.news-list {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* 📰 單篇消息卡片樣式 */
.news-item {
  background: #ffffff;
  border-left: 6px solid #3BCDC0;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.news-item:hover {
  transform: translateY(-5px);
}

/* 標題與文字顏色樣式 */
.news-item h3 {
  color: #02685d;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.news-item .date {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 0.8rem;
}

.news-item p {
  color: #333;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ✅ 響應式設計：手機版調整 */
@media (max-width: 768px) {
  .news-item {
    padding: 1.5rem;
  }

  .news-section h2 {
    font-size: 2rem;
  }

  .news-item h3 {
    font-size: 1.3rem;
  }

  .news-item p {
    font-size: 0.95rem;
  }
}

/* ✅ 漢堡選單開關 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: #f3f8f8;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  height: 72px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  height: 100%;
  position: relative;
}

.logo {
  max-width: 150px;
}

/* 登入 / 註冊 按鈕樣式 */
.header-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.custom-btn {
  background: #299C8E;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background-color 0.3s;
}

.custom-btn:hover {
  background-color: #247a6d;
}

/* 導覽選單（桌機版） */
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links li a {
  text-decoration: none;
  color: #0A4E9A;
  font-weight: bold;
}

/* === 響應式設定（手機版） === */
.menu-toggle {
  display: none;
}

.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: #025952;
  padding: 0.3rem;
}

.mobile-controls {
  display: none;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: flex;
}

/* 手機版設定 */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .mobile-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    z-index: 1100;
  }

  .header-buttons.mobile-only {
    display: flex;
    gap: 0.5rem;
  }

  .header-buttons.desktop-only {
    display: none;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .menu-toggle:checked ~ .nav-links {
    display: flex;
  }
}

.game-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: auto; /* ✅ 自動推到底部，對齊整體位置 */
}

.game-icons img {
    max-width: 80px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* 財神來了 tab - 固定在橫屏時保持直式比例 */
@media screen and (max-width: 768px) and (orientation: landscape) {
  #ifcaishen {
    width: 360px !important;
    height: 640px !important;
    margin: 0 auto;
    display: block;
    transform: none !important;
  }

  /* 如果需要強制中置外層容器 */
  #caishen .iframe-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000; /* 可選，避免背景空白 */
    min-height: 100vh;
  }
}
