@charset "utf-8";

/* ========================================
   Timeline Streaming UI
   - 타임라인 패턴 (세로 라인 + 점)
   - Korean labels (왼쪽), Content (오른쪽)
   - 우측 네비게이터
   ======================================== */

/* 오버레이 (fixed 레이어) */
.stream_overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.98) 0%, rgba(5, 5, 10, 0.99) 100%);
    z-index: 1000;
    display: flex;
    overflow: hidden;
}

/* 메인 컨테이너 (스크롤 영역) */
.stream_container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 48px 80px 120px 40px;
    overflow-y: hidden;
    overflow-x: hidden;
    max-width: 960px;
    margin: 0 auto;
}

/* 스크롤바 스타일 */
.stream_container::-webkit-scrollbar {
    width: 8px;
}

.stream_container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.stream_container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.stream_container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

/* ========================================
   헤더 & 완료 메시지
   ======================================== */
.stream_header_message {
    font-size: 15px;
    color: #888;
    margin-bottom: 56px;
    padding-left: 4px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stream_header_message.visible {
    opacity: 1;
    transform: translateY(0);
}

.stream_completion_message {
    margin-top: 48px;
    padding-left: 4px;
    font-size: 15px;
    color: #888;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.stream_completion_message.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   타임라인 구조
   ======================================== */
.stream_timeline {
    position: relative;
    padding-left: 140px;
}

/* 세로 라인 (성장하는) */
.stream_timeline_line {
    position: absolute;
    left: 130px;
    top: 0;
    width: 1px;
    height: 0;
    background: #1e1e2e;
    transition: height 0.6s ease;
}

/* 타임라인 아이템 */
.stream_timeline_item {
    position: relative;
    display: flex;
    align-items: flex-start;
    min-height: 60px;
    padding-bottom: 12px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stream_timeline_item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   카테고리 라벨 (라인 왼쪽)
   ======================================== */
.stream_category_label {
    position: absolute;
    right: calc(100% + 28px);
    top: 1px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: color 0.4s ease;
}

.stream_timeline_item.active .stream_category_label {
    color: #ffffff;
}

.stream_timeline_item.done .stream_category_label {
    color: #3a3a4a;
}

/* ========================================
   점 (Dot)
   ======================================== */
.stream_dot_wrapper {
    position: absolute;
    left: -16px;
    top: 2px;
    width: 13px;
    height: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.stream_dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1e1e2e;
    border: 1.5px solid #2a2a3a;
    transition: all 0.4s ease;
    transform: scale(0);
}

.stream_timeline_item.visible .stream_dot {
    transform: scale(1);
}

.stream_timeline_item.active .stream_dot {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
}

/* 펄스 링 애니메이션 (active 상태) */
.stream_timeline_item.active .stream_dot_wrapper::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: pulse-ring 2s ease-out infinite;
}

.stream_timeline_item.done .stream_dot {
    background: #3a3a4a;
    border-color: #3a3a4a;
    box-shadow: none;
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ========================================
   콘텐츠 영역 (라인 오른쪽)
   ======================================== */
.stream_content_area {
    flex: 1;
    padding: 0 0 28px 20px;
    min-width: 0;
}

.stream_content_card {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}

.stream_timeline_item.active .stream_content_card,
.stream_timeline_item.done .stream_content_card {
    opacity: 1;
    transform: translateY(0);
}

.stream_timeline_item.done .stream_content_card {
    opacity: 0.4;
}

/* 텍스트 타입 콘텐츠 */
.stream_content_body.text {
    font-size: 14px;
    line-height: 1.8;
    color: #999;
    word-break: keep-all;
}

.stream_timeline_item.active .stream_content_body.text {
    color: #c0c0c0;
}

/* 코드 타입 콘텐츠 */
.stream_content_body.code {
    background: #111118;
    border: 1px solid #1e1e2e;
    border-radius: 8px;
    padding: 16px 18px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12.5px;
    line-height: 1.9;
    color: #777;
    max-height: 180px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #222 transparent;
}

.stream_content_body.code::-webkit-scrollbar {
    width: 4px;
}

.stream_content_body.code::-webkit-scrollbar-track {
    background: transparent;
}

.stream_content_body.code::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 4px;
}

.stream_timeline_item.active .stream_content_body.code {
    color: #aaa;
    border-color: #2a2a3e;
}

.stream_timeline_item.done .stream_content_body.code {
    border-color: #161620;
}

/* ========================================
   스트리밍 커서
   ======================================== */
.stream_cursor {
    display: inline-block;
    width: 2px;
    height: 14px;
    background: #ffffff;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.7s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ========================================
   우측 네비게이터
   ======================================== */
.stream_indicator {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    z-index: 1001;
}

.stream_indicator_dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.stream_indicator_dot:hover {
    background: rgba(255, 255, 255, 0.3);
}

.stream_indicator_dot.active {
    background: rgba(255, 255, 255, 0.4);
}

.stream_indicator_dot.current {
    width: 10px;
    height: 24px;
    border-radius: 5px;
    background: #6495ff;
    box-shadow: 0 0 12px rgba(100, 149, 255, 0.5);
}

.stream_indicator_dot.done {
    background: #4cd964;
}

/* 진행 카운터 */
.stream_progress {
    position: fixed;
    right: 32px;
    bottom: 32px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    z-index: 1001;
}

/* ========================================
   Syntax Highlighting
   ======================================== */
.syntax-keyword { color: #c792ea; }
.syntax-string { color: #c3e88d; }
.syntax-number { color: #f78c6c; }
.syntax-comment { color: rgba(255, 255, 255, 0.3); font-style: italic; }
.syntax-function { color: #82aaff; }
.syntax-tag { color: #f07178; }
.syntax-attr-name { color: #ffcb6b; }
.syntax-attr-value { color: #c3e88d; }
.syntax-selector { color: #c792ea; }
.syntax-css-property { color: #82aaff; }
.syntax-css-value { color: #f78c6c; }
.syntax-json-key { color: #f07178; }

/* ========================================
   반응형
   ======================================== */
@media (max-width: 1024px) {
    .stream_container {
        padding: 40px 60px 100px 30px;
    }

    .stream_timeline {
        padding-left: 120px;
    }

    .stream_timeline_line {
        left: 110px;
    }
}

@media (max-width: 768px) {
    .stream_container {
        padding: 32px 50px 80px 20px;
    }

    .stream_header_message {
        font-size: 14px;
        margin-bottom: 40px;
    }

    .stream_timeline {
        padding-left: 28px;
    }

    .stream_timeline_line {
        left: 18px;
    }

    /* 모바일에서 라벨은 콘텐츠 위로 이동 */
    .stream_category_label {
        position: relative;
        right: auto;
        top: auto;
        white-space: normal;
        font-size: 12px;
        margin-bottom: 8px;
        display: block;
    }

    .stream_dot_wrapper {
        left: -34px;
        top: 3px;
    }

    .stream_content_area {
        padding: 0 0 24px 0;
    }

    .stream_content_body.text {
        font-size: 13px;
    }

    .stream_content_body.code {
        font-size: 11.5px;
        padding: 12px 14px;
        max-height: 150px;
    }

    .stream_completion_message {
        font-size: 14px;
    }

    .stream_indicator {
        right: 16px;
        gap: 8px;
        padding: 12px 6px;
    }

    .stream_indicator_dot {
        width: 8px;
        height: 8px;
    }

    .stream_indicator_dot.current {
        width: 8px;
        height: 20px;
    }

    .stream_progress {
        right: 16px;
        bottom: 16px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .stream_container {
        padding: 24px 40px 60px 16px;
    }

    .stream_indicator {
        right: 10px;
        padding: 10px 5px;
        gap: 6px;
    }

    .stream_progress {
        right: 10px;
        bottom: 12px;
        padding: 8px 12px;
        font-size: 10px;
    }
}
