/* 重置和基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #ecf0f1;
    /* 確保移動端不會出現水平滾動 */
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* 確保容器不會超出屏幕 */
    box-sizing: border-box;
    width: 100%;
}

/* 頂部區域 */
.header {
    background-color: #00c5a7;
    background-image: url('/images/header.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    padding: 20px 0;
    border-bottom: 1px solid #00c5a7;
    /* 確保header高度與背景圖片一致 */
    min-height: 200px;
    /* 添加一些陰影效果，讓文字更清晰 */
    position: relative;
}



.header .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    /* 確保內容在背景圖片上層顯示 */
    position: relative;
    z-index: 2;
}

.logo img {
    height: 150px;
    border: none;
    padding: 0;
    /* 隱藏原本的logo，因為背景圖上已經有logo了 */
    display: none;
}

.search-box {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border: 2px solid #bdc3c7;
    border-radius: 0;
    padding: 0;
    height: 48px;
    position: relative;
    left: -95px;
    top: 12px;
}

.search-box input {
    border: none;
    outline: none;
    padding: 12px 16px;
    width: 250px;
    background: transparent;
    font-size: 14px;
    color: #2c3e50;
    flex: 1;
}

.search-box button {
    background: #e74c3c;
    border: none;
    color: white;
    padding: 0 20px;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.search-box button:hover {
    background: #c0392b;
}

/* 導航欄 */
.navbar {
    background: #ffffff;
    border-bottom: 2px solid #ecf0f1;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-item {
    margin: 0;
}

.nav-item a {
    text-decoration: none;
    color: #2c3e50;
    padding: 20px 24px;
    display: block;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
    border-bottom: 3px solid transparent;
}

.nav-item a:hover {
    color: #00c5a7;
    background: #f8f9fa;
}

.nav-item.active a {
    color: #00c5a7;
    border-bottom-color: #00c5a7;
}

/* 認證按鈕 */
.auth-buttons {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.btn-register {
    display: none;
}


.btn-login {
    background: linear-gradient(135deg, #00c5a7 0%, #00a085 100%);
    color: white;
    padding: 14px 28px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 197, 167, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover {
    background: linear-gradient(135deg, #00a085 0%, #008f73 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 197, 167, 0.4);
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 197, 167, 0.3);
}

/* 主要內容區域 */
.main-content {
    padding: 20px 0;
}

/* 輪播圖區域 */
.hero-section {
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    /* 統一輪播與Banner的寬高比例，便於後續維護 */
    --hero-aspect-ratio: 16/9;
    /* 確保輪播圖和banner高度完全一致 */
    align-items: start;
    /* 設置固定的高度基準，確保一致性 */
    --hero-height: calc((100vw - 40px) * 0.4 * 9 / 16);
    max-height: var(--hero-height);
    /* 確保網格項目高度一致 */
    grid-template-rows: 1fr;
}

.carousel-container {
    position: relative;
}

.carousel {
    position: relative;
    overflow: hidden;
    border: 2px solid #ecf0f1;
    aspect-ratio: var(--hero-aspect-ratio);
    height: auto;
    /* 確保輪播圖高度與banner完全一致 */
    min-height: 0;
    /* 使用統一的高度計算 */
    max-height: var(--hero-height);
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 確保圖片完全填充容器 */
    object-position: center;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(44, 62, 80, 0.85);
    color: white;
    padding: 12px 15px;
    text-align: center;
    backdrop-filter: blur(2px);
}

.carousel-caption h3 {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: 600;
    line-height: 1.2;
}

.carousel-caption p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    line-height: 1.3;
}

/* 輪播圖按鈕 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 197, 167, 0.9);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
    border-radius: 50%;
    backdrop-filter: blur(2px);
    z-index: 10;
}

.carousel-btn:hover {
    background: #00a085;
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

/* 輪播圖指示器 - 已移除 */

/* Banner區域（右側上下結構） */
.banner-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* 確保banner容器高度與輪播圖一致 */
    height: fit-content;
}

.banner {
    flex: 1;
    border: 2px solid #ecf0f1;
    overflow: hidden;
    aspect-ratio: var(--hero-aspect-ratio);
    height: auto;
    /* 確保每個banner的高度計算正確 */
    min-height: 0;
    /* 桌面端上下布局，每个banner高度为轮播图的一半 */
    max-height: calc(var(--hero-height) / 2 - 10px);
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 確保圖片完全填充容器 */
    object-position: center;
}

/* 新聞區域 */
.news-section {
    margin-bottom: 40px;
    margin-top: 40px;
}

/* 新聞排序控制按鈕 */
.news-sort-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.news-sort-controls .sort-btn {
    background: #ffffff;
    border: 2px solid #ecf0f1;
    color: #7f8c8d;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-sort-controls .sort-btn:hover {
    border-color: #00c5a7;
    color: #00c5a7;
}

.news-sort-controls .sort-btn.active {
    background: #00c5a7;
    border-color: #00c5a7;
    color: white;
}

.news-sort-controls .sort-btn i {
    font-size: 12px;
}

.news-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

 .section-title {
     font-size: 28px;
     color: #2c3e50;
     margin-bottom: 30px;
     padding-bottom: 15px;
     border-bottom: 3px solid #00c5a7;
     font-weight: 600;
     display: flex;
     justify-content: space-between;
     align-items: center;
 }

 .section-title h2 {
     margin: 0;
     font-size: inherit;
     color: inherit;
     font-weight: inherit;
 }

 /* 排序控制按鈕 */
 .sort-controls {
     display: flex;
     gap: 10px;
 }

 .sort-btn {
     background: #ffffff;
     border: 2px solid #ecf0f1;
     color: #7f8c8d;
     padding: 8px 16px;
     border-radius: 4px;
     cursor: pointer;
     font-size: 14px;
     font-weight: 500;
     transition: all 0.2s ease;
     display: flex;
     align-items: center;
     gap: 6px;
 }

 .sort-btn:hover {
     border-color: #00c5a7;
     color: #00c5a7;
 }

 .sort-btn.active {
     background: #00c5a7;
     border-color: #00c5a7;
     color: white;
 }

 .sort-btn i {
     font-size: 12px;
 }

.news-items {
    background: #ffffff;
    border: 2px solid #ecf0f1;
    padding: 0;
}

.news-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #ecf0f1;
    transition: background 0.2s;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background: #f8f9fa;
}

.news-number {
    width: 80px;
    height: 80px;
    margin-right: 20px;
    flex-shrink: 0;
    border: 2px solid #ecf0f1;
    overflow: hidden;
    border-radius: 4px;
}

.news-number img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.news-excerpt {
    color: #7f8c8d;
    line-height: 1.6;
}

.news-launch-time {
    color: #00c5a7;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #e9ecef;
}

/* 熱門禮包 */
.hot-news {
    background: #ffffff;
    border: 2px solid #ecf0f1;
    padding: 20px;
}

.hot-news-title {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
    font-weight: 600;
}

.gift-list {
    margin-bottom: 20px;
}

.gift-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #ecf0f1;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 15px;
}

.gift-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #00c5a7;
}

.gift-item:last-child {
    border-bottom: none;
}

.gift-logo {
    width: 65px;
    height: 65px;
    margin-right: 15px;
    border: 2px solid #ecf0f1;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.gift-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gift-item:hover .gift-logo {
    border-color: #00c5a7;
}

.gift-item:hover .gift-logo img {
    transform: scale(1.1);
}

.gift-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.gift-item:hover .gift-name {
    color: #00c5a7;
}

.gift-date {
    color: #7f8c8d;
    font-size: 14px;
}

/* Google廣告位 */
.google-ads {
    margin-top: 20px;
}

.ad-placeholder {
    background: #ecf0f1;
    border: 2px dashed #bdc3c7;
    padding: 40px 20px;
    text-align: center;
    color: #7f8c8d;
}

.ad-placeholder i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.ad-placeholder.large {
    padding: 60px 20px;
}

/* 頁尾 */
.footer {
    background: #00a085;
    color: #ffffff;
    padding: 40px 0 20px;
    border-top: 3px solid #ffffff;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.footer-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-section i {
    margin-right: 10px;
    color: #ffffff;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #ffffff;
    font-size: 20px;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #e8f5f3;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* 移動端選單 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    margin: 3px 0;
    transition: 0.3s;
}

/* 加載指示器樣式 */
.loading-indicator {
    text-align: center;
    padding: 30px 0;
    color: #7f8c8d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #ecf0f1;
    border-top: 3px solid #00c5a7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    font-size: 14px;
    color: #7f8c8d;
}

/* 加載更多按鈕樣式 */
.load-more-btn {
    display: block;
    margin: 30px auto;
    padding: 15px 30px;
    background: #00c5a7;
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.load-more-btn:hover {
    background: #00a085;
}

.load-more-btn:active {
    background: #008f73;
}

 /* 新聞項目動畫 */
 .news-item {
     animation: fadeInUp 0.3s ease-out;
 }

 .news-item.sort-animation {
     animation: sortSlideIn 0.5s ease-out;
 }

 @keyframes fadeInUp {
     from {
         opacity: 0;
         transform: translateY(10px);
     }
     to {
         opacity: 1;
         transform: translateY(0);
     }
 }

 @keyframes sortSlideIn {
     from {
         opacity: 0;
         transform: translateX(-20px);
     }
     to {
         opacity: 1;
         transform: translateX(0);
     }
 }

/* 麵包屑導航 */
.breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    font-size: 14px;
    color: #7f8c8d;
}

.breadcrumb a {
    color: #00c5a7;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #00a085;
}

.breadcrumb i {
    margin: 0 10px;
    font-size: 12px;
}

.breadcrumb span {
    color: #2c3e50;
    font-weight: 600;
}

/* 遊戲詳情頁面 */
.game-detail-section {
    background: #ffffff;
    border: 2px solid #ecf0f1;
    padding: 30px;
    margin-bottom: 40px;
    /* 確保內容不會超出屏幕 */
    overflow-x: hidden;
    word-wrap: break-word;
}

.game-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    gap: 30px;
}

.game-logo {
    flex-shrink: 0;
}

.game-logo img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
}

.game-info h1 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

.game-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 时间字段行布局 */
.meta-row {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.meta-row .meta-item {
    flex: 1;
    margin-bottom: 0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #7f8c8d;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    min-height: 60px;
}

.meta-item:hover {
    background: #ffffff;
    border-color: #00c5a7;
    box-shadow: 0 2px 8px rgba(0, 197, 167, 0.1);
    transform: translateY(-1px);
}

.meta-item i {
    color: #00c5a7;
    width: 20px;
    font-size: 18px;
    text-align: center;
}

.meta-item span:first-of-type {
    font-weight: 600;
    color: #2c3e50;
    min-width: 140px;
    flex-shrink: 0;
}

.meta-item span:last-of-type {
    color: #34495e;
    font-weight: 500;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    /* 確保在移動端不會超出屏幕 */
    max-width: 100%;
    word-break: break-all;
}

/* 时间字段特殊样式 */
.time-value {
    color: #00c5a7 !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    border: 2px solid #e9ecef !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.website-link {
    color: #00c5a7;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.website-link:hover {
    color: #00a085;
    text-decoration: underline;
}

.url-text {
    color: #3498db;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    word-break: break-all;
    /* 確保在移動端不會超出屏幕 */
    max-width: 100%;
    overflow-wrap: break-word;
}

/* 禮包碼表格 */
.gift-codes-section {
    margin-bottom: 40px;
}

.gift-codes-table {
    overflow-x: auto;
    /* 確保表格在移動端不會超出屏幕 */
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.gift-codes-table table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 2px solid #ecf0f1;
}

.gift-codes-table th,
.gift-codes-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.gift-codes-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.gift-codes-table td {
    color: #2c3e50;
}

.gift-code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #00c5a7;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ecf0f1;
}

.copy-btn {
    background: #00c5a7;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #00a085;
}

.copy-btn.copied {
    background: #27ae60;
}

/* 遊戲介紹 */
.game-description {
    margin-bottom: 40px;
}

.description-content {
    line-height: 1.8;
    color: #2c3e50;
    font-size: 16px;
}

/* 搜尋結果頁面 */
.search-results-header {
    margin-bottom: 30px;
}

.search-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
    color: #7f8c8d;
    font-size: 16px;
}

.search-filters {
    background: #ffffff;
    border: 2px solid #ecf0f1;
    padding: 20px;
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: #ffffff;
    color: #2c3e50;
    font-size: 14px;
}

.search-results {
    display: grid;
    gap: 20px;
}

.search-result-item {
    background: #ffffff;
    border: 2px solid #ecf0f1;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: border-color 0.2s;
}

.search-result-item:hover {
    border-color: #00c5a7;
}

.search-result-logo {
    flex-shrink: 0;
}

.search-result-logo img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
}

.search-result-content h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.search-result-content p {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 10px;
}

.search-result-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #7f8c8d;
}

.search-result-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-result-meta i {
    color: #00c5a7;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.no-results i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #bdc3c7;
}

.no-results h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.load-more-container {
    text-align: center;
    margin-top: 40px;
}

/* 暂无数据样式 */
.no-news, .no-gifts {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.no-news i, .no-gifts i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #bdc3c7;
}

.no-news h3, .no-gifts h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.no-news p, .no-gifts p {
    font-size: 16px;
    color: #7f8c8d;
}

/* 错误信息样式 */
.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.error-message i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #e74c3c;
}

.error-message h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.error-message p {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.btn-retry {
    background: #00c5a7;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-retry:hover {
    background: #00a085;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 15px 0;
        /* 移動端調整header高度 */
        min-height: 75px;
    }
    
    .logo img {
        height: 40px;
        /* 移動端logo陰影調整 */
        filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
    }
    
    .search-box {
        display: none;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        border-top: 2px solid #ecf0f1;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-item {
        margin: 0;
        border-bottom: 1px solid #ecf0f1;
    }
    
    .nav-item a {
        padding: 15px 20px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .news-container {
        grid-template-columns: 1fr;
        gap: 20px;
        /* 確保移動端新聞列表不會擋住banner */
        position: relative;
        z-index: 1;
        /* 移動端增加與hero區域的間距 */
        margin-top: 140px;
    }
    
    .hero-section {
        grid-template-columns: 1fr;
        /* 手機端使用更合適的高度計算 */
        --hero-height: calc((100vw - 20px) * 9 / 16);
        /* 確保hero區域在移動端有正確的層級 */
        position: relative;
        z-index: 1;
    }
    /* 手機端保持Banner左右排列，避免縮到難以辨識 */
    .banner-container {
        flex-direction: row;
        gap: 10px;
        /* 確保banner在移動端正確顯示 */
        position: relative;
        z-index: 1;
    }
    .banner {
        aspect-ratio: 16/9;
        /* 手機端banner高度調整 */
        max-height: var(--hero-height);
    }
    
    .carousel {
        aspect-ratio: 16/9;
        /* 手機端輪播圖高度調整 */
        max-height: var(--hero-height);
    }
    
    /* 移動端熱門禮包樣式調整 */
    .gift-item {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .gift-logo {
        width: 55px;
        height: 55px;
        margin-right: 12px;
    }
    
    .gift-name {
        font-size: 14px;
    }
    
    .gift-date {
        font-size: 12px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .carousel-caption {
        padding: 10px 12px;
    }
    
    .carousel-caption h3 {
        font-size: 16px;
        margin-bottom: 3px;
    }
    
    .carousel-caption p {
        font-size: 12px;
    }
    

    
    .load-more-btn {
        width: 90%;
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .loading-spinner {
        width: 30px;
        height: 30px;
        border-width: 2px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        /* 小屏幕使用更精確的高度計算 */
        --hero-height: calc((100vw - 20px) * 9 / 16);
        /* 確保小屏幕的層級正確 */
        z-index: 1;
    }
    
    .carousel {
        aspect-ratio: 16/9;
        max-height: var(--hero-height);
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
    
    .carousel-caption {
        padding: 8px 10px;
    }
    
    .carousel-caption h3 {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .carousel-caption p {
        font-size: 11px;
    }
    

    
         .section-title {
         font-size: 24px;
         flex-direction: column;
         gap: 15px;
         align-items: flex-start;
     }
     
     .section-title h2 {
         font-size: inherit;
     }
     
     .sort-controls {
         width: 100%;
         justify-content: flex-start;
     }
     
     .sort-btn {
         padding: 6px 12px;
         font-size: 13px;
     }
     
     /* 新聞排序按鈕響應式 */
     .news-sort-controls {
         width: 100%;
         justify-content: flex-start;
         flex-wrap: wrap;
         gap: 8px;
     }
     
     .news-sort-controls .sort-btn {
         padding: 6px 12px;
         font-size: 13px;
         min-width: auto;
     }
    
                   .news-item {
          padding: 15px;
          /* 確保移動端新聞項目不會與其他元素重疊 */
          position: relative;
          z-index: 1;
      }
    
    .news-number {
        width: 70px;
        height: 70px;
    }
    
         /* 遊戲詳情頁面響應式 */
     .game-header {
         flex-direction: column;
         gap: 20px;
         text-align: center;
         /* 確保移動端遊戲頭部填滿整個寬度 */
         width: 100%;
         box-sizing: border-box;
     }
     
     .game-logo {
         /* 移動端logo居中顯示 */
         display: flex;
         justify-content: center;
         width: 100%;
     }
     
     .game-logo img {
         width: 100px;
         height: 100px;
     }
     
     .game-info {
         /* 移動端遊戲信息填滿整個寬度 */
         width: 100%;
         box-sizing: border-box;
     }
     
     .game-info h1 {
         font-size: 24px;
         /* 確保標題在移動端填滿寬度 */
         width: 100%;
         text-align: center;
     }
     
     /* 移動端detail頁面內容修復 */
     .game-detail-section {
         padding: 20px;
         margin-bottom: 20px;
     }
     
     .meta-item {
         flex-direction: column;
         align-items: flex-start;
         gap: 8px;
         padding: 15px;
         /* 確保移動端meta-item填滿整個寬度 */
         width: 100%;
         box-sizing: border-box;
     }
     
     .meta-item span:first-of-type {
         min-width: auto;
         width: 100%;
     }
     
     .meta-item span:last-of-type {
         width: 100%;
         white-space: normal;
         word-break: break-all;
         /* 確保URL文本填滿整個寬度 */
         min-width: 100%;
         box-sizing: border-box;
     }
     
     .url-text {
         font-size: 12px;
         padding: 8px;
         word-break: break-all;
         /* 確保URL文本在移動端填滿整個寬度 */
         width: 100%;
         box-sizing: border-box;
         display: block;
     }
     
     /* 移動端遊戲信息區域填滿寬度 */
     .game-info {
         width: 100%;
         box-sizing: border-box;
     }
     
     /* 移動端下載連結區域填滿寬度 */
     .download-links-section {
         width: 100%;
         box-sizing: border-box;
     }
     
     .download-buttons {
         width: 100%;
         box-sizing: border-box;
     }
     
     /* 移动端meta字段布局 */
     .meta-item {
         /* 確保移動端meta-item填滿整個寬度 */
         width: 100%;
         box-sizing: border-box;
         margin-bottom: 8px;
     }
     
     .gift-codes-table {
         font-size: 14px;
     }
    
    .gift-codes-table th,
    .gift-codes-table td {
        padding: 10px;
    }
    
    /* 搜尋結果頁面響應式 */
    .search-result-item {
        flex-direction: column;
        text-align: center;
    }
    
    .search-result-logo img {
        width: 60px;
        height: 60px;
    }
    
    .search-result-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* 下載連結區域樣式 */
.download-links-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.section-subtitle {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 140px;
    justify-content: center;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.google-download {
    background: #4285f4;
    color: white;
}

.google-download:hover {
    background: #3367d6;
}

.ios-download {
    background: #000000;
    color: white;
}

.ios-download:hover {
    background: #333333;
}

/* 響應式下載按鈕 */
@media (max-width: 768px) {
    .download-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .download-btn {
        min-width: 100%;
        justify-content: center;
    }
}

/* 预约和下载按钮区域样式 */
.action-buttons-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.action-button-group {
    margin-bottom: 20px;
    text-align: center;
}

.action-button-group:last-child {
    margin-bottom: 0;
}

.action-title {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 600;
    text-align: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    min-width: 160px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn i {
    font-size: 18px;
}

/* Google Play预约按钮 */
.google-reserve-btn {
    background: linear-gradient(135deg, #4285f4 0%, #3367d6 100%);
    color: white;
    border: 2px solid #4285f4;
}

.google-reserve-btn:hover {
    background: linear-gradient(135deg, #3367d6 0%, #2a56c6 100%);
    border-color: #3367d6;
}

/* App Store预约按钮 */
.ios-reserve-btn {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: white;
    border: 2px solid #000000;
}

.ios-reserve-btn:hover {
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
    border-color: #333333;
}

/* Google Play下载按钮 */
.google-download-btn {
    background: linear-gradient(135deg, #34a853 0%, #2d8f47 100%);
    color: white;
    border: 2px solid #34a853;
}

.google-download-btn:hover {
    background: linear-gradient(135deg, #2d8f47 0%, #267a3d 100%);
    border-color: #2d8f47;
}

/* App Store下载按钮 */
.ios-download-btn {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: white;
    border: 2px solid #000000;
}

.ios-download-btn:hover {
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
    border-color: #333333;
}

/* 移动端按钮响应式 */
@media (max-width: 768px) {
    .action-buttons-section {
        padding: 20px;
        margin-top: 25px;
    }
    
    .action-btn {
        min-width: 100%;
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .action-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .action-button-group {
        margin-bottom: 25px;
    }
}
