/**
 * 파일경로: /assets/css/ll-feed.css
 * 파일역할: Home Feed Styling (Ver 5.0 - Silver Friendly & Modal UI)
 * * [기존 파일 전체 교체]
 */

/* ------------------------------------------------------- */
/* 1. Unified Header (Linker 스타일 공통 로고바) */
/* ------------------------------------------------------- */
/* ll-header CSS는 ll-header.css에서 정의됨 */
/* 뱃지 & 아이콘 공통 스타일 */
.ll-btn-icon {
    background: none;
    border: none;
    font-size: 24px;
    color: #2d3436;
    cursor: pointer;
    padding: 4px;
    position: relative;
}

.ll-badge-dot {
    position: absolute;
    top: 2px; right: 2px;
    width: 6px; height: 6px;
    background: #eb3b5a;
    border-radius: 50%;
}

/* Filter Scroll Area */
.ll-filter-scroll-area {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 12px 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ll-filter-scroll-area::-webkit-scrollbar { display: none; }

.ll-filter-chip {
    flex: 0 0 auto;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #eee;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #636e72;
    transition: all 0.2s;
    cursor: pointer;
}

.ll-filter-chip.active {
    background: #2d3436;
    color: #fff;
    border-color: #2d3436;
    box-shadow: 0 4px 10px rgba(45, 52, 54, 0.2);
}

/* ------------------------------------------------------- */
/* 2. Write Trigger (글쓰기 유도 카드) */
/* ------------------------------------------------------- */
.ll-write-trigger-area {
    padding: 10px 12px 4px;
}

.ll-write-trigger-card {
    background: #fff;
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid #f5f6fa;
}
.ll-write-trigger-card:active { transform: scale(0.98); }

.ll-profile-avatar-sm {
    width: 36px; height: 36px;
    background: #dfe6e9;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #636e72;
    overflow: hidden;
}
.ll-profile-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }

.ll-placeholder-text {
    flex: 1;
    font-size: 14px;
    color: #b2bec3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ll-btn-icon-sm {
    background: none; border: none; color: #4b7bec; font-size: 20px; padding: 0;
}

/* ------------------------------------------------------- */
/* 3. Feed Card Design (인스타 + 레딧 스타일) */
/* ------------------------------------------------------- */
.ll-feed-list {
    padding: 6px 10px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ll-feed-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    border: 1px solid #eef1f6;
    transition: box-shadow 0.2s;
}

/* Context Header */
.ll-card-head {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ll-head-info { flex: 1; display: flex; flex-direction: column; }
.ll-author-row { display: flex; align-items: center; gap: 6px; }
.ll-author-name { font-size: 15px; font-weight: 700; color: #2d3436; }
.ll-verified-badge { font-size: 12px; color: #20bf6b; } /* 인증 뱃지 */

.ll-context-row { font-size: 12px; color: #4b7bec; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.ll-context-dot { width: 6px; height: 6px; background: #20bf6b; border-radius: 50%; display: inline-block; }
.ll-time { font-size: 12px; color: #b2bec3; }

/* Content Body */
.ll-card-content {
    padding: 0 14px 12px;
    cursor: pointer;
}
.ll-post-title { font-size: 17px; font-weight: 700; margin: 0 0 8px 0; line-height: 1.4; color: #2d3436; }
.ll-post-text { font-size: 15px; line-height: 1.6; color: #636e72; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Media (Full Width) */
.ll-card-media {
    width: 100%;
    /*height: 250px; 제거: 이미지 비율 유지 또는 자동 높이 */
    aspect-ratio: 16 / 9; /* 기본 비율 */
    background: #f5f6fa;
    margin-bottom: 15px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    cursor: pointer;
}
.ll-card-media img { width: 100%; height: 100%; object-fit: cover; }
.ll-card-media.youtube { background: #000; }
.ll-youtube-embed { width: 100%; height: 100%; border: none; }

/* Action Bar */
.ll-card-actions {
    padding: 10px 14px;
    border-top: 1px solid #f5f6fa;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative; /* Reaction Menu Positioning */
}

.ll-action-left { display: flex; gap: 20px; }
.ll-act-btn {
    background: none; border: none;
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; color: #636e72;
    cursor: pointer; padding: 0;
    transition: color 0.2s;
}
.ll-act-btn:active { transform: scale(0.95); }
.ll-act-icon { font-size: 22px; }

/* Coin Button (Highlighted) */
.ll-btn-coin-gift {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: flex; align-items: center; gap: 6px;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.3);
    cursor: pointer;
}
.ll-btn-coin-gift:active { transform: scale(0.96); }

/* Reaction Popup Menu (Hidden by default) */
.ll-reaction-menu {
    position: absolute;
    bottom: 50px; left: 10px;
    background: #fff;
    border-radius: 50px;
    padding: 8px 12px;
    display: flex; gap: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}
.ll-reaction-chip { font-size: 24px; cursor: pointer; transition: transform 0.2s; }
.ll-reaction-chip:hover { transform: scale(1.3); }

@keyframes popUp {
    from { opacity: 0; transform: translateY(10px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ------------------------------------------------------- */
/* 4. Full Page Modal (Slide Up) */
/* ------------------------------------------------------- */
.ll-full-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #fff;
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}
.ll-full-modal.is-open { transform: translateY(0); }

.ll-modal-header-bar {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    background: #fff;
    flex-shrink: 0;
}
.ll-modal-title { font-size: 17px; font-weight: 700; color: #2d3436; }
.ll-btn-close-modal { background: none; border: none; font-size: 24px; cursor: pointer; padding: 5px; color: #636e72; }
.ll-btn-text-primary { background: none; border: none; color: #4b7bec; font-size: 16px; font-weight: 700; cursor: pointer; }

/* Scroll Areas */
.ll-detail-scroll-area,
.ll-write-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 120px; /* 하단 고정바 공간 + 여유 */
    -webkit-overflow-scrolling: touch;
}

/* ------------------------------------------------------- */
/* 5. Write Modal Styles */
/* ------------------------------------------------------- */
/* Category Chips */
.ll-write-chips-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.ll-choice-chip {
    display: inline-block;
    position: relative;
}
.ll-choice-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.ll-choice-chip input + span { /* 라벨 텍스트가 없어서 직접 스타일링 필요 시 구조 변경 권장 */ }
.ll-choice-chip {
    padding: 8px 16px;
    background: #f5f6fa;
    border-radius: 20px;
    font-size: 14px;
    color: #636e72;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.ll-choice-chip:has(input:checked) {
    background: #e5edff;
    color: #4b7bec;
    border-color: #4b7bec;
}

.ll-write-textarea {
    width: 100%;
    height: 150px;
    border: none;
    resize: none;
    font-size: 16px;
    line-height: 1.6;
    outline: none;
    margin-bottom: 20px;
}

/* Big Mic Trigger */
.ll-voice-mode-trigger {
    width: 100%;
    padding: 20px;
    background: #f8f9fa;
    border: 2px dashed #dcdde1;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.ll-voice-mode-trigger:active { background: #ffeaa7; border-color: #fdcb6e; }

.ll-big-mic-icon { font-size: 40px; margin-bottom: 10px; color: #636e72; }
.ll-voice-label { font-size: 16px; font-weight: 700; color: #2d3436; }
.ll-voice-sub { font-size: 13px; color: #999; margin-top: 4px; }

/* Attach Buttons */
.ll-attach-area { display: flex; gap: 10px; }
.ll-btn-attach {
    flex: 1;
    padding: 12px;
    background: #fff;
    border: 1px solid #dfe6e9;
    border-radius: 12px;
    font-size: 14px;
    color: #636e72;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    cursor: pointer;
}

/* Checkbox Options */
.ll-write-options { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.ll-checkbox-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #2d3436; cursor: pointer; }
.ll-checkbox-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: #4b7bec; }

/* Voice Recording Panel (Slide Up) */
.ll-voice-recording-panel {
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 320px;
    background: #fff;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    box-shadow: 0 -10px 60px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.ll-voice-recording-panel.active { transform: translateY(0); }

.ll-big-mic-btn {
    width: 90px; height: 90px;
    border-radius: 50%;
    background: #ff4757;
    color: #fff;
    font-size: 40px;
    border: none;
    display: flex; align-items: center; justify-content: center;
    animation: heartbeat 1.5s infinite;
    margin-bottom: 20px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 71, 87, 0.3);
}
@keyframes heartbeat {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 20px rgba(255, 71, 87, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}
#ll-voice-status-text { font-size: 18px; font-weight: 700; color: #2d3436; margin: 0; }

/* ------------------------------------------------------- */
/* 6. Detail Modal Styles */
/* ------------------------------------------------------- */
.ll-tts-floater {
    position: absolute;
    bottom: 90px; right: 20px;
    z-index: 1500;
}
.ll-btn-tts-play {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: #2d3436;
    color: #fff;
    border: none;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.ll-btn-tts-play:active { transform: scale(0.9); }
.ll-btn-tts-play.playing { background: #4b7bec; animation: pulse 2s infinite; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(75, 123, 236, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(75, 123, 236, 0); }
    100% { box-shadow: 0 0 0 0 rgba(75, 123, 236, 0); }
}

/* Fixed Bottom Comment Bar */
.ll-fixed-comment-bar {
    padding: 10px 16px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: calc(env(safe-area-inset-bottom) + 10px);
    flex-shrink: 0;
}

.ll-input-wrapper {
    flex: 1;
    background: #f1f2f6;
    border-radius: 24px;
    padding: 6px 6px 6px 15px;
    display: flex;
    align-items: center;
}

#ll-detail-comment-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    color: #2d3436;
}

#ll-detail-comment-submit {
    background: #4b7bec;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
#ll-detail-comment-submit:disabled { background: #bdc3c7; cursor: default; }

.ll-btn-gift-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: #fff9db;
    border: 1px solid #f1c40f;
    font-size: 24px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(241, 196, 15, 0.2);
}

/* ------------------------------------------------------- */
/* 7. Viral Share Card (Canvas Render Target) */
/* ------------------------------------------------------- */
.ll-viral-card {
    background: linear-gradient(135deg, #ffffff 0%, #f5f6fa 100%);
    padding: 30px;
    border-radius: 20px;
    color: #333;
    text-align: left;
    position: relative;
    overflow: hidden;
    border: 1px solid #eee;
}
.ll-viral-logo { font-weight: 900; color: #4b7bec; margin-bottom: 15px; letter-spacing: -1px; font-size: 18px; }
.ll-viral-title { font-size: 22px; font-weight: 800; line-height: 1.3; margin-bottom: 12px; color: #2d3436; }
.ll-viral-summary { font-size: 15px; line-height: 1.6; color: #636e72; margin-bottom: 30px; }
.ll-viral-footer { display: flex; justify-content: space-between; align-items: center; border-top: 2px solid #2d3436; padding-top: 15px; }
.ll-viral-badge { font-size: 12px; font-weight: 700; background: #20bf6b; color: #fff; padding: 6px 10px; border-radius: 6px; }
.ll-viral-qr { font-size: 12px; color: #999; text-align: right; font-weight: 600; }

/* ------------------------------------------------------- */
/* 8. Shortcut Panel (바로가기 패널) */
/* ------------------------------------------------------- */
.ll-shortcut-panel {
    display: flex;
    gap: 6px;
    padding: 0 10px 12px;
    overflow-x: auto;
    scrollbar-width: none;
}
.ll-shortcut-panel::-webkit-scrollbar { display: none; }

.ll-shortcut-btn {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 6px;
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.ll-shortcut-btn:active {
    transform: scale(0.95);
    background: #f0f4ff;
    border-color: #4b7bec;
}
.ll-shortcut-icon { font-size: 22px; line-height: 1; }
.ll-shortcut-label { font-size: 11px; font-weight: 600; color: #636e72; white-space: nowrap; }

/* Loading Skeleton */
.ll-feed-skeleton { padding: 20px; }
.ll-sk-card {
    height: 250px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 16px;
    margin-bottom: 20px;
}
@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}