/* =========================================
   全局基礎設定 (Base)
   ========================================= */
html,
body {
    margin: 0;
    padding: 0;
    width: 100vw;
    min-height: 100vh;
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', Arial, sans-serif;
    background: #0a0e17; /* 更深邃的背景底色 */
    color: #f4f8ff;
    overflow-x: hidden;
    position: relative;
}

/* 超連結通用設定 */
a, a:visited, a:active, a:hover, a:focus {
    text-decoration: none !important;
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}

/* =========================================
   背景與遮罩 (Background & Mask)
   ========================================= */
/* 背景影片/圖片 */
.hero__bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 0;
}

.hero__bg--mobile {
    display: none;
}

.dark-mask {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    background: radial-gradient(circle at center, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.9) 100%);
    pointer-events: none;
}

/* =========================================
   按鈕核心樣式 (RPG Button Core)
   這段是改版重點：暗黑金屬風格
   ========================================= */
.main-btn {
    /* 深色玻璃金屬質感 */
    background: linear-gradient(180deg, rgba(45, 38, 28, 0.85) 0%, rgba(20, 15, 8, 0.95) 100%);
    
    /* 金屬邊框：上亮下暗，製造立體感 */
    border: 1px solid #6b5832; 
    border-top: 1px solid #bf9e60; /* 頂部高光 */
    border-bottom: 1px solid #362812; /* 底部陰影 */
    
    /* 文字顏色：羊皮紙金/米色 */
    color: #ebd08d;
    
    /* 形狀 */
    border-radius: 4px; /* 改為較銳利的導角，更有遊戲感 */
    
    /* 字體 */
    font-weight: 700;
    letter-spacing: 2px;
    
    /* 光暈與陰影 */
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.7), /* 外部投影 */
        inset 0 0 15px rgba(255, 215, 0, 0.05); /* 內部微光 */
        
    /* 轉場 */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    
    /* 排版 */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 按鈕內的圖示：強制轉為金色/米白，確保在黑底上看得到 */
.main-btn img {
    filter: brightness(0) saturate(100%) invert(86%) sepia(18%) saturate(579%) hue-rotate(357deg) brightness(96%) contrast(89%);
    transition: transform 0.3s ease;
}

/* 滑鼠懸停效果 (Hover) */
.main-btn:hover,
.main-btn:focus {
    /* 背景變亮一點 */
    background: linear-gradient(180deg, rgba(65, 55, 40, 0.9) 0%, rgba(30, 22, 12, 0.95) 100%);
    border-color: #ffd700; /* 邊框變純金 */
    color: #fff; /* 文字變白亮 */
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.8), 
        0 0 15px rgba(255, 200, 80, 0.3), /* 金色外發光 */
        inset 0 0 10px rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.main-btn:hover img {
    transform: scale(1.1);
    filter: brightness(0) invert(1); /* Hover時圖示變全白 */
}

/* 特殊強調按鈕 (前往官網) - 繼承基礎並增強 */
.main-btn-gold {
    /* 讓這個按鈕稍微亮一點，或邊框更明顯 */
    border: 1px solid #dec38f;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(185, 147, 32, 0.15);
}

/* =========================================
   排版佈局 (Layout)
   ========================================= */

/* Hero Section 容器 */
.hero-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 680px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* 中央 LOGO */
.logo-main {
    position: relative;
    width: 420px;
    max-width: 85vw;
    z-index: 4;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}


#godring-logo-effect {
    z-index: 5;
    margin-bottom: 20px;
}

/* --- 左側功能區 (下載區) --- */
.side-func {
    position: absolute;
    left: 5vw;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    z-index: 5;
    width: 280px; /* 固定寬度讓按鈕整齊 */
}

/* 左側大按鈕的尺寸微調 */
.side-func .main-btn {
    width: 100%;
    padding: 20px 0;
    font-size: 1.4em; /* 大字體 */
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); /* 切角造型 */
}

/* 前往官網按鈕特別加大 */
.side-func .main-btn-gold {
    padding: 24px 0;
    font-size: 1.6em;
    background: linear-gradient(180deg, rgba(70, 55, 30, 0.9) 0%, rgba(30, 20, 5, 0.95) 100%);
    border: 1px solid #ffd700;
}

.btn-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

/* --- 右側連結區 --- */
.side-links {
    position: absolute;
    right: 5vw;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* 靠右對齊 */
    gap: 15px;
    z-index: 5;
    width: 220px;
}

/* 右側小按鈕的尺寸微調 */
.side-links .main-btn {
    width: 100%;
    padding: 12px 0;
    font-size: 1.1em;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.6); /* 右側按鈕可以稍微透明一點 */
    border: 1px solid #554422;
}
.side-links .main-btn:hover {
    background: rgba(20, 20, 20, 0.8);
    border-color: #aa8844;
}

/* =========================================
   頁尾 (Footer)
   ========================================= */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    background: linear-gradient(to top, #000000 0%, #111111 100%);
    border-top: 1px solid #333;
    padding: 40px 0 30px 0;
    z-index: 6;
    margin-top: 50px;
}

.footer h1 {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #bf9e60 0%, #ffeec7 50%, #bf9e60 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer img {
    width: 320px;
    max-width: 90%;
    border-radius: 8px;
    opacity: 0.8;
    transition: opacity 0.3s;
}
.footer img:hover {
    opacity: 1;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}

.footer-links a {
    color: #888;
    font-size: 0.9em;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: #ebd08d;
}

/* =========================================
   徽章 (Badge)
   ========================================= */
.godauto-badge-fixbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding-bottom: 20px;
    z-index: 99;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.godauto-badge-fixbar.hide {
    transform: translateY(100%);
    opacity: 0;
}

.godauto-badge {
    pointer-events: auto;
    font-size: 1.2em;
    font-weight: bold;
    padding: 10px 30px;
    border-radius: 50px;
    /* 改為暗金風格 */
    background: linear-gradient(90deg, #332610 0%, #5e4b25 100%);
    border: 1px solid #ffd700;
    color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   RWD 響應式設計 (Mobile)
   ========================================= */
@media (max-width: 900px) {
    /* 平板/筆電尺寸：稍微縮小兩側 */
    .side-func { left: 2vw; width: 220px; }
    .side-links { right: 2vw; width: 180px; }
    .side-func .main-btn { font-size: 1.2em; }
}

@media (max-width: 700px) {
    /* --- 手機版 --- */
    
    .hero__bg--desktop { display: none !important; }
    .hero__bg--mobile { display: block !important; }

    /* 佈局改為垂直排列 */
    .hero-section {
        justify-content: flex-start;
        padding-top: 60px;
        height: auto;
        min-height: 100vh;
    }

    /* LOGO */
    .logo-main {
        width: 80vw;
        max-width: 300px;
        margin-bottom: 30px;
    }

    /* 隱藏左側桌面版按鈕容器，改用下方統一樣式 */
    .side-func {
        display: none !important; 
    }

    /* 手機版：右側連結區變成主要按鈕區，置於 LOGO 下方 */
    .side-links {
        position: static; /* 取消絕對定位 */
        transform: none;
        width: 90vw;
        align-items: center;
        margin-top: 10px;
    }

    /* 官網按鈕在手機版顯示 */
    .side-links .main-btn-gold {
        display: flex !important; /* 確保顯示 */
        width: 100%;
        padding: 18px 0;
        margin-bottom: 10px;
        font-size: 1.3em;
        background: linear-gradient(180deg, rgba(80, 60, 30, 0.95) 0%, rgba(40, 30, 10, 1) 100%);
        border: 1px solid #ffe066;
        box-shadow: 0 0 15px rgba(255, 220, 100, 0.2);
    }
    
    /* 其他下載按鈕在手機版也應該顯示出來 (如果你希望有的話)
       但在你的原始 HTML 結構中，下載按鈕是在 .side-func 裡。
       如果希望手機版也顯示下載按鈕，建議在 HTML 把 .side-func 的內容
       複製一份到手機版會顯示的地方，或是用 CSS Grid 重排。
       目前依照原本邏輯：手機版主要顯示 side-links 的內容。
    */

    .side-links .main-btn {
        width: 100%;
        margin-bottom: 10px;
        background: rgba(20, 20, 20, 0.85);
    }
    
    .footer {
        margin-top: 40px;
    }
}