/* --- 全域與排版 --- */
:root {
    --primary: #1a73e8;
    --text-main: #333;
    --text-gray: #666;
    --bg-light: #fafafa; /* 極淡的灰色，用於條款區塊 */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    line-height: 1.8;
    color: var(--text-main);
    background-color: #fff; /* 背景改為全白，去除灰底 */
    margin: 0;
}

/* --- 導航列 (保持乾淨) --- */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #f0f0f0; /* 極細的線 */
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    color: #000;
    text-decoration: none;
    font-size: 1.1rem;
}

.nav-cta {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-cta:hover {
    text-decoration: underline;
}

/* --- 內容容器 --- */
.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px 80px; /* 底部留白多一點 */
}

/* --- 文章樣式 --- */
h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.post-meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 40px;
}

p {
    margin-bottom: 1.5em;
    font-size: 1.05rem;
}

h3 {
    margin-top: 50px;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

/* --- 功能列表 (無框設計) --- */
.feature-list {
    margin: 40px 0;
}

.feature-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px; /* 項目間距 */
}

.feature-icon {
    font-size: 1.5rem;
    padding-top: 3px; /* 微調讓 icon 對齊文字 */
}

.feature-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #000;
}

.feature-content p {
    margin: 0;
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* --- 分隔線 --- */
hr {
    border: 0;
    border-top: 1px solid #eaeaea; /* 極淺的分隔線 */
    margin: 60px 0;
}

/* --- 下載區塊 (融入文章) --- */
.download-section {
    /* 這裡不再設定 border 和 shadow */
    margin-top: 20px;
}

.download-intro h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.steps-list {
    padding-left: 20px;
    color: #444;
    margin-bottom: 40px;
}

.steps-list li {
    margin-bottom: 12px;
}

/* --- 條款區塊 (平面化) --- */
.terms-block {
    background-color: var(--bg-light); /* 僅用淡色背景區分 */
    padding: 25px;
    border-radius: 8px; /* 輕微圓角 */
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 30px;
}

.terms-block h4 {
    margin-top: 0;
    color: #333;
}

.terms-block p {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* --- 動作區 (Checkbox + Button) --- */
.action-area {
    margin-top: 30px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    cursor: pointer;
    color: #333;
    font-weight: 500;
}

.btn-download {
    display: block;
    width: 100%;
    padding: 18px;
    background-color: #000; /* 改為黑色按鈕，更有設計感 */
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-download:disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.btn-download:not(:disabled):hover {
    opacity: 0.8;
}

/* 手機版調整 */
@media (max-width: 600px) {
    h1 { font-size: 1.8rem; }
    .container { padding: 30px 20px; }
}
/* --- 核心功能圖文左右排版區 --- */
.features-split-container {
    display: flex;
    align-items: flex-start; /* 讓內容靠上方對齊 */
    gap: 40px; /* 左右區塊間距 */
    margin: 40px 0;
}

/* 左側文字內容區 */
.features-content {
    flex: 3; /* 佔據較大比例 (例如 60%) */
}

/* 調整內部 h3 的間距，避免在容器內上方留白太多 */
.features-content h3 {
    margin-top: 0; 
    margin-bottom: 30px;
}

/* 右側圖片區 */
.features-image {
    flex: 2; /* 佔據較小比例 (例如 40%) */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10px; /* 微調讓圖片與標題視覺對齊 */
}

/* 圖片樣式 */
.features-image img {
    width: 100%;
    max-width: 320px; /* 限制最大寬度，避免圖片過大 */
    height: auto;
    border-radius: 12px; /* 輕微圓角，增加現代感 */
    /* 如果希望圖片有點層次感，可以加上極淡的陰影，若要極簡可移除下一行 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}

/* --- 響應式設計：手機版調整 --- */
@media (max-width: 768px) {
    /* 在平板和手機上改為垂直排列 */
    .features-split-container {
        flex-direction: column; 
        gap: 30px;
    }

    /* 圖片在手機上置中顯示 */
    .features-image {
        width: 100%;
        justify-content: center;
        padding-top: 0;
    }

    .features-image img {
        max-width: 80%; /* 手機上稍微縮小一點 */
    }
}

/* --- 歷史版本區塊 --- */
.history-versions {
    margin-top: 40px;
    border-top: 1px dashed #eee;
    padding-top: 20px;
}

.history-toggle {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.history-toggle:hover {
    color: var(--primary);
}

.history-list {
    margin-top: 15px;
    background-color: #fcfcfc;
    border-radius: 6px;
    padding: 10px;
}

.history-list table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.history-list th {
    text-align: left;
    color: #888;
    font-weight: 500;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.history-list td {
    padding: 10px 8px;
    color: #555;
    border-bottom: 1px solid #f5f5f5;
}

.history-list a {
    color: var(--primary);
    text-decoration: none;
}

.history-list a:hover {
    text-decoration: underline;
}

/* ...保留您之前的樣式... */

.version-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    animation: fadeIn 0.5s ease; /* 增加出現動畫 */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.history-list {
    margin-top: 20px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.history-list table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.history-list th {
    background-color: #f8f9fa;
    text-align: left;
    color: #555;
    padding: 12px 15px;
    border-bottom: 2px solid #eee;
}

.history-list td {
    padding: 15px;
    color: #444;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

/* 最新版本特別標註 */
.latest-version {
    background-color: #f0f7ff;
}

.download-link {
    font-weight: bold;
    color: var(--primary) !important;
    
}


.history-list a {
    color: var(--primary);
    text-decoration: none;
    background: #eef4ff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.history-list a:hover {
    background: var(--primary);
    color: #fff;
}

/* 手機版適應：讓表格可以左右滑動避免破版 */
@media (max-width: 600px) {
    .history-list {
        overflow-x: auto;
    }
    .history-list table {
        min-width: 500px;
    }
}
td[data-label="操作"]{
    min-width: 60px !important;
}

td[data-label="版本號"]{
    min-width: 60px !important;
}

/* 平台選擇容器 */
.platform-choice-container {
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

/* 按鈕排列 */
.platform-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap; /* 手機版自動換行 */
}

/* 平台按鈕樣式 */
.platform-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

/* Android 按鈕顏色 */
.platform-btn.android {
    background-color: #3DDC84; /* Android 綠 */
    color: #073042;
}

/* iOS 按鈕顏色 */
.platform-btn.ios {
    background-color: #000000; /* Apple 黑 */
    color: white;
}

/* 按鈕懸停效果 */
.platform-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 返回按鈕 */
.back-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 10px;
    margin-bottom: 10px;
    text-decoration: underline;
}

/* iOS 區塊樣式 */
.ios-placeholder {
    text-align: center;
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 10px;
    margin-top: 20px;
}

.ios-link {
    background-color: #007aff;
    color: white !important;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    display: inline-block;
    margin-top: 15px;
}

/* 簡單的淡入動畫 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* iOS 選項容器 */
.ios-options-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

/* iOS 卡片通用樣式 */
.ios-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
}

.ios-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-body {
    padding: 20px;
}

/* 短期使用專屬樣式 */
.ios-notes {
    text-align: left;
    background-color: #fff3cd; /* 淺黃色警示底 */
    color: #856404;
    padding: 15px 15px 15px 30px; /* 左邊留空間給 bullet points */
    border-radius: 8px;
    margin: 15px 0;
    font-size: 0.95rem;
}

.ios-notes li {
    margin-bottom: 8px;
}

/* iOS 下載按鈕 */
.btn-download.ios-btn {
    background-color: #007aff; /* iOS 藍 */
    color: white;
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 10px;
}

.btn-download.ios-btn:hover {
    background-color: #005bb5;
}

/* 永久使用 - 折疊樣式 (Details/Summary) */
details summary {
    list-style: none; /* 移除預設三角形 */
    cursor: pointer;
    padding: 20px;
    background-color: #f8f9fa;
    user-select: none;
    transition: background-color 0.2s;
}

details summary::-webkit-details-marker {
    display: none; /* 隱藏 Chrome/Safari 預設三角形 */
}

details summary:hover {
    background-color: #f0f0f0;
}

details summary h3 {
    margin: 0;
    display: flex;
    justify-content: space-between; /* 讓文字和箭頭分開 */
    align-items: center;
    font-size: 1.1rem;
}

/* 箭頭動畫 */
details summary .arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

details[open] summary .arrow {
    transform: rotate(180deg); /* 展開時旋轉箭頭 */
}

/* 展開後的內容動畫 (簡單版) */
.expand-content {
    border-top: 1px solid #eee;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- iOS 手風琴容器 --- */
.ios-accordion-container {
    max-width: 600px;
    margin: 10px auto;
    display: flex;
    flex-direction: column;
    gap: 12px; /* 卡片之間的距離 */
}

.ios-main-title {
    text-align: center;
    margin: 10px 0 20px 0;
    font-size: 1.2rem;
    color: #333;
}

/* --- 卡片外觀設計 --- */
.ios-detail-card {
    background: #ffffff;
    border-radius: 16px; /* 更圓潤的邊角 */
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04); /* 極淡的陰影，看起來更有質感 */
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 開啟時加深陰影 */
.ios-detail-card[open] {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border-color: #e0e0e0;
}

/* --- 標題列 (Summary) --- */
.card-summary {
    list-style: none;
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    user-select: none;
}

/* 隱藏預設三角形 */
.card-summary::-webkit-details-marker { display: none; }

.summary-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    color: #1a1a1a;
}

.summary-icon {
    font-size: 1.4rem;
}

/* 箭頭動畫 */
.arrow {
    font-size: 0.8rem;
    color: #999;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ios-detail-card[open] .arrow {
    transform: rotate(180deg);
    color: #333;
}

/* --- 內容區域 --- */
.detail-content {
    padding: 0 20px 24px 20px;
    border-top: 1px solid #f5f5f5;
    animation: contentSlide 0.3s ease;
}

@keyframes contentSlide {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 標籤 Badge */
.badge-warning, .badge-neutral {
    display: inline-block;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 8px;
}

.badge-warning { background: #FFF4E5; color: #B76E00; }
.badge-neutral { background: #F3F4F6; color: #4B5563; }

.desc-text {
    font-size: 0.95rem;
    color: #555;
    margin: 5px 0 15px 0;
    line-height: 1.5;
}

/* 警示框框 */
.warning-box {
    background: #fff8f8;
    border-left: 3px solid #ff4d4f;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.warning-box ul {
    margin: 0;
    padding-left: 20px;
    color: #d32f2f;
    font-size: 0.9rem;
}

.warning-box li {
    margin-bottom: 4px;
}

/* iOS 風格下載按鈕 */
.ios-download-btn {
    display: block;
    width: 80%;
    justify-self: center;
    background-color: #007AFF; /* Apple Blue */
    color: white;
    text-align: center;
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    transition: transform 0.2s, background-color 0.2s;
}

.ios-download-btn:active {
    transform: scale(0.98);
    background-color: #006ce6;
}

.tiny-note {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    margin-top: 10px;
}

/* 佔位符 */
.content-placeholder {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

/* --- 手機版專屬微調 (螢幕寬度小於 480px 時) --- */
@media (max-width: 480px) {
    /* 縮小標題字體 */
    .summary-info {
        font-size: 0.95rem; /* 稍微縮小 */
    }
    
    .summary-icon {
        font-size: 1.2rem;
    }

    /* 調整內邊距，讓手機畫面不那麼擁擠 */
    .card-summary {
        padding: 15px 16px;
    }
    
    .detail-content {
        padding: 0 16px 20px 16px;
    }

    /* 縮小內文 */
    .desc-text {
        font-size: 0.85rem;
    }

    .warning-box ul {
        font-size: 0.85rem;
        padding-left: 18px;
    }

    /* 按鈕稍微小一點，符合手指觸控 */
    .ios-download-btn {
        width: 90%;
        padding: 6px;
        font-size: 0.95rem;
    }
    
    .tiny-note {
        font-size: 0.75rem;
    }
}

/* --- 勸退區塊樣式 --- */
.hardcore-zone {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    border: 1px dashed #ccc; /* 虛線邊框增加工程感 */
}

.hardcore-title {
    font-weight: 800;
    color: #333;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.checklist li {
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #444;
}

.give-up-text {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

/* 分隔線 */
.divider {
    border: 0;
    height: 1px;
    background: #eee;
    margin: 20px 0;
}

/* --- 步驟樣式 --- */
.step-title {
    margin: 0 0 10px 0;
    color: #1a1a1a;
    font-size: 1rem;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.step-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.step-num {
    background-color: #333;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0; /* 防止號碼被壓扁 */
    margin-top: 2px;
}

.step-info strong {
    display: block;
    font-size: 0.9rem;
    color: #222;
    margin-bottom: 2px;
}

.step-info p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.step-info a {
    color: #007aff;
    text-decoration: underline;
}

/* IPA 下載按鈕 (次要風格) */
.ios-download-btn.secondary-btn {
    background-color: #5856d6; /* 紫色，區分於上面的藍色 */
    box-shadow: 0 4px 12px rgba(88, 86, 214, 0.3);
}

.ios-download-btn.secondary-btn:active {
    background-color: #4a48b8;
}

/* --- 手機版微調 --- */
@media (max-width: 480px) {
    .hardcore-title { font-size: 0.9rem; }
    .checklist li { font-size: 0.85rem; }
    .step-info strong { font-size: 0.88rem; }
    .step-info p { font-size: 0.8rem; }
}


/* --- 影片區塊樣式 --- */
.video-section {
    margin: 20px 0;
    padding-top: 10px;
    border-top: 1px solid #eee; /* 上方加一條淡線區隔步驟 */
}

.video-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

/* RWD 影片容器 (讓 Youtube 在手機上自適應) */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 (9 / 16 = 0.5625) */
    height: 0;
    margin-bottom: 15px; /* 兩部影片之間的距離 */
    border-radius: 8px; /* 讓影片有圓角，比較好看 */
    overflow: hidden;
    background-color: #000; /* 載入前的背景色 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 手機版微調 */
@media (max-width: 480px) {
    .video-section {
        margin: 15px 0;
    }
    
    .video-title {
        font-size: 0.9rem;
    }
}

/* --- FAQ 常見問題區塊 --- */
.faq-section {
    margin-top: 30px;
    margin-bottom: 50px;
    padding: 0 10px;
}

.faq-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 25px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    align-items: flex-start;
}

/* 左側表情符號 */
.faq-icon {
    font-size: 2.5rem;
    background: #f0f7ff;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0; /* 防止被擠壓 */
}

.faq-content h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1rem;
    line-height: 1.4;
}

.faq-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* 費用列表樣式 */
.cost-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
}

.cost-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.cost-list li:last-child {
    border-bottom: none;
}

.store-name {
    font-weight: bold;
    color: #1a73e8;
}

.store-price {
    color: #d93025; /* 紅色強調價格 */
    font-weight: 500;
}

.sincere-text {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

/* --- 手機版適應 --- */
@media (max-width: 480px) {
    .faq-card {
        flex-direction: column; /* 手機版改為垂直排列 */
        padding: 20px;
    }

    .faq-icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
        margin-bottom: 5px;
    }
    
    .faq-content h3 {
        font-size: 1.05rem;
    }
    
    .cost-list li {
        flex-direction: column; /* 費用太長的話換行 */
        gap: 5px;
    }
}