/* 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);
}

.article-content figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* 코드 블록 라인 하이라이팅 */
.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;
}