/* 스파링클럽(Sparring Club) 통합 스타일시트
    수정일: 2026-03-07 (9단계 고도화 완료)
*/

/* ... 기존 스타일들 ... */
/* ... 기존 스타일들 ... */
/* 커스텀 배경 스타일 */
body.custom-bg-active {
    background-color: #000;
    background-image: var(--bg-url);
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* 모바일 오류 방지 */
    background-repeat: no-repeat;
}

@media (min-width: 768px) {
    body.custom-bg-active { background-attachment: fixed; }
}

/* 배경 가독성을 위한 어두운 막(40% 불투명도 적용) */
body.custom-bg-active::before {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.80); z-index: -1;
}

/* UI 관리 섹션 스타일 */
.bg-preview { width: 100%; height: 150px; background: #222; border: 2px dashed #444; border-radius: 8px; margin: 10px 0; display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center; }

/* PC/모바일 모드 뷰 전환 스타일 (1080x1920 모바일 가독성 최적화 여백) */
.container { padding: 20px 15px; max-width: 600px; margin: auto; transition: max-width 0.4s ease; }

body.pc-mode .container { 
    max-width: 1100px; /* 너무 넓지 않게 조정 */
    margin: 0 auto;
    padding: 40px 20px;
}        
body.pc-mode .stat-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* 체육관 리스트를 2~3열 그리드로 변경 */
body.pc-mode #gym-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 520px)); /* 최대폭 제한 */
    gap: 25px;
    justify-content: center; /* 중앙 정렬 */
}

/* 선수 매칭 리스트를 2열 그리드로 변경 */
body.pc-mode .tier-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

body.pc-mode #feed-outer-box {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* PC 모드에서 카드의 여백 조정 */
body.pc-mode .card {
    margin-bottom: 0; /* 그리드 갭으로 대체 */
    transition: transform 0.2s ease;
}

body.pc-mode .card:hover {
    transform: translateY(-5px); /* 마우스 올렸을 때 살짝 뜨는 효과 */
}

/* 헤더 가로폭 제한 및 중앙 정렬 */
body.pc-mode header {
    padding: 10px calc((100% - 1100px) / 2 + 20px);
}
/* PC 모드에서 1위 강조 카드는 가로를 꽉 채우도록 설정 */
body.pc-mode .top-rankers {
    grid-column: 1 / -1;
    background: linear-gradient(90deg, rgba(253, 203, 110, 0.15), transparent) !important;
    border: 1px solid var(--gold) !important;
}

.view-toggle-btn { background: #333; color: var(--gold); border: 1px solid var(--gold); padding: 4px 10px; border-radius: 4px; font-size: 0.75rem; cursor: pointer; font-weight: bold; margin-right: 10px; }
.view-toggle-btn:hover { background: var(--gold); color: #000; }

/* 공지사항 슬라이더 */
.slider-wrap { overflow: hidden; position: relative; width: 100%; height: 50px; }
.slider-track { display: flex; transition: transform 0.6s ease-in-out; height: 100%; }
.slider-item { min-width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; font-size: 0.95rem; color: white; text-align: center; }

/* 공지사항 바 자동 숨김을 위한 스타일 */
.slider-wrap.hidden { display: none !important; }

/* 커뮤니티 영상 미디어 슬라이더 스타일 */
.media-slider-wrap { 
    width: 100%; 
    height: 200px; 
    overflow: hidden; 
    position: relative; 
    border-radius: 12px; 
    margin-bottom: 20px; 
    background: #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.media-slider-track { display: flex; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); height: 100%; }
.media-slider-item { 
    min-width: 100%; 
    height: 100%; 
    position: relative; 
    cursor: pointer; 
    background-size: cover; 
    background-position: center; 
}
/* 영상 재생 마크 오버레이 */
.media-slider-item::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(214, 48, 49, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    padding-left: 5px;
    box-sizing: border-box;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    z-index: 2;
}

/* [추가] 커뮤니티 사진 슬라이더용 재생 마크 스타일 */
.photo-play-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: rgba(214, 48, 49, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    padding-left: 2px;
    box-sizing: border-box;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 2;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.media-slider-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 3;
}

:root { --primary-red: #d63031; --dark-bg: #1a1a1a; --card-gray: #2d3436; --text-white: #dfe6e9; --gold: #fdcb6e; --tier1: #b2bec3; --tier2: #74b9ff; --tier3: #a29bfe; --tier4: #ff7675; --tier5: #fdcb6e; }

/* 커뮤니티 상단 미니 사진 슬라이더 스타일 */
.mini-photo-slider {
    width: 100%;
    height: 100px;
    background: #111;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid #333;
}
.photo-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}
.photo-slide {
    min-width: 100px;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-right: 2px solid #000;
    cursor: pointer;
}
.photo-slide:hover {
    filter: brightness(1.2);
}

/* 모든 요소에 box-sizing 적용하여 패딩으로 인한 가로폭 초과(가로 스크롤) 방지 */
* { box-sizing: border-box; }

/* 모바일 텍스트 자동 크기조절 방지, 화면 꽉 채움, 확대 방지 터치액션 적용 */
body { 
    font-family: 'Pretendard', sans-serif; 
    margin: 0; 
    background: var(--dark-bg); 
    color: var(--text-white); 
    padding-bottom: 90px; 
    width: 100vw;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    /* 1080x1920 모바일 해상도 가독성 극대화 및 제스처 줌 원천 차단 */
    font-size: 16px; 
    line-height: 1.6; 
    letter-spacing: -0.3px; 
    word-break: keep-all; 
    touch-action: pan-x pan-y; /* 핀치 줌 방지 및 상하좌우 스크롤만 허용 */
}

.season-banner { background: var(--primary-red); color: white; text-align: center; padding: 12px 8px; font-size: 16px; font-weight: bold; position: sticky; top: 0; z-index: 101; letter-spacing: 0.5px; }

/* 헤더 구조 최적화 (기존 속성 + 새 속성 병합) */
header { 
    background: #000; 
    border-bottom: 2px solid var(--primary-red); 
    position: sticky; 
    top: 35px; 
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px; /* 패딩 감소로 세로 폭 절약 */
    height: 60px;
    box-sizing: border-box; 
}

/* 왼쪽 영역: 타이틀 + 프로필 그룹 */
.header-left { display: flex; align-items: center; gap: 12px; }

header h1 { 
    margin: 0; 
    font-size: 1.1rem; 
    color: var(--primary-red); 
    letter-spacing: 1px;
    white-space: nowrap; 
}

/* 화면이 아주 작은 모바일(400px 이하)을 위한 대응 */
@media screen and (max-width: 400px) {
    header h1 { font-size: 1rem; }
}

/* 가로 공간 확보를 위해 이름 표시 방식 조정 */
.user-mini-profile {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0; /* 프로필 영역이 줄어들지 않게 고정 */
}

.user-mini-profile .name {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--gold);
    max-width: 60px; /* 이름이 너무 길면 잘리도록 설정 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 오른쪽 영역: 아이콘 액션 그룹 */
.header-right { display: flex; align-items: center; gap: 10px; }
.icon-btn { background: none; border: 1px solid #444; color: white; padding: 6px; border-radius: 6px; display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.icon-btn span.btn-label { display: none; }

.auth-btns button { background: none; color: white; border: 1px solid #555; padding: 5px 10px; border-radius: 5px; cursor: pointer; font-size: 0.8rem; margin-left: 5px; }

nav { position: fixed; bottom: 0; width: 100%; background: rgba(10, 10, 10, 0.90); backdrop-filter: blur(10px); display: flex; border-top: 1px solid #333; z-index: 1000; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(0,0,0,0.5); }
nav button { flex: 1; padding: 10px 0; border: none; background: none; color: #888; font-size: 0.75rem; cursor: pointer; transition: all 0.2s ease; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
nav button span.nav-icon { font-size: 1.4rem; margin-bottom: 2px; transition: transform 0.2s ease; }
nav button.active { color: var(--gold); font-weight: bold; background: linear-gradient(to top, rgba(253, 203, 110, 0.15), transparent); border-top: 2px solid var(--gold); transform: translateY(-1px); }
nav button.active span.nav-icon { transform: scale(1.15); color: var(--gold); }

/* 신규: 퀵 플로팅 액션 버튼 (FAB) */
.fab-container { position: fixed; bottom: calc(75px + env(safe-area-inset-bottom)); right: 20px; z-index: 999; }
.fab-btn { width: 50px; height: 50px; border-radius: 50%; background: var(--primary-red); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; border: 2px solid #fff; box-shadow: 0 4px 15px rgba(214, 48, 49, 0.6); cursor: pointer; transition: transform 0.2s; }
.fab-btn:hover { transform: scale(1.1); background: var(--gold); border-color: #000; }

.page { display: none; }
.page.active { display: block; }
.card { background: var(--card-gray); border-radius: 12px; padding: 15px; margin-bottom: 15px; }

/* [수정] 체크박스 제거 및 필터 칩 스타일 */
.feed-filters { display: flex; gap: 8px; margin-bottom: 15px; overflow-x: auto; padding-bottom: 5px; -ms-overflow-style: none; scrollbar-width: none; }
.feed-filters::-webkit-scrollbar { display: none; }
.feed-filters label { background: #222; color: #888; padding: 8px 16px; border-radius: 30px; font-size: 0.8rem; cursor: pointer; border: 1px solid #333; transition: all 0.2s ease; white-space: nowrap; margin: 0; display: flex; align-items: center; }

/* 체크박스 본체는 숨김 */
.feed-filters input[type="checkbox"] { display: none; }

/* 체크되었을 때의 필터 스타일 (고급스러운 골드/레드 포인트) */
.feed-filters input[type="checkbox"]:checked + span { color: var(--gold); }
.feed-filters label:has(input:checked) { background: rgba(214, 48, 49, 0.1); border-color: var(--primary-red); color: white; font-weight: bold; }

/* [수정] 필터 제거 후 피드 영역 디자인 유지 */
#feed-outer-box { 
    background: linear-gradient(145deg, #1e1e1e, #161616); 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    border-radius: 16px; 
    padding: 20px 15px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    position: relative; 
    margin-top: 5px; /* 필터가 사라진 자리에 적절한 간격 추가 */
    max-height: 480px; /* 동시에 최대 3개의 카드만 보이도록 높이 제한 */
    overflow-y: auto;
    -ms-overflow-style: none; /* IE, Edge 스크롤바 숨김 */
    scrollbar-width: none; /* Firefox 스크롤바 숨김 */
}
#feed-outer-box::-webkit-scrollbar {
    display: none; /* Chrome, Safari 스크롤바 숨김 */
}

#feed-container { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    padding-bottom: 5px; 
}
.feed-item { border-left: 3px solid var(--primary-red); padding-left: 10px; margin-bottom: 15px; background: #222; padding: 12px; border-radius: 0 8px 8px 0; font-size: 0.9rem; line-height: 1.4; position: relative;}
.feed-item.clickable { cursor: pointer; transition: all 0.2s ease; }          
.feed-item.clickable:hover { background: #2d2d2d; transform: scale(1.01); }
.feed-time { font-size: 0.75rem; color: #888; display: block; margin-bottom: 5px; }
.feed-media-badge { font-size: 0.7rem; background: #444; padding: 2px 6px; border-radius: 4px; color: var(--gold); margin-left: 5px; vertical-align: middle;}
.d-day-badge { float: right; color: var(--gold); font-weight: bold; font-size: 0.8rem; background: rgba(214, 48, 49, 0.1); padding: 2px 6px; border-radius: 4px; border: 1px solid rgba(253, 203, 110, 0.3); }
.match-badge { position: absolute; top: -5px; right: -5px; background: var(--primary-red); color: white; font-size: 0.65rem; padding: 2px 5px; border-radius: 10px; font-weight: bold; display: none; }

/* CSS 영역에서 이 부분을 찾아 수정하세요 */
.clickable-name { 
    font-weight: bold; 
    color: white; 
    cursor: pointer; 
    text-decoration: none; /* underline 을 none 으로 변경 */
}        
.clickable-name:hover { color: var(--primary-red); }

.tier-info-box { background: #222; border: 1px solid #444; padding: 15px; border-radius: 8px; margin-bottom: 20px; font-size: 0.85rem; line-height: 1.6; color: #bbb; }
.tier-header { padding: 12px; margin-top: 15px; background: #333; border-radius: 8px; font-weight: bold; text-align: center; cursor: pointer; border-left: 4px solid; }
/* 기존 아코디언 방식의 잔재인 display: none 제거 및 플렉스 레이아웃 추가 */
.tier-list { display: flex; flex-direction: column; gap: 12px; padding: 10px 0; }
.top-rankers { background: #111; padding: 10px; border-radius: 8px; margin-bottom: 10px; border: 1px solid #333; }
.rank-1 { display: flex; align-items: center; gap: 15px; border-bottom: 1px dashed #444; padding-bottom: 10px; margin-bottom: 10px; }
.rank-1 .avatar { border: 2px solid var(--gold); }
.player-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px; border-bottom: 1px solid #444; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #555; background-size: cover; background-position: center; background-repeat: no-repeat; flex-shrink: 0; }
.btn-match { background: var(--primary-red); color: white; border: none; padding: 12px 16px; border-radius: 8px; font-size: 0.95rem; cursor: pointer; font-weight: bold; min-width: 90px; transition: transform 0.2s; box-shadow: 0 4px 10px rgba(214, 48, 49, 0.3); }
.btn-match:active { transform: scale(0.95); }

label { display: block; margin: 15px 0 5px; font-size: 0.85rem; color: #ccc; }
input, select, textarea { width: 100%; padding: 12px; background: #333; border: 1px solid #444; border-radius: 8px; color: white; box-sizing: border-box; font-size: 1rem; }
.btn-submit { background: var(--primary-red); color: white; border: none; width: 100%; padding: 15px; border-radius: 8px; font-weight: bold; margin-top: 20px; cursor: pointer; font-size: 1rem; }

/* 🔥 키보드 팝업 시 화면이 위로 자유롭게 올라가도록 스크롤 및 여백 최적화 */
/* 🔥 키보드 팝업 시 화면이 위로 자유롭게 올라가도록 스크롤 및 여백 최적화 */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 3000; justify-content: center; align-items: flex-start; overflow-y: auto; padding: 10vh 0 35vh 0; box-sizing: border-box; }
.modal-content { background: var(--card-gray); padding: 20px; border-radius: 12px; width: 95%; max-width: 420px; position: relative; margin: 0 auto; box-shadow: 0 10px 25px rgba(0,0,0,0.5); flex-shrink: 0; height: max-content; }

/* 🔥 유튜브 뱃지 및 미니 공지사항 스타일 */
.youtube-badge { background: #ff0000; color: white; font-size: 0.65rem; font-weight: bold; padding: 2px 6px; border-radius: 4px; margin-right: 5px; vertical-align: middle; display: inline-block; border: 1px solid #cc0000; }
.mini-notice-item { font-size: 0.85rem; color: #ff7675; font-weight: bold; padding: 8px 10px; border-bottom: 1px dashed #333; display: flex; align-items: center; gap: 8px; cursor: pointer; background: rgba(214, 48, 49, 0.05); margin-bottom: 5px; border-radius: 6px; }
.mini-notice-item span.title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; color: #ff7675; }
/* 🔥 유튜브 뱃지 및 미니 공지사항 스타일 */
.youtube-badge { background: #ff0000; color: white; font-size: 0.65rem; font-weight: bold; padding: 2px 6px; border-radius: 4px; margin-right: 5px; vertical-align: middle; display: inline-block; border: 1px solid #cc0000; }
.mini-notice-item { font-size: 0.85rem; color: #ff7675; font-weight: bold; padding: 8px 10px; border-bottom: 1px dashed #333; display: flex; align-items: center; gap: 8px; cursor: pointer; background: rgba(214, 48, 49, 0.05); margin-bottom: 5px; border-radius: 6px; }
.mini-notice-item span.title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; color: #ff7675; }
.close-btn { position: absolute; top: 15px; right: 20px; cursor: pointer; font-size: 1.5rem; color: #aaa; }

.profile-header { display: flex; gap: 15px; align-items: center; border-bottom: 1px solid #444; padding-bottom: 15px; margin-bottom: 15px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 15px; }
.stat-box { background: #222; padding: 10px; border-radius: 8px; text-align: center; }
.stat-box span { display: block; font-size: 0.7rem; color: #aaa; margin-bottom: 3px; }
.stat-box b { font-size: 1rem; }

.post-item { border-bottom: 1px solid #333; padding: 12px 5px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.post-item:hover { background: #252525; }
.post-title { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-info-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: #888; }
/* 승/패 강조 색상 (네온그린 / 레드) */
.win-label { color: #3498db !important; font-weight: bold; text-shadow: 0 0 8px rgba(52, 152, 219, 0.6); margin-left: 4px; font-size: 0.85rem; }
.loss-label { color: #ff4d4d !important; font-weight: bold; text-shadow: 0 0 8px rgba(255, 77, 77, 0.6); margin-left: 4px; font-size: 0.85rem; }
.draw-label { color: #ffffff !important; font-weight: bold; text-shadow: 0 0 8px rgba(255, 255, 255, 0.4); margin-left: 4px; font-size: 0.85rem; }

/* 커뮤니티 사진 슬라이더 스타일 최적화 */
.photo-slider-wrap { 
    width: 100%; 
    height: 110px; 
    background: #000; 
    border-radius: 12px; 
    margin-bottom: 20px; 
    overflow: hidden; 
    position: relative; 
    border: 1px solid #444;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}
.photo-slider-track { 
    display: flex; 
    height: 100%; 
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); 
}
.photo-slide-item { 
    min-width: 110px; 
    height: 110px; 
    background-size: cover; 
    background-position: center; 
    cursor: pointer;
    border-right: 2px solid #111;
    transition: filter 0.3s;
}
.photo-slide-item:hover {
    filter: brightness(1.3);
}

.post-badge { background: #444; color: var(--gold); padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; margin-right: 5px; }
.vote-btn { flex: 1; padding: 12px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 0.9rem; transition: 0.2s; }
.vote-btn:hover { opacity: 0.8; }

.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 20px; padding-bottom: 10px; }
.pagination button { background: #333; color: #fff; border: 1px solid #444; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
.pagination button.active { background: var(--primary-red); border-color: var(--primary-red); font-weight: bold; }
.pagination button:disabled { opacity: 0.4; cursor: default; }

.search-box { margin-top: 30px; display: flex; gap: 5px; background: #222; padding: 10px; border-radius: 8px; border: 1px solid #444; }
.search-box select { width: auto; padding: 8px; font-size: 0.85rem; background: #333; border: 1px solid #555; color: #fff; }
.search-box input { flex: 1; padding: 8px; font-size: 0.85rem; }
.search-box button { background: #555; color: white; border: none; padding: 0 15px; border-radius: 4px; cursor: pointer; font-size: 0.85rem; }

.login-tabs { display: flex; margin-bottom: 15px; border-bottom: 1px solid #444; }
.login-tabs div { flex: 1; text-align: center; padding: 10px; cursor: pointer; color: #888; font-size: 0.9rem; }
.login-tabs div.active { color: var(--primary-red); border-bottom: 2px solid var(--primary-red); font-weight: bold; }
.login-form { display: none; }
.login-form.active { display: block; }

.cropper-view-box, .cropper-face { border-radius: 50%; }

.switch { position: relative; display: inline-block; width: 50px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #555; transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary-red); }
input:checked + .slider:before { transform: translateX(26px); }

.rich-editor { background: #1e1e1e; color: #fff; min-height: 250px; padding: 15px; border: 2px solid #444; border-radius: 0 0 8px 8px; border-top: none; outline: none; overflow-y: auto; font-size: 1rem; line-height: 1.6; }
.rich-editor:focus { border-color: var(--gold); background: #252525; }
.editor-toolbar input[type="color"] { width: 25px; height: 25px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; }

/* [수정] 피드 아이템 내부 디자인 세분화 */
.timeline-folder { background: rgba(255, 255, 255, 0.03) !important; border-radius: 8px; margin-bottom: 12px; border: 1px solid rgba(255, 255, 255, 0.05) !important; overflow: hidden; transition: transform 0.2s ease; }
.timeline-folder:hover { transform: translateY(-2px); border-color: rgba(214, 48, 49, 0.3) !important; }

.timeline-header { padding: 16px 20px; background: #2d2d2d; display: flex; justify-content: space-between; align-items: center; cursor: pointer; border-radius: 8px 8px 0 0; }
.timeline-header:hover { background: #383838; }
.match-code { color: var(--gold); font-weight: bold; font-size: 0.95rem; margin-right: 10px; }
.timeline-content { display: none; padding: 15px 20px; background: #1a1a1a; border-top: 1px solid #333; border-radius: 0 0 8px 8px; }        .timeline-item { position: relative; padding-left: 25px; margin-bottom: 12px; font-size: 0.85rem; border-left: 3px solid #444; line-height: 1.5; }
.timeline-item:last-child { border-left: 3px solid var(--primary-red); }
.timeline-item span { font-family: 'Pretendard', sans-serif; letter-spacing: 0.5px; }
.timeline-item::before { content: ''; position: absolute; left: -4px; top: 5px; width: 7px; height: 7px; background: var(--primary-red); border-radius: 50%; }
.status-badge { font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; font-weight: bold; }

/* 체육관 랭킹 포디움 스타일 */
.ranking-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 30px;
    padding: 20px 0;
}

.rank-item {
    background: #222;
    border-radius: 12px;
    text-align: center;
    padding: 15px 10px;
    flex: 1;
    position: relative;
    border: 1px solid #333;
    max-width: 150px;
}

/* 1,2,3위 메달 및 테두리 효과 */
.rank-item.gold { border-color: var(--gold); height: 180px; z-index: 2; box-shadow: 0 0 15px rgba(253, 203, 110, 0.2); }
.rank-item.silver { border-color: #bdc3c7; height: 150px; }
.rank-item.bronze { border-color: #cd7f32; height: 130px; }

.rank-medal { font-size: 1.5rem; display: block; margin-bottom: 5px; }
.rank-gym-name { font-weight: bold; font-size: 0.9rem; color: white; display: block; margin-bottom: 5px; }
.rank-gym-pt { color: var(--gold); font-size: 0.85rem; font-weight: bold; }

/* 지역 선택 셀렉트박스 */
#gym-region-filter {
    width: 100%;
    padding: 12px;
    background: #111;
    border: 1px solid var(--primary-red);
    color: white;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1rem;
    outline: none;
}

/* PC 모드 그리드 조정 */
body.pc-mode .ranking-podium { gap: 30px; }
body.pc-mode .rank-item { max-width: 250px; }

/* 지역 선택 스위치 그룹 */
.region-filter-wrap { 
    margin-bottom: 25px; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.region-group { 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; 
    justify-content: center; 
}

/* 스위치 버튼 기본 디자인 */
.region-btn {
    background: #1a1a1a; 
    border: 1px solid #444; 
    color: #888; 
    padding: 7px 14px; 
    border-radius: 20px;
    font-size: 0.8rem; 
    cursor: pointer; 
    transition: all 0.2s ease;
    min-width: 60px;
    text-align: center;
}

/* 눌려졌을 때 색이 밝게 들어오는 효과 */
.region-btn.active { 
    background: var(--primary-red); 
    color: white; 
    border-color: var(--primary-red); 
    font-weight: bold; 
    box-shadow: 0 0 12px rgba(214, 48, 49, 0.4); 
    transform: scale(1.05);
}

.region-btn:hover:not(.active) {
    background: #333;
    color: #ccc;
}

/* 🔥 인기 스파링 섹션 스타일 */
.popular-sparring-section { margin-bottom: 25px; }
.popular-sparring-wrap { 
    display: flex; 
    gap: 12px; 
    overflow-x: auto; 
    padding: 5px 2px 15px 2px; 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}
.popular-sparring-wrap::-webkit-scrollbar { display: none; }

.popular-card { 
    min-width: 160px; 
    max-width: 160px;
    background: #1a1a1a; 
    border-radius: 10px; 
    overflow: hidden; 
    border: 1px solid #333; 
    position: relative;
    transition: transform 0.2s;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.popular-card:hover { transform: translateY(-5px); border-color: var(--gold); }

.popular-rank-badge {
    position: absolute; top: 5px; left: 5px; 
    background: rgba(214, 48, 49, 0.9); color: white; 
    font-size: 0.7rem; font-weight: bold; padding: 2px 6px; 
    border-radius: 4px; z-index: 2;
}

.popular-thumb { 
    width: 100%; height: 90px; 
    background-size: cover; background-position: center; 
    position: relative; display: flex; align-items: center; justify-content: center;
}
.popular-thumb::after {
    content: '▶'; position: absolute; color: white; font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.popular-info { padding: 10px; text-align: center; }
.popular-info .pop-title { 
    display: block; font-size: 0.7rem; color: var(--gold); 
    font-weight: bold; margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.popular-info .pop-names { 
    display: block; font-size: 0.8rem; color: #fff; font-weight: bold;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.popular-like-count {
    display: block; font-size: 0.65rem; color: #ff7675; margin-top: 5px;
}

/* 좋아요 버튼 스타일 */
.like-btn-wrap { text-align: center; margin: 15px 0; }
.like-btn {
    background: #333; color: #fff; border: 1px solid #444; 
    padding: 10px 25px; border-radius: 30px; cursor: pointer;
    font-weight: bold; font-size: 0.9rem; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 8px;
}
.like-btn.active {
    background: rgba(214, 48, 49, 0.1); border-color: var(--primary-red); color: var(--primary-red);
}

/* [신규] 인스타 스타일 스토리 섹션 */
.story-section {
    margin: 15px 0;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 2px 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
}
.story-section::-webkit-scrollbar { display: none; }

.story-circle-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    width: 70px;
}
.story-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--primary-red);
    padding: 2px;
    cursor: pointer;
    position: relative;
    background: #000;
    transition: transform 0.2s;
}
.story-circle:active { transform: scale(0.9); }
.story-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* 🔥 [수정] 사진이 원 안에 꽉 차지 않더라도 잘리지 않고 전체가 보이도록 설정 */
    object-fit: contain; 
    background: #000; /* 여백 부분은 검정색으로 처리 */
}
.story-add-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px dashed #444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #666;
    cursor: pointer;
    background: #111;
}
.story-circle-label {
    font-size: 0.7rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
    font-weight: 500;
}

/* 스토리 상세 뷰어 */
.story-viewer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    z-index: 6000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.story-viewer-content {
    width: 100%;
    max-width: 450px;
    height: 100%;
    position: relative;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}
.story-progress-bar {
    position: absolute;
    top: 15px; left: 10px; right: 10px;
    display: flex; gap: 4px;
    z-index: 6005;
}
.progress-segment {
    height: 2px; background: rgba(255,255,255,0.2); flex: 1; border-radius: 2px; overflow: hidden;
}
.progress-segment .fill {
    height: 100%; background: white; width: 0%;
}
.progress-segment.active .fill { width: 100%; }
.progress-segment.current .fill { width: 0%; } /* 애니메이션은 JS에서 제어 */

.story-nav-btn {
    position: absolute; top: 0; width: 40%; height: 100%; z-index: 6002; -webkit-tap-highlight-color: transparent;
}
.story-nav-prev { left: 0; }
.story-nav-next { right: 0; }

.story-top-actions {
    position: absolute; top: 25px; right: 15px;
    display: flex; gap: 15px; z-index: 6010; align-items: center;
}
.story-action-icon {
    color: white; font-size: 1.4rem; cursor: pointer; text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
.story-close {
    position: absolute; top: 25px; left: 20px;
    font-size: 1.8rem; color: white; cursor: pointer; z-index: 6010;
}

.story-views-info {
    position: absolute; bottom: 40px; left: 20px;
    display: flex; align-items: center; gap: 8px;
    color: white; font-size: 0.9rem; cursor: pointer; z-index: 6015;
    background: rgba(0,0,0,0.6); padding: 8px 15px; border-radius: 25px;
    backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1);
}
.story-views-info:hover { background: rgba(0,0,0,0.9); }

.viewer-list-popover {
    position: absolute; bottom: 90px; left: 20px;
    background: rgba(255, 255, 255, 0.95); color: #000;
    padding: 15px; border-radius: 16px; width: 220px;
    max-height: 250px; overflow-y: auto; display: none; z-index: 6020;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}
.viewer-item {
    padding: 10px 0; border-bottom: 1px solid #eee;
    font-size: 0.9rem; font-weight: bold; display: flex; align-items: center; gap: 8px;
}
.viewer-item:last-child { border-bottom: none; }
.viewer-item::before { content: '🥊'; font-size: 0.8rem; }

/* [신규] 프로필 상단 말풍선 (인사말) */
.speech-bubble {
    position: relative; background: rgba(253, 203, 110, 0.15); color: var(--gold);
    border: 1px solid var(--gold); border-radius: 12px; padding: 10px; margin-bottom: 15px;
    font-size: 0.85rem; font-weight: bold; text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.speech-bubble::after {
    content: ''; position: absolute; bottom: -8px; left: 35px;
    border-width: 8px 8px 0; border-style: solid; border-color: var(--gold) transparent; display: block; width: 0;
}

/* [신규] 판정 신뢰도 뱃지 */
.trust-badge {
    font-size: 0.75rem; padding: 2px 6px; border-radius: 4px; font-weight: bold; margin-left: 8px; vertical-align: middle; display: inline-block;
}
.trust-high { background: rgba(116, 185, 255, 0.2); color: #74b9ff; border: 1px solid #74b9ff; }
.trust-mid { background: rgba(253, 203, 110, 0.2); color: var(--gold); border: 1px solid var(--gold); }
.trust-low { background: rgba(214, 48, 49, 0.2); color: #ff7675; border: 1px solid #ff7675; }

/* [신규] 거절 이력 아코디언 UI */
.reject-accordion-btn {
    background: #222; color: #ff7675; border: 1px solid #444; width: 100%; text-align: left;
    padding: 12px 15px; border-radius: 8px; font-size: 0.9rem; cursor: pointer; display: flex; justify-content: space-between; margin-bottom: 5px; font-weight: bold;
}
.reject-accordion-content {
    background: #1a1a1a; border-left: 3px solid #ff7675; padding: 10px 15px; font-size: 0.85rem;
    display: none; border-radius: 0 0 8px 8px; margin-top: -8px; margin-bottom: 15px; border-bottom: 1px solid #333; border-right: 1px solid #333;
}
.reject-item { border-bottom: 1px dashed #333; padding: 10px 0; color: #ccc; }
.reject-item:last-child { border-bottom: none; }
