/* ==========================================================================
   1. 變數與基礎設定 (Variables & Base)
   ========================================================================== */
:root {
    --bg-color: #050505;
    --card-bg: #111111;
    --text-color: #E6EDF3;
    --muted-text: #6e7681;
    --border-color: rgba(255, 255, 255, 0.08);
    --highlight-color: #00FFA3; /* 品牌螢光綠 */
    --glow-color: rgba(0, 255, 163, 0.07);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
}

/* 背景裝飾光暈 */
.bg-glow {
    position: fixed;
    top: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================================
   2. 導覽與佈局 (Navigation & Layout)
   ========================================================================== */
.detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem 6rem 1.5rem;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.back-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--muted-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.back-btn:hover {
    color: var(--highlight-color);
    transform: translateX(-5px);
}

/* 文章主體：兩欄佈局 */
.article-body {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 50px;
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.side-info {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.source-tag {
    font-size: 9px;
    font-weight: 900;
    color: var(--muted-text);
    letter-spacing: 2px;
}

.source-name {
    font-size: 13px;
    color: #fff;
    font-weight: 600;
}

/* ==========================================================================
   3. 標題與媒體 (Headers & Media)
   ========================================================================== */
.category-tag {
    color: var(--highlight-color);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.detail-header h1 {
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin: 0 0 2rem 0;
    color: #fff;
}

.meta-row {
    display: flex;
    gap: 25px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--muted-text);
}

.img-box.featured-image {
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    border-radius: 12px;
    background: #111;
    height: 450px;
}

.detail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: opacity 0.3s ease;
}
/* ==========================================================================
   4. 動態內容樣式 (Universal Parser Styles)
   ========================================================================== */

/* 通用小標題：帶螢光綠側邊線 */
.detail-content .sub-title {
    display: block !important;
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 4rem 0 1.5rem 0 !important;
    padding-left: 1.2rem !important;
    border-left: 5px solid var(--highlight-color) !important;
    line-height: 1.3;
}

/* 段落設定 */
.detail-content .paragraph {
    display: block !important;
    font-size: 1.15rem !important;
    line-height: 2 !important;
    margin-bottom: 2rem !important;
    color: rgba(230, 237, 243, 0.85) !important;
    text-align: justify;
}

/* 首段首字放大 */
.detail-content .first-para::first-letter {
    font-size: 4rem;
    font-weight: 900;
    color: var(--highlight-color);
    float: left;
    margin-right: 15px;
    line-height: 0.8;
    margin-top: 8px;
    text-shadow: 0 0 25px rgba(0, 255, 163, 0.3);
}

/* 通用清單樣式 */
.detail-content .custom-list {
    list-style: none;
    padding: 1.5rem;
    background: rgba(0, 255, 163, 0.03);
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.detail-content .custom-list li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 12px;
    color: #cbd5e1;
}

.detail-content .custom-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--highlight-color);
}

/* 通用引用區塊 */
.detail-content .expert-quote {
    font-style: italic;
    padding: 2rem;
    border-left: 2px solid var(--highlight-color);
    background: linear-gradient(90deg, rgba(0, 255, 163, 0.05), transparent);
    margin: 3rem 0;
    color: #fff;
}

/* FAQ 組件 */
.detail-content .faq-item {
    background: rgba(255, 255, 255, 0.03) !important;
    padding: 1.5rem !important;
    border-radius: 8px !important;
    margin-bottom: 1.5rem !important;
    border: 1px solid var(--border-color) !important;
}

.detail-content .faq-q { 
    color: var(--highlight-color); 
    font-weight: bold; 
    margin-bottom: 8px; 
}

.detail-content .faq-a { 
    color: var(--muted-text); 
    font-size: 0.95rem; 
}

/* ==========================================================================
   5. 底部與響應式 (Footer & Responsive)
   ========================================================================== */
.url-box {
    margin-top: 6rem;
    text-align: center;
}

.detail-url {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--highlight-color);
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    padding: 15px 30px;
    border: 1px solid rgba(0, 255, 163, 0.2);
    border-radius: 4px;
    transition: 0.3s;
}

.detail-url:hover {
    background: rgba(0, 255, 163, 0.05);
    border-color: var(--highlight-color);
    box-shadow: 0 0 20px rgba(0, 255, 163, 0.1);
}

@media (max-width: 850px) {
    .article-body {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .side-info {
        position: static;
        display: flex;
        gap: 30px;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--border-color);
    }
    .detail-header h1 { font-size: 2rem; }
}

@media (max-width: 768px) {
    .detail-img {
        height: 300px;
    }
}