/* 기존 설정 유지 */
:root { --primary-blue: #2563eb; --bg-white: #f8fafc; --text-main: #1e293b; --text-muted: #64748b; --border-color: #e2e8f0; --card-bg: #ffffff; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--bg-white); color: var(--text-main); font-family: 'Pretendard', sans-serif; line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
/* Navbar */
.navbar { background: #fff; border-bottom: 1px solid var(--border-color); height: 70px; position: sticky; top: 0; z-index: 100; }
.nav-content { display: flex; align-items: center; justify-content: space-between; height: 100%; position: relative; } /* position: relative 추가 */

/* 로고 영역 (너비 고정) */
.logo { font-size: 1.2rem; font-weight: 900; color: var(--primary-blue); letter-spacing: -1px; width: 250px; }
.logo span { color: var(--text-muted); font-weight: 400; }

/* 🌟 토글 스위치 (화면 정중앙에 완벽 고정) */
.view-toggle { position: absolute; left: 50%; transform: translateX(-50%); display: flex; background: #f1f5f9; border-radius: 30px; padding: 4px; border: 1px solid var(--border-color); }
.view-toggle input { display: none; }
.view-toggle label { position: relative; z-index: 2; padding: 8px 20px; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: 0.3s; }
.view-toggle label svg { width: 16px; height: 16px; } /* 아이콘 크기 고정 */
.view-toggle input:checked + label { color: #fff; }
.toggle-slider { position: absolute; top: 4px; left: 4px; bottom: 4px; width: calc(50% - 4px); background: var(--primary-blue); border-radius: 25px; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3); }
#mode-record:checked ~ .toggle-slider { transform: translateX(100%); }

/* 🔍 검색창 (아이콘 가출 해결 & 우측 고정) */
.search-bar { position: relative; width: 250px; display: flex; justify-content: flex-end; }
.search-bar svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 18px; height: 18px; pointer-events: none; } /* i -> svg로 변경 */
.search-bar input { width: 100%; padding: 10px 15px 10px 38px; border: 1px solid var(--border-color); border-radius: 8px; background: #f1f5f9; outline: none; font-size: 0.9rem; transition: border-color 0.2s; }
.search-bar input:focus { border-color: var(--primary-blue); background: #fff; }

/* 멤버 필터 */
.filter-section { margin: 40px 0 20px; }
.filter-label { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 12px; display: flex; align-items: center; gap: 5px; }
.member-tags { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tag { display: flex; align-items: center; gap: 5px; padding: 8px 20px; border-radius: 25px; border: 1px solid var(--border-color); background: #fff; cursor: pointer; transition: 0.2s; font-size: 0.9rem; font-weight: 500;}
.tag:hover { background: #f1f5f9; }
.tag.active { background: var(--primary-blue); color: #fff; border-color: var(--primary-blue); box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2); }

/* STAGE 뷰 (영상 그리드) */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; margin-bottom: 50px; }
.video-card { background: var(--card-bg); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); cursor: pointer; transition: transform 0.3s; }
.video-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.thumbnail { width: 100%; aspect-ratio: 16/9; background: #e2e8f0; object-fit: cover; }
.card-body { padding: 18px; }
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; line-height: 1.4; color: #0f172a;}
.card-info { font-size: 0.85rem; color: var(--text-muted); display: flex; justify-content: space-between; align-items: center;}

/* 🌟 RECORD 뷰 (타임라인 다이어리) */
.timeline-container { position: relative; max-width: 800px; margin: 0 auto 50px; padding-left: 30px; border-left: 3px solid #cbd5e1; }
.timeline-item { position: relative; margin-bottom: 30px; background: #fff; border: 1px solid var(--border-color); border-radius: 12px; padding: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); transition: 0.2s; }
.timeline-item:hover { border-color: #94a3b8; transform: translateX(5px); }
/* 타임라인 동그라미 */
.timeline-item::before { content: ''; position: absolute; left: -39px; top: 24px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary-blue); border: 3px solid var(--bg-white); box-shadow: 0 0 0 1px #cbd5e1; }
.timeline-date { font-size: 0.85rem; font-weight: 800; color: var(--primary-blue); margin-bottom: 5px; letter-spacing: 1px;}
.timeline-title { font-size: 1.2rem; font-weight: 700; color: #0f172a; margin-bottom: 15px; }
.timeline-audio { width: 100%; height: 40px; outline: none; margin-bottom: 10px; }
.timeline-audio::-webkit-media-controls-enclosure { background-color: #f1f5f9; }

/* 모달 기본 (STAGE용) */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal.active { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(8px); }
.modal-content { position: relative; background: #fff; width: 90%; max-width: 1000px; border-radius: 20px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }
.modal-close { position: absolute; top: 20px; right: 20px; background: rgba(0,0,0,0.5); border: none; color: #fff; cursor: pointer; z-index: 10; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.2s;}
.modal-close:hover { background: rgba(0,0,0,0.8); }
.video-container { width: 100%; aspect-ratio: 16/9; background: #000; }
.video-info { padding: 30px; }
.video-info h2 { font-size: 1.5rem; color: #0f172a; margin-bottom: 10px;}
.video-meta { font-size: 0.95rem; color: var(--text-muted); display: flex; gap: 20px; font-weight: 500;}

/* 관리자 페이지 링크 */
.admin-entry-link { position: fixed; bottom: 20px; right: 20px; width: 50px; height: 50px; background: var(--text-main); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: 0.2s; font-size: 0; }
.admin-entry-link i { width: 24px; height: 24px; }
.admin-entry-link:hover { transform: scale(1.1); background: #000; }