/* =========================================
   용어 상세 페이지 전용 스타일 (term/detail.html)
   ========================================= */

.term-detail-page {
    min-height: 100vh;
    padding: 2rem 0 4rem;
}

.term-detail-card {
    position: relative;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, #2d2d4e);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.term-category-badge {
    display: inline-block;
    background: var(--accent-color, #e10600);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
    letter-spacing: 0.05em;
}

.term-title-ko {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin: 0 0 0.25rem;
    line-height: 1.2;
}

.term-title-en {
    font-size: 1.1rem;
    color: var(--text-secondary, #a0a0b8);
    margin: 0 0 1.75rem;
}

.term-image {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.75rem;
    border: 1px solid var(--border-color, #2d2d4e);
}

.term-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary, #e0e0f0);
    white-space: pre-wrap;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary, #a0a0b8);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

.back-btn:hover {
    color: var(--text-primary, #ffffff);
}

.related-terms-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #2d2d4e);
}

.related-terms-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary, #a0a0b8);
    margin-bottom: 1rem;
}

.related-terms-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.related-term-chip {
    background: #333;
    color: #e0e0f0;
    text-decoration: none;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.related-term-chip:hover {
    background: #dc2626;
    color: #fff;
}

/* 화살표 네비게이션 버튼 — 모바일: 옅게 노출, 데스크톱: 선명하게 */
.nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 52px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #ffffff);
    text-decoration: none;
    font-size: 1.1rem;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.25;
    transition: background 0.2s, opacity 0.2s;
    z-index: 100;
}

.nav-arrow.prev { left: 4px; }
.nav-arrow.next { right: 4px; }

@media (min-width: 768px) {
    .nav-arrow {
        width: 48px;
        height: 64px;
        font-size: 1.5rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        opacity: 1;
    }
    .nav-arrow:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    .nav-arrow.prev { left: 12px; }
    .nav-arrow.next { right: 12px; }
}

/* 스와이프 힌트 배지 (모바일 전용) */
.swipe-hint {
    display: none;
}

@media (max-width: 767px) {
    .swipe-hint {
        display: block;
        text-align: center;
        font-size: 0.85rem;
        color: var(--text-secondary, #a0a0b8);
        margin-top: 1.25rem;
        padding: 0.5rem 1rem;
        animation: swipeHintPulse 1s ease-in-out 3, swipeHintFadeOut 0.8s ease-out 4s forwards;
    }
}

@keyframes swipeHintPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.04); }
}

@keyframes swipeHintFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; pointer-events: none; }
}

/* =========================================
   DOM Clone 애니메이션 래퍼
   ========================================= */

.detail-content-wrapper {
    position: relative;
    overflow: hidden;
}

/* =========================================
   로딩 스피너 오버레이
   ========================================= */

.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 46, 0.7);
    border-radius: 12px;
    z-index: 10;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--accent-color, #e10600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
