/* ==========================================================================
   서울탐정 라이브 모션그래픽 뒷배경 & 다이내믹 리딩(Reading) UX 엔진
   ========================================================================== */

/* 1. 최상단 실시간 독서 진행률 네온 바 */
#seoulReadingProgressWrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(4, 8, 20, 0.7);
    z-index: 9999;
    pointer-events: none;
}
#seoulReadingProgressBar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #d4af37 0%, #f7dc79 45%, #38bdf8 80%, #d4af37 100%);
    background-size: 200% 100%;
    animation: shimmerBar 3s linear infinite;
    box-shadow: 0 0 14px rgba(247, 220, 121, 0.9), 0 0 24px rgba(56, 189, 248, 0.6);
    transition: width 0.12s ease-out;
}
@keyframes shimmerBar {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* 2. 풀스크린 라이브 모션그래픽 뒷배경 컨테이너 */
#seoulLiveBgWrap {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: radial-gradient(circle at 50% 20%, #091530 0%, #040814 70%, #02050c 100%);
}

/* 움직이는 사이버 퍼스펙티브 그리드 레이어 */
.seoul-moving-grid {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.055) 1px, transparent 1px);
    background-size: 64px 64px;
    transform: perspective(600px) rotateX(28deg);
    animation: panCyberGrid 26s linear infinite;
    opacity: 0.75;
}
@keyframes panCyberGrid {
    0% { transform: perspective(600px) rotateX(28deg) translateY(0) translateX(0); }
    100% { transform: perspective(600px) rotateX(28deg) translateY(64px) translateX(64px); }
}

/* 살아 움직이는 대형 오로라/네뷸라 광원 3종 */
.seoul-aurora-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(85px);
    opacity: 0.42;
    mix-blend-mode: screen;
    will-change: transform;
}
.seoul-aurora-orb.orb-gold {
    width: 520px;
    height: 520px;
    top: 8%;
    left: 10%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.55) 0%, rgba(212, 175, 55, 0) 70%);
    animation: floatOrbGold 18s ease-in-out infinite alternate;
}
.seoul-aurora-orb.orb-sapphire {
    width: 620px;
    height: 620px;
    bottom: 5%;
    right: 8%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.48) 0%, rgba(30, 64, 175, 0) 70%);
    animation: floatOrbSapphire 22s ease-in-out infinite alternate;
}
.seoul-aurora-orb.orb-violet {
    width: 460px;
    height: 460px;
    top: 45%;
    left: 48%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.36) 0%, rgba(212, 175, 55, 0.12) 45%, transparent 70%);
    animation: floatOrbViolet 15s ease-in-out infinite alternate;
}
@keyframes floatOrbGold {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(120px, 70px) scale(1.18); }
    100% { transform: translate(-60px, 140px) scale(0.92); }
}
@keyframes floatOrbSapphire {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-140px, -90px) scale(1.15); }
    100% { transform: translate(80px, -130px) scale(0.95); }
}
@keyframes floatOrbViolet {
    0% { transform: translate(-50%, -50%) scale(0.9) rotate(0deg); }
    100% { transform: translate(-35%, -60%) scale(1.22) rotate(25deg); }
}

/* HTML5 인터랙티브 모션 캔버스 */
#seoulMotionCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* 본문 컨텐츠가 라이브 배경 위에 선명히 뜨도록 설정 및 반투명 글래스화 */
body > header,
body > main,
body > section,
body > footer,
body > .live-ticker-bar {
    position: relative;
    z-index: 2;
}
.section-block {
    background: rgba(4, 8, 20, 0.52) !important;
    backdrop-filter: blur(3px);
}
.section-bg-alt {
    background: rgba(8, 17, 38, 0.64) !important;
    backdrop-filter: blur(4px);
}
.content-section,
.gu-card,
.post-hero-box {
    background: rgba(11, 22, 45, 0.82) !important;
    backdrop-filter: blur(10px);
}

/* 3. 지루하지 않게 글을 읽는 스크롤 리빌 & 포커스 모션 */
.reveal-item {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 본문 단락(p, li) 읽을 때 마우스오버 및 스크롤 반응 */
.content-section p,
.content-section li,
.aeo-direct-answer p {
    transition: color 0.3s ease, transform 0.3s ease, border-left-color 0.3s ease, padding-left 0.3s ease;
    border-left: 2px solid transparent;
}
.content-section p:hover,
.content-section li:hover {
    color: #ffffff;
    border-left-color: #d4af37;
    padding-left: 10px;
}

/* 핵심 문구 자동 형광펜 언더라인 애니메이션 */
strong.hl-pen,
.content-section strong,
.aeo-direct-answer strong,
.hero-desc strong {
    position: relative;
    color: #f7dc79;
    background-image: linear-gradient(120deg, rgba(212, 175, 55, 0.28) 0%, rgba(56, 189, 248, 0.22) 100%);
    background-repeat: no-repeat;
    background-size: 0% 38%;
    background-position: 0 92%;
    transition: background-size 0.85s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
    padding: 0 2px;
    border-radius: 3px;
}
strong.hl-active {
    background-size: 100% 38% !important;
}
.content-section strong:hover,
.hero-desc strong:hover {
    background-size: 100% 100% !important;
    color: #ffffff;
}

/* 섹션/뱃지 부유(Floating) 및 네온 펄스 효과 */
.section-eyebrow,
.region-pill,
.badge-gold {
    animation: subtleFloat 4s ease-in-out infinite;
}
@keyframes subtleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* 4. 우측 하단 플로팅 라이브 독서 HUD 위젯 */
#seoulReadingHud {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(8, 16, 34, 0.92);
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(212, 175, 55, 0.55);
    border-radius: 999px;
    padding: 9px 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 20px rgba(212, 175, 55, 0.2);
    font-size: 0.8rem;
    color: #f8fafc;
}
.hud-pulse-ring {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    animation: pulseDot 1.4s infinite;
}
#seoulHudPercent {
    color: #f7dc79;
    font-weight: 900;
    min-width: 36px;
}
#seoulHudTopBtn {
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #f7dc79;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}
#seoulHudTopBtn:hover {
    background: #d4af37;
    color: #040814;
}
@media (max-width: 640px) {
    #seoulReadingHud {
        bottom: 14px;
        right: 14px;
        padding: 7px 12px;
        font-size: 0.74rem;
    }
}
