/* detail.css */

/* 頁面背景與基礎設定 */
body.detail-page {
    background: #000000;
    color: #e6e6e6;
    font-family: 'Inter', -apple-system, sans-serif;
    min-height: 100vh;
}

/* 返回按鈕優化 */
.back-link {
    color: #ffc107;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.back-link:hover {
    color: #fff;
    transform: translateX(-5px);
}

/* 關鍵字容器 */
.detail-keywords {
    margin-bottom: 1.5rem;
}

/* 個別標籤樣式 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(255, 255, 255, 0.05); /* 半透明背景 */
    color: rgba(255, 255, 255, 0.7);            /* 稍淡的文字顏色 */
    border: 1px solid rgba(255, 255, 255, 0.1);  /* 微弱邊框 */
    border-radius: 4px;                          /* 輕微圓角，更顯科技感 */
    font-size: 12px;
    font-family: 'Monaco', 'Consolas', monospace; /* 使用等寬字體更有數據感 */
    text-transform: uppercase;                   /* 大寫提升質感 */
    transition: all 0.3s ease;
    cursor: default;
}

/* 標題設計 */
.detail-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, #bdc3c7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.header-meta {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* 圖片效果 */
.detail-img-box {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- AI 生成內容樣式修飾 --- */

.ai-formatted-content {
    font-size: 1.15rem;
    line-height: 1.85;
    color: #777;
}

/* 段落首字下沉或特別強調 */
.first-para {
    font-size: 1.3rem;
    color: #fff;
    font-weight: 400;
    margin-bottom: 2rem;
}

/* 子標題專業感 */
.sub-title {
    color: #fff;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
    position: relative;
    padding-left: 1rem;
}
.sub-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background: #ffc107;
    border-radius: 2px;
}

/* 專業引言樣式 */
.expert-quote {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 16px 16px 0;
    border-left: 4px solid #ffc107;
    padding: 2rem;
    margin: 3rem 0;
    font-size: 1.4rem;
    color: #fff;
    font-style: italic;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}

/* 數據資訊盒樣式 */
.info-list-box {
    background: rgba(255, 193, 7, 0.05);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}
.source-label {
    color: #ffc107;
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 700;
}

/* 表格優化 */
.table-container {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 1px;
    margin: 2.5rem 0;
}
.styled-table thead {
    background: rgba(255, 255, 255, 0.05);
}
.styled-table th, .styled-table td {
    border-color: rgba(255, 255, 255, 0.05);
    padding: 1rem;
}

/* 底部閱讀進度條 */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: #ffc107;
    z-index: 1000;
    width: 0%;
    transition: width 0.1s ease-out;
}

/* 1. 基礎文章容器，建議在 HTML 用 <div class="article-detail-container"> 包起來 */
.article-detail-container {
    line-height: 1.8;
    color: #333;
    font-size: 16px;
    max-width: 800px;
    margin: 0 auto;
}

/* 2. 段落與首段 Hook */
.paragraph {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.first-para {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
    border-left: 4px solid #3498db;
    padding-left: 15px;
}

/* 3. 語義標題 */
.sub-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: #e9e9e9;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 5px;
}

/* 4. 自定義列表 */
.custom-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.custom-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
}

.custom-list li::before {
    content: "•";
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: 5px;
}

/* 5. 數據快照資訊盒 (Info List Box) */
.info-list-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 2rem 0;
}

.source-label {
    font-weight: 800;
    text-transform: uppercase;
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

/* 6. 專家引言 */
.expert-quote {
    font-style: italic;
    font-size: 1.2rem;
    color: #4a5568;
    background: #fff;
    border-left: 5px solid #cbd5e0;
    margin: 2rem 0;
    padding: 1.5rem;
    position: relative;
}

/* 7. 表格容器與樣式 */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.styled-table th {
    background-color: #f1f5f9;
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.styled-table td {
    padding: 12px;
    border-bottom: 1px solid #edf2f7;
}

/* 8. FAQ 區塊 */
.faq-section {
    background-color: #fff;
    border-top: 3px solid #3498db;
    padding: 20px;
    margin-top: 3rem;
}

.hover-border-warning {
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.hover-border-warning:hover {
    border-color: rgba(255, 193, 7, 0.4) !important;
    background-color: rgba(255, 193, 7, 0.02) !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.transition-all {
    transition: all 0.3s ease;
}

/* 讓按鈕在寬度不足時自動調整 */
@media (max-width: 576px) {
    .source-metadata-wrapper .btn {
        width: 100%;
        margin-top: 10px;
    }
}