/* article.css - 글 상세 전용 스타일 보강 */
/* 대부분 style.css에 통합됨. 추가 보강용. */

/* 목차(TOC) 자동 생성 시 */
.article-toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 32px;
}

.article-toc h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-toc ol {
    padding-left: 20px;
}

.article-toc li {
    margin-bottom: 6px;
    font-size: 0.9rem;
    list-style: decimal;
}

.article-toc a {
    color: var(--text-secondary);
}

.article-toc a:hover {
    color: var(--accent-light);
}

/* 이미지 캡션 */
.article-content figure {
    margin: 40px auto;
    text-align: center;
    max-width: 100%;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.article-content img:hover {
    transform: scale(1.02);
}

.story-image-open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: zoom-in;
}

.story-image-open:focus-visible {
    outline: 3px solid var(--accent-light);
    outline-offset: 4px;
}

.story-lightbox {
    width: min(96vw, 1400px);
    max-width: none;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #080a10;
    color: #fff;
}

.story-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.88);
}

.story-lightbox-inner {
    position: relative;
    padding: 52px 18px 18px;
}

.story-lightbox img {
    display: block;
    max-width: calc(96vw - 36px);
    max-height: 78vh;
    margin: auto;
    border-radius: 10px;
}

.story-lightbox-caption {
    margin: 12px 48px 0;
    color: #cbd5e1;
    text-align: center;
}

.story-lightbox-close,
.story-lightbox-nav {
    position: absolute;
    border: 1px solid #596174;
    border-radius: 999px;
    background: #171c29;
    color: #fff;
    cursor: pointer;
    font-size: 1.25rem;
}

.story-lightbox-close {
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
}

.story-lightbox-nav {
    top: 50%;
    width: 42px;
    height: 42px;
}

.story-lightbox-prev { left: 12px; }
.story-lightbox-next { right: 12px; }

.article-content figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* 가설·증거 비교표: 좁은 화면에서는 페이지가 아니라 표만 가로 스크롤 */
.article-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 28px 0;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    border-spacing: 0;
    background: var(--bg-secondary);
    -webkit-overflow-scrolling: touch;
}

.article-content th,
.article-content td {
    min-width: 170px;
    padding: 12px 14px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.article-content th:last-child,
.article-content td:last-child {
    border-right: 0;
}

.article-content tbody tr:last-child td {
    border-bottom: 0;
}

.article-content th {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* 코드 블록 라인 하이라이팅 */
.article-content pre {
    position: relative;
}

.article-content pre::before {
    content: attr(data-lang);
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* 광고 슬롯 */
.ad-slot {
    margin: 32px 0;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    text-align: center;
    min-height: 90px;
    border: 1px dashed var(--border);
}

/* 쿠팡 제휴 박스 */
.coupang-box {
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 184, 148, 0.05));
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.coupang-box a {
    font-weight: 600;
    color: var(--accent-light);
}

.coupang-disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* =======================================
   복사 기능 (Copy Protection & Button)
   ======================================= */
.copy-btn-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
    margin-top: -8px;
}

.copy-full-text-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.copy-full-text-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.copy-full-text-btn:active {
    transform: translateY(0);
}

/* 토스트 알림 (하단 팝업) */
.copy-toast {
    position: fixed;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10000;
    transition: bottom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.copy-toast.active {
    bottom: 30px;
}
/* ===== 시리즈 네비게이션 (글 페이지) — 2026-05-30 ===== */
.series-banner { margin: 0 0 1.5rem; }
.series-banner-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.85rem 1.1rem; border-radius: 12px; text-decoration: none;
    background: linear-gradient(135deg, rgba(0,212,255,0.10), rgba(139,92,246,0.10));
    border: 1px solid rgba(0,212,255,0.25);
    transition: border-color .2s, transform .2s;
}
.series-banner-link:hover { border-color: rgba(0,212,255,0.6); transform: translateY(-1px); }
.series-banner-icon { font-size: 1.6rem; line-height: 1; }
.series-banner-text { display: flex; flex-direction: column; gap: 2px; }
.series-banner-text strong { color: var(--text-primary, #e8eefc); font-size: 0.98rem; }
.series-banner-progress { font-size: 0.82rem; color: var(--accent, #00d4ff); }

.series-toc {
    margin: 3rem 0 1rem; padding: 1.5rem; border-radius: 16px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
}
.series-toc-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.series-toc-icon { font-size: 2rem; line-height: 1; }
.series-toc-title { font-size: 1.15rem; margin: 0; color: var(--text-primary, #e8eefc); }
.series-toc-sub { font-size: 0.85rem; color: var(--text-secondary, #9aa7c0); margin: 2px 0 0; }
.series-toc-sub a { color: var(--accent, #00d4ff); text-decoration: none; }
.series-toc-list { list-style: none; margin: 0; padding: 0; }
.series-toc-item {
    display: flex; align-items: flex-start; gap: 0.7rem;
    padding: 0.6rem 0.5rem; border-top: 1px solid rgba(255,255,255,0.06);
}
.series-toc-item:first-child { border-top: none; }
.series-toc-num {
    flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700;
    background: rgba(0,212,255,0.15); color: var(--accent, #00d4ff);
}
.series-toc-link { color: var(--text-primary, #e8eefc); text-decoration: none; line-height: 1.45; }
.series-toc-link:hover { color: var(--accent, #00d4ff); text-decoration: underline; }
.series-toc-item.is-current { background: rgba(0,212,255,0.06); border-radius: 8px; }
.series-toc-item.is-current .series-toc-num { background: var(--accent, #00d4ff); color: #001018; }
.series-toc-label { color: var(--text-primary, #e8eefc); font-weight: 700; line-height: 1.45; }
.series-toc-label em { color: var(--accent, #00d4ff); font-style: normal; font-weight: 600; font-size: 0.85em; }
.series-toc-soon { color: var(--text-secondary, #9aa7c0); line-height: 1.45; }
.series-toc-soon em { font-style: normal; font-size: 0.85em; opacity: 0.8; }
.series-toc-item.is-upcoming .series-toc-num { background: rgba(255,255,255,0.08); color: var(--text-secondary, #9aa7c0); }
