/* TopGap.gg 스타일시트 */

/* 색상 변수 정의 */
:root {
    --bg-win-dark: #1a233a;   /* 진한 파랑 (배경) */
    --bg-loss-dark: #3a1a1a;  /* 진한 빨강 (배경) */
    --bg-draw-dark: #2a2a2a;  /* 회색 (배경) */
    
    --circle-win-light: #6495ED; /* 연한 파랑 (원) - 가독성 좋게 */
    --circle-loss-light: #FF6B6B; /* 연한 빨강 (원) - 가독성 좋게 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* 5. html, body 체크 */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important; /* 가로 스크롤 방지 */
    overflow-y: visible !important; /* 세로 스크롤은 무조건 허용 */
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important; /* body 패딩 제거 (dashboard 패딩으로 대체) */
    min-width: auto !important;
    overflow-x: hidden !important; /* 가로 스크롤 강제 방지 */
}

.container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important; /* 중앙 정렬 제거 */
    padding: 0 !important; /* 패딩 완전 제거 */
    min-width: auto !important;
    overflow-x: hidden !important; /* 가로 스크롤 방지 */
    box-sizing: border-box !important; /* 패딩이 너비에 포함 */
}

/* 헤더 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.logo {
    font-size: 4em;
    font-weight: 900;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    letter-spacing: 4px;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.logo a {
    color: inherit;
    text-decoration: none;
}

.subtitle {
    font-size: 1.2em;
    color: #b0b0b0;
}

/* 메인 페이지 */
.landing-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 60vh;
}

.search-section {
    width: 100%;
    max-width: 600px;
    margin-bottom: 40px;
}

.quote-section {
    margin-top: 40px;
    text-align: center;
    width: 100%;
    max-width: 90vw; /* 800px -> 90vw로 변경하여 넓은 공간 확보 */
}

.quote {
    font-size: 1.5em;
    font-style: italic;
    color: #ffd93d;
    padding: 20px 40px; /* 좌우 패딩 확보 */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    
    /* 텍스트 길이에 맞게 자동 조절 */
    width: fit-content;
    max-width: 90vw; /* 최대 너비 제한 */
    margin: 0 auto; /* 중앙 정렬 */
}

.quote-author {
    display: block;
    margin-top: 15px;
    color: #ffd93d;
    opacity: 0.6;
    font-size: 0.9em;
    font-style: normal;
    text-align: center;
}

/* 검색 섹션 */
.search-section {
    width: 100%;
    max-width: 600px;
    margin-bottom: 30px;
}

.search-container {
    position: relative;
    display: flex;
    gap: 10px;
}

/* 툴팁 */
.tooltip-container {
    position: absolute;
    left: -200px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tooltip-text {
    background: #ff4444;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: nowrap;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tooltip-text::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left-color: #ff4444;
}

.tooltip-1 {
    animation: fadeIn 0.5s ease-in;
}

.tooltip-2 {
    animation: fadeIn 0.5s ease-in 0.1s both;
}

.tooltip-3 {
    animation: fadeIn 0.5s ease-in 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1em;
    border: 2px solid #444;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: #ff6b6b;
    background: rgba(255, 255, 255, 0.15);
}

.search-button {
    padding: 15px 30px;
    font-size: 1.1em;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.search-button:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* 플래시 메시지 */
.flash-messages {
    margin-top: 20px;
    width: 100%;
    max-width: 600px;
}

.flash-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    text-align: center;
}

.flash-error {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid #ff4444;
    color: #ff6b6b;
}

.flash-success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4caf50;
    color: #81c784;
}

/* 결과 페이지 (대시보드 레이아웃) */
/* 1. 메인 컨테이너: 세로 방향으로 변경 */
.dashboard {
    /* 기존 98vw 설정 삭제 및 100%로 변경 */
    width: 100% !important;
    max-width: 100% !important;
    
    /* 패딩이 너비 안에 포함되도록 설정 (핵심) */
    box-sizing: border-box !important;
    
    /* 불필요한 마진 제거 */
    margin: 0 !important;
    
    /* 좌우 패딩을 줄여서 공간 확보 */
    padding: 20px 10px !important;
    
    /* 정렬 초기화 (block으로 변경하여 자연스럽게 흐르도록 함) */
    display: block !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

/* 결과 컨테이너 중앙 정렬 */
.result-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* 2. 사이드바 래퍼 - 더 이상 사용하지 않음 (프로필 카드가 상단으로 이동) */
.sidebar-wrapper {
    display: none; /* 사이드바 제거 */
}

/* 3. 프로필 카드 디자인 - Grid 아이템으로 변경 */
.profile-card {
    width: 100% !important;
    height: 100% !important;
    min-height: 350px; /* 다른 카드들과 동일한 최소 높이 */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box;
    margin: 0 !important;
}

.profile-icon {
    margin-bottom: 15px;
}

.profile-icon img {
    width: 120px !important;
    height: 120px !important;
    margin-bottom: 15px !important;
    border: 4px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    margin: 0 auto !important;
    display: block !important;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-name {
    font-size: 2rem !important; /* 이름 크게 */
    font-weight: 900 !important;
    color: #ffd93d !important;
    margin-bottom: 10px !important;
}

.profile-tag {
    font-size: 1.1rem !important;
    color: #ccc !important;
    margin-bottom: 10px !important;
}

.profile-level {
    font-size: 1.1rem; /* 크기 확대 */
    color: #fff;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 최근 20게임 통계 스타일 */
.profile-stats {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding-top: 15px !important;
    margin-top: 15px !important;
    width: 100% !important;
}

/* 전적 텍스트 컨테이너 - 색상 통일 */
.recent-stats {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important; /* 각 텍스트 사이 간격 */
    font-size: 1.1em !important;
    font-weight: bold !important;
    margin: 0 !important;
    text-align: center !important;
    /* 전체 노란색 적용 */
    color: #ffd93d !important;
}

/* 내부의 모든 span 태그도 강제로 색상 상속 */
.recent-stats span,
.recent-stats .stat-total,
.recent-stats .stat-win,
.recent-stats .stat-loss,
.recent-stats .stat-rate {
    color: inherit !important; /* 부모 색상(#ffd93d) 따름 */
}

/* 랭크 정보 스타일 */

.rank-section-title,
.stats-section-title {
    font-size: 0.85em;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 8px 0;
    text-align: center;
}

.rank-stat-text {
    font-size: 0.9em;
    font-weight: 500;
    color: #fff;
    margin: 0;
}

.rank-stat-rate {
    font-size: 0.9em;
    color: #ffd93d;
    font-weight: 600;
    margin: 0;
}

/* 솔로랭크 시즌 전적 스타일 */
.season-rank-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-label {
    font-size: 0.85em;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
    text-align: center;
}


.win-loss-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9em;
    color: #fff;
    font-weight: 500;
}

.win-loss-stats .total-games,
.win-loss-stats .wins,
.win-loss-stats .losses {
    color: #fff;
}

.win-loss-stats .wins {
    color: #4caf50;
    font-weight: 600;
}

.win-loss-stats .losses {
    color: #f44336;
    font-weight: 600;
}

.win-loss-stats .rate {
    color: #ffd93d;
    font-weight: 600;
}

/* 호환성을 위한 기존 스타일 유지 */
.season-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.season-stats .total-games,
.season-stats .win-loss,
.season-stats .win-rate {
    font-size: 0.9em;
    color: #fff;
    font-weight: 500;
}

.season-stats .win-rate {
    color: #ffd93d;
    font-weight: 600;
}

.profile-stats {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-stats .stats-section-title {
    margin-bottom: 8px;
}

.stat-text {
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    margin: 0 0 6px 0;
}

.stat-rate {
    font-size: 0.95em;
    color: #ffd93d;
    font-weight: 600;
    margin: 0;
}

/* 우측: 메인 콘텐츠 */
/* 4. 우측 콘텐츠 영역 */
.main-content {
    flex: 1 !important; /* 남은 공간 차지 */
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
    display: block !important; /* flex 대신 block으로 변경 */
    overflow-x: hidden !important; /* 가로 스크롤 방지 */
    box-sizing: border-box !important; /* 패딩이 너비에 포함 */
}

/* 메인 콘텐츠 내부 컨테이너 */
.main-content-inner {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important; /* 중앙 정렬 제거하여 왼쪽으로 붙임 */
    padding: 0 !important; /* 패딩 제거 (부모가 패딩 처리) */
    display: block !important; /* flex 대신 block으로 변경 */
    overflow-x: hidden; /* 가로 스크롤 방지 */
    box-sizing: border-box !important; /* 패딩이 너비에 포함 */
}

/* 차트 하단 하이라이트 텍스트 */
.chart-highlight {
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 0;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(0, 231, 255, 0.1);
    color: #00E7FF;
    border: 1px solid rgba(0, 231, 255, 0.3);
    width: 100%;
}

.chart-highlight.defeat {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
    border-color: rgba(255, 71, 87, 0.3);
}

/* 툴팁 아이콘 및 내용 */
.tooltip-icon {
    position: absolute !important;
    right: 20% !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #555;
    color: #fff;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.tooltip-icon:hover {
    background-color: #777;
}

.tooltip-icon .tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 50%;               /* 아이콘의 수직 중앙에서 시작 */
    left: 140%;             /* 아이콘 오른쪽으로 밀어냄 (수치 조절 가능) */
    transform: translateY(-50%); /* 수직 중앙 정렬 */
    background-color: #2a2c33;
    color: #fff;
    text-align: left;
    padding: 12px 16px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: normal;
    line-height: 1.6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #3c3f4b;
    z-index: 1000;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    width: 220px;           /* 너비 고정 */
    margin-left: 10px;      /* 화살표 공간 확보 */
}

.tooltip-icon:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* 툴팁 화살표 (왼쪽에 배치) */
.tooltip-icon .tooltip-content::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;            /* 박스 왼쪽에 배치 */
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #2a2c33; /* 왼쪽을 가리키는 화살표 */
}

/* 상단 박스 컨테이너 - Grid 레이아웃으로 변경 */
.stats-graphs {
    display: grid !important;
    /* 4등분 강제 유지 */
    grid-template-columns: repeat(4, 1fr) !important;
    
    /* 박스 사이 간격 미세 조정 (공간 부족 시 줄임) */
    gap: 15px !important;
    
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    margin-bottom: 30px !important; /* 하단 여백만 유지 */
    overflow: visible !important;
    z-index: 10;
    position: relative;
    flex-wrap: unset !important; /* 기존 flex 속성 무력화 */
    justify-content: start !important; /* 왼쪽 정렬 강제 */
}

/* 개별 카드 (프로필, 종합등급, 승리, 패배 박스) - Grid 아이템으로 통일 */
.stats-graphs > .profile-card,
.stats-graphs > .grade-box,
.stats-graphs > .stats-card,
.stats-card, 
.score-card, 
.grade-box {
    width: auto !important; /* grid가 너비를 제어하므로 auto */
    height: 100% !important;
    min-height: 400px !important; /* 최소 높이 증가 */
    margin: 0 !important;
    padding: 20px !important;
    
    overflow: visible !important; 
    position: relative !important;
    z-index: 1; 
    
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    text-align: center !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

/* 마우스를 올렸을 때 해당 박스를 가장 위로 올림 (안전장치) */
.grade-box:hover {
    z-index: 9999 !important;
}

.score-card h3, .stats-card h3, .grade-box h3 {
    margin-bottom: 20px;
    color: #ffd93d;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* grade-box 내부 툴팁 아이콘 위치 조정 */
.grade-box h3 .tooltip-icon {
    position: absolute !important;
    right: 20% !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.score-value {
    font-size: 3em;
    font-weight: bold;
    color: #ff6b6b;
}

.score-grade {
    font-size: 4em;
    font-weight: 900;
    color: #ffd93d;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 4px;
}

/* 등급별 색상 */
.score-grade.grade-s-plus {
    color: #ff2b2b;
    text-shadow: 0 0 15px rgba(255, 43, 43, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.score-grade.grade-s {
    color: #ffc400;
    text-shadow: 0 0 10px rgba(255, 196, 0, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.score-grade.grade-a-plus {
    color: #d05ce3;
    text-shadow: 0 0 10px rgba(208, 92, 227, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.score-grade.grade-a {
    color: #2b8cff;
    text-shadow: 0 0 10px rgba(43, 140, 255, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.score-grade.grade-b-plus {
    color: #00e676;
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.score-grade.grade-b {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 파이 차트 */
.win-loss-chart {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 차트 래퍼 (차트 + 텍스트를 세로로 배치) */
.chart-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 250px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.pie-chart {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
}

.pie-chart.victory-chart {
    background: conic-gradient(
        #4caf50 0% var(--victory-percent),
        #81c784 var(--victory-percent) 100%
    );
}

.pie-chart.defeat-chart {
    background: conic-gradient(
        #f44336 0% var(--jg-end),
        #e91e63 var(--jg-end) var(--mid-end),
        #ff9800 var(--mid-end) var(--bot-end),
        #9c27b0 var(--bot-end) 100%
    );
}

.pie-chart .victory-segment,
.pie-chart .defeat-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: auto;
    transition: opacity 0.2s;
}

.pie-chart .victory-segment:hover,
.pie-chart .defeat-segment:hover {
    opacity: 0.8;
}

.no-data {
    text-align: center;
    color: #888;
    padding: 40px 20px;
}

.chart-labels {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.label-victory {
    color: #4caf50;
    font-weight: bold;
}

.label-defeat {
    color: #f44336;
    font-weight: bold;
}

.label-jg {
    color: #f44336;
    font-weight: bold;
}

.label-mid {
    color: #e91e63;
    font-weight: bold;
}

.label-bot {
    color: #ff9800;
    font-weight: bold;
}

.label-fix {
    color: #9c27b0;
    font-weight: bold;
}

/* 매치 리스트 */
.matches-section {
    /* 상단 4칸 중 오른쪽 3칸의 너비만큼 차지 (gap 보정) */
    width: calc(75% - 11.25px) !important; /* gap 15px 기준 보정 (15px * 3/4 = 11.25px) */
    margin-left: auto !important; /* 왼쪽 여백을 자동으로 채워 오른쪽으로 밀착 */
    margin-right: 0 !important;
    margin-top: 30px !important; /* 상단과의 간격 확보 */
    max-width: none !important;
    box-sizing: border-box !important;
    display: block;
}

.matches-section h3 {
    margin-bottom: 20px;
    color: #ffd93d;
    font-size: 1.5em;
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 새로운 카드 스트립 디자인 - 플레이어 정보 스타일로 통일 */
.match-card-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 4px;
    padding: 15px 20px;
    gap: 10px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 90px;
    margin-bottom: 10px;
    background-color: #2a2a2a;
    border-left: 4px solid transparent;
    overflow: hidden;
    font-size: 1.0rem;
}

.match-card-strip.victory-card {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2) 0%, rgba(25, 118, 210, 0.3) 100%);
    border-left-color: #2196f3;
}

/* 패배 카드: 따뜻한 빨강 톤으로 통일 (#ff4757) */
.match-card-strip.defeat-card {
    /* [수정] rgba(229, 30, 99, 0.3) -> rgba(255, 71, 87, 0.25) (따뜻한 빨강) */
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.2) 0%, rgba(255, 71, 87, 0.25) 100%) !important;
    /* 세로줄 색상 (#f44336)과 톤을 맞춤 */
    border-left-color: #f44336 !important;
}

.match-card-strip:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
}

.match-card-strip.victory-card:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.25) 0%, rgba(25, 118, 210, 0.35) 100%);
}

/* 호버 시에도 따뜻한 톤 유지 */
.match-card-strip.defeat-card:hover {
    /* [수정] rgba(229, 30, 99, 0.35) -> rgba(255, 71, 87, 0.3) (따뜻한 빨강) */
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.25) 0%, rgba(255, 71, 87, 0.3) 100%) !important;
}

/* match-card-strip 내부 챔피언 아이콘 크기 */
.match-card-strip .champion-spell-rune-container .champion-icon {
    width: 60px; /* 축소: 80px -> 60px */
    height: 60px; /* 축소: 80px -> 60px */
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
}

.match-card-strip .champion-spell-rune-container {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.match-card-strip .spell-rune-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.match-card-strip .spells-column,
.match-card-strip .runes-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.match-card-strip .spell-icon {
    width: 24px !important; 
    height: 24px !important;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

/* 메인 전적 카드 스펠 이미지 확대 */
.match-card-strip .summoner-spells img,
.match-card-strip .spells-container img {
    width: 28px;  /* 기존보다 확대 (약 1.5배) */
    height: 28px;
    object-fit: cover;
    display: block; /* 수직 정렬 보정 */
    border-radius: 4px;
}

/* 스펠/룬 래퍼가 있다면 중앙 정렬 */
.match-card-strip .spells-runes-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.match-card-strip .rune-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* match-card-strip 내부 KDA & CS 통합 스타일 */
.match-card-strip .stats-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 200px; /* 한 줄로 길어지므로 너비 증가 */
    margin-left: 15px; /* 룬 정보와 약간의 여백 (적당한 간격) */
    margin-right: 0 !important; /* 혹시 있을 우측 여백 제거 */
}

/* 1. KDA 행 정렬: KDA와 평점은 붙어있어야 함 */
.match-card-strip .kda-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center;
    gap: 4px !important; /* KDA와 평점 사이 간격 최소화 */
    flex-wrap: nowrap !important;
    white-space: nowrap;
}

.match-card-strip .kda-value {
    color: #ffffff; /* 흰색 */
    font-weight: 500; /* Medium (800 -> 500) */
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-right: 0 !important; /* 우측 여백 제거 */
}

.match-card-strip .kda-value .kill,
.match-card-strip .kda-value .death,
.match-card-strip .kda-value .assist {
    color: #ffffff; /* 흰색 */
    font-weight: 500; /* Medium (800 -> 500) */
}

.match-card-strip .kda-ratio {
    color: #bbb; /* 회색 */
    font-size: 0.9rem;
    font-weight: 400; /* Normal (500 -> 400) */
    margin-left: 2px !important; /* 수치와 아주 가깝게 배치 */
}

/* 2. CS 텍스트 분리: 왼쪽 마진을 추가하여 평점과 거리를 둠 */
.match-card-strip .cs-value {
    margin-left: 20px !important; /* [핵심] 평점과의 거리 확보 */
    color: #ffffff; /* 흰색 */
    font-weight: 500; /* Medium (800 -> 500) */
    font-size: 1.0rem;
    white-space: nowrap;
}

/* 기존 스타일 호환성 유지 (다른 곳에서 사용 중일 수 있음) */
.match-card-strip .player-kda {
    font-size: 1.0rem;
    color: #bbb;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center;
    flex-wrap: nowrap !important;
    min-width: 140px;
    width: 140px;
    margin: 0 auto;
    gap: 5px;
    flex-shrink: 0;
    white-space: nowrap;
}

.match-card-strip .player-kda .kda-ratio {
    color: #888;
    font-size: 0.9rem;
    margin-left: 6px;
}

.match-card-strip .player-cs {
    font-size: 1.0rem;
    color: #bbb;
    min-width: 60px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* match-card-strip 내부 아이템 스타일 */
/* CS와 아이템 사이 여백 축소 */
/* 3. 아이템 그룹 간격 통일 */
.match-card-strip .player-items {
    display: flex;
    gap: 2px !important;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: 20px !important; /* [핵심] 위 CS 마진과 동일한 값 적용 */
}

.match-card-strip .player-items .item-icon {
    width: 30px; /* 축소: 40px -> 30px */
    height: 30px; /* 축소: 40px -> 30px */
    background-color: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.match-card-strip .player-items .item-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.match-card-strip .player-items .item-icon.trinket {
    margin-left: 4px;
    border-radius: 50%;
}

/* match-card-strip 내부 승패 원인 텍스트 */
.match-card-strip .verdict-text {
    /* [핵심] 고정된 영역 확보 */
    width: 300px !important; /* 글자가 들어가기에 충분히 넓은 고정 너비 */
    min-width: 300px !important; /* 줄어들지 않게 고정 */
    
    /* [핵심] 영역 내에서 중앙 정렬 */
    text-align: center !important; 
    justify-content: center !important;
    
    /* 위치 설정 */
    margin-left: auto !important; /* 왼쪽 요소들을 다 밀어내고 */
    margin-right: 20px !important; /* 오른쪽 벽에서 20px 떨어진 곳에 박스 배치 */
    
    flex-grow: 0;
    white-space: nowrap !important;
    display: flex;
    align-items: center;
    
    /* 기존 폰트 스타일 유지 (가장 중요) */
    font-size: 38px !important; /* 박스 높이를 꽉 채우는 거대한 크기 */
    font-weight: 900 !important; /* 최대 두께 */
    line-height: 1 !important; /* 줄 간격을 줄여서 높이 공간 확보 */
    letter-spacing: -1px; /* 자간을 살짝 좁혀서 더 단단해 보이게 */
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.match-card-strip.victory-card .verdict-text {
    color: #64b5f6;
}

/* 패배 멘트: 상단 '핵심 패배 원인' 박스와 동일한 색상 */
.match-card-strip.defeat-card .verdict-text {
    /* [수정] #ff6b9d (핑크) -> #ff4757 (따뜻한 빨강) */
    color: #ff4757 !important;
    /* 텍스트 그림자도 톤에 맞게 미세 조정 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.match-card-strip .verdict-text.non-top-verdict {
    color: #aaa;
    font-size: 1.0em;
}

/* 기존 card-left, card-right 제거 (더 이상 사용하지 않음) */
.card-left,
.card-right {
    display: none;
}

.champion-icon {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.champion-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 챔피언 및 스펠 컨테이너 */
.champion-spell-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* 챔피언, 스펠, 룬 컨테이너 (2x2 그리드) */
.champion-spell-rune-container {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important; /* 간격 최소화 유지 */
    width: fit-content;
    flex-shrink: 0 !important; /* 절대 줄어들지 않음 */
    flex-wrap: nowrap !important; /* 줄바꿈 방지 */
}

.champion-spell-rune-container .champion-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.spell-rune-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
}

.spells-column,
.runes-column {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rune-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 소환사 주문 컨테이너 */
.spells-container {
    display: flex;
    flex-direction: row;
    gap: 2px;
    justify-content: center;
}

/* 소환사 주문 아이콘 */
.spell-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 매치 카드 스트립 내 스펠 아이콘 (플레이어 정보와 동일한 크기) */
.match-card-strip .spell-icon {
    width: 24px !important;
    height: 24px !important;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

.kda-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

.kda-value {
    font-size: 1.3em;
    font-weight: bold;
    color: #fff;
}

.kda-ratio {
    font-size: 0.9em;
    color: #b0b0b0;
}

.kda-section .spells-container {
    margin-top: 4px;
}

.cs-info {
    font-size: 0.9em;
    color: #b0b0b0;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.items-build {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* 전적 리스트 아이템 아이콘 크기 확대 */
.match-card-strip .item-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.item-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.item-icon.empty {
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-right {
    flex: 0 0 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.verdict-text {
    font-size: 1.8em;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.victory-card .verdict-text {
    color: #64b5f6;
}

/* 패배 멘트 (중복 선택자): 따뜻한 빨강으로 통일 */
.defeat-card .verdict-text {
    /* [수정] #ff6b9d (핑크) -> #ff4757 (따뜻한 빨강) */
    color: #ff4757 !important;
}

/* 탑이 아닌 매치 (회색 처리) */
.match-card-strip.non-top-lane {
    background: rgba(100, 100, 100, 0.1);
    border-left-color: #888;
    opacity: 0.6;
    filter: grayscale(0.7);
    cursor: default;
}

.match-card-strip.non-top-lane:hover {
    background: rgba(100, 100, 100, 0.15);
    opacity: 0.8;
    transform: none;
}

.match-card-strip.non-top-lane .kda-value,
.match-card-strip.non-top-lane .kda-ratio,
.match-card-strip.non-top-lane .cs-info {
    color: #888;
}

.match-card-strip.non-top-lane .verdict-text.non-top-verdict {
    color: #aaa;
    font-size: 1.4em;
}

/* 기존 match-card 스타일은 match-card-strip으로 대체됨 */

.match-details {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.3s ease-out;
    overflow-x: auto; /* 가로 스크롤 허용 (짤림 방지) */
    overflow-y: visible;
    box-sizing: border-box !important;
}

/* 탭 버튼 그룹 */
.analysis-tabs {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 20px;
}

.tab-button {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tab-button.active {
    background: #5c7cfa;
    color: #fff;
    border-color: #5c7cfa;
}

/* 패배 시 탭 버튼 활성 상태 (빨간색) */
.defeat-card .tab-button.active {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

/* 분석 결과 컨테이너 (패배 시 탭 구조) */
.analysis-cause {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box !important;
}

.analysis-my-stats {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box !important;
}

.analysis-my-stats h3 {
    color: #ffd93d;
    margin-bottom: 20px;
    font-size: 1.3em;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 2000px;
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

.timeline-metrics h4,
.detailed-comments h4,
.overall-stats-section h4 {
    margin-bottom: 15px;
    color: #ffd93d;
}

/* 상세 코멘트 섹션 제목 스타일 강조 */
.comments-section-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd93d;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 분석 결과 섹션 */
.analysis-section {
    margin-bottom: 2rem;
}

/* 분석 결과 헤더 (노란색) */
.analysis-header {
    color: #ffd700; /* 노란색 */
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 판결 배너 */
/* 분석 결과 배너 스타일 통일 - 타임라인 지표와 디자인 통일 */
.verdict-banner {
    padding: 1.5rem !important;
    border-radius: 12px !important;
    text-align: center;
    font-weight: bold !important;
    font-size: 1.5rem !important; /* 라벨과 멘트 크기 동일 */
    margin-bottom: 1.5rem;
    background-color: #2a2c33 !important; /* 어두운 배경 */
}

.win-banner {
    background-color: #2a2c33 !important; /* 어두운 배경 */
    border: 2px solid #00E7FF !important; /* 파랑 테두리 */
    color: #00E7FF !important;
}

.loss-banner {
    background-color: #2a2c33 !important; /* 어두운 배경 */
    border: 2px solid #ff4757 !important; /* 빨강 테두리 */
    color: #ff4757 !important;
}

.verdict-text {
    font-weight: bold !important;
    font-size: 1.5rem !important; /* 라벨과 동일한 크기 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 분석 결과 배너 스타일 (호환성 유지) */
.analysis-banner {
    background: linear-gradient(135deg, #004ecc 0%, #00e7ff 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 231, 255, 0.3);
    text-align: center;
    font-weight: bold;
}

.analysis-banner.loss {
    background: linear-gradient(135deg, #cc0000 0%, #ff4757 100%);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

/* 코멘트 헤드라인 (배너 외부용) */
.comment-headline {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-align: center;
}

.headline-victory {
    color: #00E7FF;
}

.headline-defeat {
    color: #ff4757;
}

/* 상세 코멘트 리스트 스타일 */
.comment-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    text-align: left;
}

/* 코멘트 타임라인 컨테이너 */
.comment-timeline-container {
    position: relative;
    padding-left: 0;
}

/* 코멘트 리스트 */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

/* 코멘트 아이템 (타임라인 레이아웃) */
.comment-item {
    margin-bottom: 1.5rem;
    padding: 0;
    display: flex;
    align-items: center; /* 시간 배지를 Content Box 중앙에 정렬 */
    gap: 1.2rem;
    position: relative;
}

/* 시간 컬럼 (왼쪽) */
.time-col {
    flex-shrink: 0;
    width: 80px;
    display: flex;
    justify-content: flex-start;
    align-items: center; /* Content Box와 중앙 정렬 */
    position: relative;
}

.time-col[style*="display: none"] {
    display: none !important;
}

/* 타임라인 연결선 (시간이 있는 아이템만, 마지막 제외) */
.comment-item.has-timeline:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 39px; /* time-col 중앙 (80px / 2) */
    top: 50%; /* 시간 배지 중앙 위치 */
    width: 2px;
    height: calc(100% + 1.5rem); /* 다음 아이템까지 연결 */
    background: linear-gradient(to bottom, 
        rgba(255, 71, 87, 0.6) 0%, 
        rgba(255, 71, 87, 0.4) 50%,
        rgba(255, 71, 87, 0.2) 100%);
    z-index: 0;
}

.comment-item.comment-victory.has-timeline:not(:last-child)::after {
    background: linear-gradient(to bottom, 
        rgba(0, 231, 255, 0.6) 0%, 
        rgba(0, 231, 255, 0.4) 50%,
        rgba(0, 231, 255, 0.2) 100%);
}

/* 시간이 없는 아이템 스타일 */
.comment-item.no-timeline .content-col {
    width: 100% !important;
    max-width: 100% !important;
}

/* 시간 배지 (Pill 형태) */
.comment-time-badge {
    width: fit-content;
    min-width: 60px;
    padding: 0.5rem 1rem;
    border-radius: 20px; /* Pill shape */
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    text-align: center;
    background: #ff4757;
    color: white;
    position: relative;
    z-index: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.3);
}

.comment-time-badge.time-badge {
    background: #ff4757 !important;
    color: white !important;
}

.comment-item.comment-victory .comment-time-badge {
    background: #00E7FF;
    color: #1a233a;
    box-shadow: 0 2px 4px rgba(0, 231, 255, 0.3);
}

.comment-item.comment-victory .comment-time-badge.time-badge {
    background: #00E7FF !important;
    color: #1a233a !important;
}

/* 내용 컬럼 (오른쪽) */
.content-col {
    flex: 1;
    min-width: 0;
}

.comment-item:has(.time-col[style*="display: none"]) .content-col {
    width: 100%;
    max-width: 100%;
}

/* 내용 박스 */
.comment-content-box {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem 1rem; /* 패딩 축소 */
    background: rgba(26, 28, 35, 0.8); /* Dark Navy/Grey */
    border: 1px solid rgba(255, 71, 87, 0.25);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.comment-item.comment-victory .comment-content-box {
    border-color: rgba(0, 231, 255, 0.25);
    background: rgba(26, 35, 58, 0.8); /* Dark Blue */
    padding: 0.6rem 1rem; /* 승리 코멘트는 더 컴팩트하게 */
}

.comment-item:hover .comment-content-box {
    background: rgba(30, 32, 40, 0.95);
    border-color: rgba(255, 71, 87, 0.4);
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.15);
}

.comment-item.comment-victory:hover .comment-content-box {
    background: rgba(30, 40, 65, 0.95);
    border-color: rgba(0, 231, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 231, 255, 0.15);
}

/* 요약 제목 */
.comment-summary {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffd93d;
    line-height: 1.3; /* 줄 간격 축소 */
    margin: 0; /* 마진 제거 */
    margin-bottom: 0.2rem;
}

.comment-item.comment-victory .comment-summary {
    color: #00E7FF;
    margin-bottom: 0; /* 승리 코멘트 제목과 내용 바로 붙이기 */
}

/* 상세 내용 */
.comment-detail {
    font-size: 0.95rem;
    color: #e0e0e0;
    line-height: 1.5; /* 줄 간격 축소 */
    margin: 0; /* 마진 제거 */
}

/* 수치 강조 색상 통일 (흰색, 얇게) */
.comment-detail .value-gold,
.comment-detail .value-xp,
.comment-detail .value-cs,
.comment-detail .value-dmg {
    color: #ffffff; /* 모두 흰색으로 통일 */
    font-weight: 400 !important; /* Normal - 얇게 */
}

/* 비타임라인 분석용 헤더/바디 */
.comment-header {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffd93d;
    line-height: 1.3;
    margin: 0;
    margin-bottom: 0.4rem;
}

.comment-item.comment-victory .comment-header {
    color: #00E7FF;
}

.comment-body {
    font-size: 0.95rem;
    color: #e0e0e0;
    line-height: 1.5;
    margin: 0;
}

/* 비타임라인 분석 바디의 수치 강조도 얇게 */
.comment-body .value-gold,
.comment-body .value-xp,
.comment-body .value-cs,
.comment-body .value-dmg {
    color: #ffffff; /* 모두 흰색으로 통일 */
    font-weight: 400 !important; /* Normal - 얇게 */
}

/* 기존 comment-text 스타일 (호환성 유지) */
.comment-text {
    color: #fff;
    line-height: 1.6;
    flex: 1;
    display: flex !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
}

/* 시간 배지 공통 스타일 (승리/패배 모두 적용) */
.time-badge, .analysis-time {
    display: inline-flex !important;       /* 인라인 플렉스 */
    justify-content: center !important;
    align-items: center !important;
    width: fit-content !important;     /* 글자 크기에 딱 맞게 너비 고정 */
    height: fit-content !important;   /* 높이 고정 */
    min-width: 50px !important;           /* 최소 너비 */
    max-width: 80px !important;           /* 최대 너비 제한 */
    flex: 0 0 auto !important;            /* Flex 컨테이너 안에서 늘어나지 않도록 고정 */
    flex-shrink: 0 !important;           /* Flex 축소 방지 */
    flex-grow: 0 !important;             /* Flex 확장 방지 */
    align-self: flex-start !important;  /* 세로 늘어짐 방지 (flex-start로 변경) */
    padding: 0.4rem 0.8rem !important;    /* 내부 여백 */
    margin-right: 1rem !important;        /* 텍스트와의 간격 */
    border-radius: 8px !important;        /* 둥근 모서리 */
    font-weight: bold !important;
    background: #ff4757 !important;
    color: white !important;
    font-size: 0.85rem !important;
    white-space: nowrap !important;     /* 줄바꿈 방지 */
}

/* 수치 강조 색상 통일 (흰색) */
.value-gold,
.value-xp,
.value-cs,
.value-dmg {
    color: #ffffff; /* 모두 흰색으로 통일 */
    font-weight: bold;
}

.overall-stats-section {
    margin-top: 30px;
}

/* 스탯 카드 그리드 레이아웃 - 5x3 그리드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5열 고정 */
    gap: 1rem;
    margin-bottom: 2rem;
}

/* 전체 지표 섹션 그리드 */
.overall-stats-section .stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5열 고정 */
    gap: 1rem;
}

/* 타임라인 지표 그리드 */
.timeline-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.time-point-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.time-label {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffd93d;
    text-align: center;
    margin-bottom: 0.5rem;
}

.time-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

/* 스탯 카드 기본 스타일 */
.stat-card {
    background-color: #2a2c33;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #3c3f4b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100px;
    min-height: 100px;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* 유리함 스타일 (파랑/형광) */
.stat-card.advantage {
    border-left: 5px solid #00E7FF;
    background: linear-gradient(90deg, rgba(0, 231, 255, 0.05) 0%, rgba(42, 44, 51, 0) 100%);
}

.text-blue {
    color: #00E7FF;
    font-weight: bold;
}

/* 불리함 스타일 (빨강) */
.stat-card.disadvantage {
    border-left: 5px solid #ff4757;
    background: linear-gradient(90deg, rgba(255, 71, 87, 0.05) 0%, rgba(42, 44, 51, 0) 100%);
}

.text-red {
    color: #ff4757;
    font-weight: bold;
}

/* 무승부/0 차이 스타일 (회색) */
.stat-card.draw {
    border: 1px solid #444; /* 회색 테두리 */
    border-left: 5px solid #666;
    background: #2a2c33; /* 기본 배경색 */
}

.text-white {
    color: #ffffff !important;
    font-weight: bold;
}

/* 스탯 콘텐츠 */
.stat-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* 폰트 스타일 */
.stat-label {
    font-size: 1.0rem !important;  /* 타임라인 지표와 동일 (.metric-label: 1rem) */
    color: #ffffff !important;     /* 진한 흰색 (White) */
    font-weight: bold !important;   /* 굵게 */
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stat-value {
    font-size: 1.3rem !important;  /* 타임라인 지표와 동일 (.metric-value: 1.3rem) */
    font-family: 'Pretendard', sans-serif;
    font-weight: 900 !important;   /* 매우 굵게 */
    color: #ffffff !important;     /* 진한 흰색 강조 */
    display: block;
    line-height: 1.2;
}

/* 반응형 디자인 - 모바일 */
/* 전체 지표 그리드 반응형 조정 */
@media (max-width: 1200px) {
    .overall-stats-section .stats-grid,
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .timeline-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .time-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 1rem 0.75rem;
        height: 90px;
        min-height: 90px;
    }
    
    .stat-label {
        font-size: 0.9rem !important;  /* 모바일에서도 타임라인과 비슷하게 */
        margin-bottom: 0.4rem;
    }
    
    .stat-value {
        font-size: 1.2rem !important;  /* 모바일에서도 타임라인과 비슷하게 */
    }
    
    .comment-headline {
        font-size: 1.1rem;
        padding: 0.75rem;
    }
    
    .comments-section-title {
        font-size: 1.2rem;
    }
}

/* 타임라인 래퍼 (전체 컨테이너 - 가로 배치) */
.timeline-wrapper {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    width: 100%;
}

/* 타임라인 차트 컨테이너 */
.timeline-chart-container {
    margin-top: 1.5rem;
    width: 100%;
}

/* 타임라인 탭 메뉴 */
.timeline-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.timeline-tab {
    padding: 0.75rem 1.5rem;
    background-color: rgba(42, 44, 51, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Pretendard', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-tab:hover {
    background-color: rgba(42, 44, 51, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

.timeline-tab.active {
    background-color: rgba(0, 231, 255, 0.15);
    border-color: #00E7FF;
    color: #00E7FF;
    box-shadow: 0 0 15px rgba(0, 231, 255, 0.3);
}

.timeline-tab.active:hover {
    background-color: rgba(0, 231, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 231, 255, 0.4);
}

/* 타임라인 차트 래퍼 */
.timeline-chart-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    background-color: rgba(26, 28, 35, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 개별 시간 컬럼 */
.timeline-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 220px;
}

.time-header {
    color: #ffd700;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
}

/* 지표를 감싸는 박스 (테두리 적용) */
.timeline-box {
    display: flex;
    flex-direction: column; /* 세로로 쌓기 */
    justify-content: center;
    align-items: center;    /* 텍스트 중앙 정렬 */
    gap: 0.8rem;            /* 줄 간격 */
    background-color: #2a2c33;
    border: 2px solid #3c3f4b;
    border-radius: 12px;
    padding: 1.5rem;
    width: 200px; /* 고정 너비 또는 적절히 조정 */
}

.timeline-box-advantage {
    border-color: #00E7FF;
    background-color: rgba(0, 231, 255, 0.05);
}

.timeline-box-disadvantage {
    border-color: #ff4757;
    background-color: rgba(255, 71, 87, 0.05);
}

.timeline-box-draw {
    border-color: #888;
    background-color: rgba(136, 136, 136, 0.05);
}

/* 개별 지표 아이템 */
.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

/* 개별 줄 스타일 (세로 리스트용) - 강조 */
.metric-row {
    font-size: 1.2rem;      /* 전체적으로 크게 */
    font-family: 'Pretendard', sans-serif;
    color: #fff;
    font-weight: 700;       /* 더 굵게 */
    white-space: nowrap; /* 줄바꿈 방지 */
}

.metric-label {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 4px;
}

/* 타임라인 박스 내부 라벨 (Gold, XP 등) - 강조 */
.metric-row .metric-label,
.timeline-box .metric-label {
    font-size: 1rem;        /* 기존보다 확대 */
    font-weight: 800;       /* 굵게 */
    color: #ffffff;         /* 완전한 흰색 (진하게) */
    text-transform: uppercase;
    opacity: 1;             /* 투명도 제거 */
    margin-right: 4px;
    margin-bottom: 0;
}

/* 타임라인 박스 내부 수치 (+200 등) - 강조 */
.metric-row .metric-value,
.timeline-box .metric-value {
    font-size: 1.3rem;      /* 수치 더 크게 */
    font-weight: 900;       /* 매우 굵게 */
    color: #fff;            /* 기본 흰색 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* 잘 보이게 그림자 추가 */
}

.metric-value {
    font-size: 1.3rem;      /* 수치 더 크게 */
    font-weight: 900;       /* 매우 굵게 */
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.metric-value.value-advantage {
    color: #00E7FF;
    font-size: 1.3rem;      /* 수치 더 크게 */
    font-weight: 900;       /* 매우 굵게 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* 잘 보이게 그림자 추가 */
}

.metric-value.value-disadvantage {
    color: #ff4757;
    font-size: 1.3rem;      /* 수치 더 크게 */
    font-weight: 900;       /* 매우 굵게 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* 잘 보이게 그림자 추가 */
}

/* 기존 타임라인 스타일 (호환성 유지) */
.timeline-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

.timeline-group {
    background: transparent;
    border: none;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

.timeline-group-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd93d;
    text-align: center;
    margin-bottom: 0.5rem;
}

.timeline-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

/* 시간대별 컬럼 */
.time-column {
    flex: 1;
    padding: 15px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 10px;
    min-height: 200px;
    justify-items: center;
}

/* 시간대별 지표 컨테이너 (2x2 Grid) */
.time-column-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    justify-items: center;
    width: 100%;
}

.stats-box.advantage-bg {
    background-color: var(--bg-win-dark);
}

.stats-box.disadvantage-bg {
    background-color: var(--bg-loss-dark);
}

.stats-box.draw-bg {
    background-color: var(--bg-draw-dark);
}

.time-label-header {
    font-weight: bold;
    font-size: 1.1em;
    color: #ffd93d;
    margin-bottom: 5px;
    text-align: center;
}

.stat-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-align: center;
    padding: 5px;
    word-break: break-word;
    line-height: 1.2;
}

.stat-circle.win {
    background-color: var(--circle-win-light);
    color: #fff; /* 가독성을 위해 흰색 텍스트 */
}

.stat-circle.loss {
    background-color: var(--circle-loss-light);
    color: #fff; /* 가독성을 위해 흰색 텍스트 */
}

/* 전체 지표 컨테이너 (7x2 Grid) */
.overall-stats-container {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    justify-items: center;
    min-width: 800px;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.timeline-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    text-align: left;
}

.timeline-item.win-box {
    background: rgba(33, 150, 243, 0.15);
    border-left: 4px solid #2196f3;
}

.timeline-item.loss-box {
    background: rgba(244, 67, 54, 0.15);
    border-left: 4px solid #f44336;
}

.time-label {
    display: block;
    font-size: 0.9em;
    color: #b0b0b0;
    margin-bottom: 8px;
    font-weight: 600;
}

.time-value {
    display: block;
    font-size: 0.95em;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-item.win-box .time-value {
    color: #64b5f6;
}

.timeline-item.loss-box .time-value {
    color: #ef5350;
}

.timeline-metric {
    display: block;
    font-size: 0.85em;
    margin-bottom: 3px;
    color: #d0d0d0;
}

.timeline-item.win-box .timeline-metric {
    color: #90caf9;
}

.timeline-item.loss-box .timeline-metric {
    color: #e57373;
}

.comments-list {
    list-style: none;
    padding: 0;
}

.comments-list li {
    padding: 10px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
}

.comments-text {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
    line-height: 1.8;
    color: #e0e0e0;
    white-space: pre-line;
}

/* 10인 플레이어 요약 */
.participants-summary {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box !important;
}

.participants-summary h4 {
    margin-bottom: 20px;
    color: #ffd93d;
    font-size: 1.3em;
}

.teams-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* 강제로 좌우 배치 */
    gap: 20px !important;
    margin-top: 20px;
    width: 100% !important;
    box-sizing: border-box !important;
}

.team-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px !important; /* 패딩 축소하여 공간 확보 (20px → 15px) */
}

.team-section.blue-team {
    border-left: 4px solid #4a90e2;
}

.team-section.red-team {
    border-left: 4px solid #e24a4a;
}

.team-section h5 {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #fff;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.blue-team h5 {
    color: #4a90e2;
}

.red-team h5 {
    color: #e24a4a;
}

.players-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 플레이어 한 줄 레이아웃 - Flex 레이아웃으로 강제 고정 */
.player-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap !important; /* [핵심] 절대 줄바꿈 금지 */
    align-items: center;
    /* [수정] 전체 간격을 2px로 줄여서 스펠/룬을 챔피언 옆에 붙임 */
    gap: 2px !important;
    padding: 0 10px !important;
    height: 46px !important;
    /* 양 끝 정렬로 변경 */
    justify-content: space-between !important;
    
    /* 폰트 크기 */
    font-size: 13px !important;
    
    width: 100% !important;
    box-sizing: border-box;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* 기본 플레이어 행 -> 밝은 배경 (기존 탑 라이너 색상) */
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-radius: 4px;
    border-left: 4px solid transparent;
    transition: background 0.2s;
    overflow-x: hidden !important; /* 가로 스크롤 제거 */
    overflow-y: visible;
    min-width: 0;
}

/* 플레이어 행 내부 모든 요소 줄바꿈 방지 */
.player-row > * {
    flex-shrink: 0 !important; /* 모든 자식 요소 줄어들지 않음 */
    white-space: nowrap !important; /* 줄바꿈 방지 */
}

.player-row:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 팀별 테두리 색상 */
.player-row.blue-team { 
    border-left-color: #5c7cfa; 
}

.player-row.red-team { 
    border-left-color: #ff6b6b; 
}

/* 탑 라이너 강조 - 배경색 반전 */
.player-row.top-laner {
    /* 기존 기본 색상으로 변경 (어두운 배경) */
    background-color: #2a2a2a !important;
    border-left-width: 6px;
    font-weight: 600;
    order: -1; /* 최상단 배치 */
}

/* 카드 전체 컨테이너: 가로 정렬(Flex) 및 양끝 배분 (호환성 유지) */
.player-card {
    display: flex;
    justify-content: space-between; /* 정보는 왼쪽, 아이템은 오른쪽 */
    align-items: center;            /* 수직 중앙 정렬 */
    background-color: #2a2a2a;      /* 카드 배경색 */
    margin-bottom: 8px;
    padding: 8px 15px;              /* 내부 여백 */
    border-radius: 8px;
    border-left: 4px solid transparent; /* 팀 컬러용 테두리 */
    transition: background 0.2s;
}

.player-card:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 팀별 테두리 색상 (호환성 유지) */
.player-card.blue-team { 
    border-left-color: #5c7cfa; 
}

.player-card.red-team { 
    border-left-color: #ff6b6b; 
}

/* [Left] 정보 영역 스타일 (호환성 유지) */
.player-info-left {
    display: flex;
    align-items: center;
    gap: 12px; /* 아이콘과 텍스트 사이 간격 */
}

.champion-icon {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.champion-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* 플레이어 행 내부 챔피언 아이콘 (별도 스타일) */
/* 1. 챔피언 아이콘 미세 확대 */
.player-row .champion-icon {
    width: 36px !important; /* 30px → 36px */
    height: 36px !important;
    border-radius: 4px !important;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    flex-shrink: 0 !important; /* 절대 줄어들지 않음 */
}

.player-row .champion-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* 이름 폰트 조정 */
.player-name {
    width: 90px !important; /* 80px → 90px (공간 살짝 확보) */
    min-width: 0 !important; /* min-width 해제 */
    max-width: 90px !important;
    font-size: 12px !important; /* 11px → 12px */
    font-weight: normal;
    color: #bbb;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-name .position-tag {
    font-size: 10px;
    color: #888;
    margin-left: 4px;
    font-weight: normal;
}

/* 플레이어 스탯 컨테이너 (KDA, CS 등 포함) - 가로 정렬 */
.player-stats-container {
    display: flex !important;
    flex-direction: row !important; /* 가로 배치 강제 */
    align-items: center !important;
    gap: 4px !important; /* 요소 간 간격 최소화 (6px → 4px) */
    margin: 0;
    flex-shrink: 0 !important; /* 절대 줄어들지 않음 */
    flex-wrap: nowrap !important; /* 줄바꿈 절대 금지 */
}

/* 플레이어 스탯 중앙 그룹 (KDA + CS) - 완벽한 중앙 정렬 */
/* 중앙 래퍼: 남는 공간을 차지하며 내부 요소 중앙 정렬 */
.stats-center-wrapper {
    flex: 1 !important; /* 남는 공간을 차지 */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important; /* 내부 간격 제거 (개별 요소 너비로 제어) */
    margin: 0 !important;
    min-width: 0 !important;
}

/* KDA: 고정 너비 부여 및 중앙 정렬 */
.player-row .player-kda {
    width: 100px !important; /* 고정 너비 (내용 바뀌어도 위치 고정) */
    font-size: 12px !important;
    font-weight: 400 !important; /* Normal weight */
    color: #eee !important;
    display: flex !important;
    flex-direction: row;
    align-items: center !important;
    justify-content: center !important; /* 중앙 정렬 */
    flex-wrap: nowrap !important;
    min-width: 0 !important;
    margin: 0 !important;
    gap: 3px !important;
    white-space: nowrap !important;
    overflow: hidden;
    flex-shrink: 0;
    text-align: center !important; /* 텍스트 중앙 정렬 */
}

/* KDA 숫자 폰트 굵기 보통으로 통일 */
.player-row .player-kda span, 
.player-row .player-kda .kill,
.player-row .player-kda .death,
.player-row .player-kda .assist {
    font-weight: 400 !important; /* Normal weight */
}

.player-kda .kda-ratio {
    color: #888;
    font-size: 10px !important; /* 폰트 축소 */
    margin-left: 3px !important; /* 간격 축소 */
}

/* CS: 고정 너비 부여 및 중앙 정렬 */
.player-row .player-cs {
    width: 70px !important; /* 고정 너비 */
    font-size: 12px !important;
    color: #bbb;
    min-width: 0 !important;
    white-space: nowrap !important; /* [핵심] 절대 줄바꿈 금지 */
    text-align: center !important; /* 중앙 정렬 */
    justify-content: center !important; /* 중앙 정렬 */
    flex-shrink: 0;
    margin: 0 !important;
}

/* 스펠과 룬 컨테이너 수직 정렬 */
/* 스펠/룬: 고정 너비로 밀림 방지 */
.player-spells,
.player-runes {
    width: 18px !important; /* 아이콘 크기 + 여유 */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2px !important;
    height: 100%;
    flex-shrink: 0 !important; /* 절대 줄어들지 않음 */
}

/* 2. 스펠 & 룬 아이콘 미세 확대 */
.player-spells .spell-icon,
.player-runes .rune-icon {
    width: 16px !important; /* 14px → 16px */
    height: 16px !important;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-runes .rune-icon {
    border-radius: 50%;
    background: #000;
}

/* 개별 스탯 텍스트 */
.stat-text {
    white-space: nowrap; /* 줄바꿈 방지 */
    font-size: 0.95rem;
}

/* 플레이어 상세 정보 KDA 가로 배치 - 강제 적용 */
.player-stats,
.player-stats-info,
.player-stats-container {
    display: flex !important;
    flex-direction: row !important; /* 가로 배치 강제 */
    align-items: center !important;
    gap: 4px !important; /* 간격 최소화 (6px → 4px) */
    white-space: nowrap !important; /* 줄바꿈 방지 강제 */
    flex-shrink: 0 !important;
}

/* KDA, CS 등 정보 컨테이너 - 가로 배치 (위에서 이미 정의됨) */

/* 플레이어 아이템 */
/* 아이템 영역: 고정 너비로 우측 정렬 */
.player-items {
    width: 190px !important; /* 아이템 7개 들어갈 고정 공간 확보 */
    display: flex;
    gap: 2px !important; /* 아이템 사이 간격 */
    justify-content: flex-start !important; /* 아이템은 왼쪽부터 차곡차곡 */
    margin-left: auto !important; /* 우측 끝으로 밀어넣기 */
    margin-right: 0 !important;
    flex-shrink: 0;
    white-space: nowrap;
    flex-wrap: nowrap;
    align-items: center;
    max-width: none;
    min-width: 0;
}

.level-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #000;
    color: #fff;
    font-size: 10px;
    padding: 1px 3px;
    border-radius: 4px;
    font-weight: bold;
    line-height: 1.2;
}

.info-text-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.summoner-name {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.position-tag {
    font-size: 11px;
    color: #888;
    margin-left: 4px;
    font-weight: normal;
}

.kda-stats {
    font-size: 12px;
    color: #bbb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kda-detail {
    display: flex;
    align-items: center;
    gap: 2px;
}

.kda-detail .kill,
.kda-detail .death,
.kda-detail .assist {
    font-weight: 500;
}

.kda-ratio {
    color: #888;
    font-size: 11px;
}

.kda-stats .cs,
.kda-stats .kp {
    font-weight: 500;
}

/* [Right] 아이템 영역 스타일 */
.player-items-right {
    display: flex;
    gap: 2px !important; /* 아이템 사이 간격 최소화 */
    flex-shrink: 0;
}

.item-slot {
    width: 28px;  /* 아이템 크기 */
    height: 28px;
    background-color: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
}

.item-slot img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.item-slot.trinket {
    margin-left: 4px; /* 장신구와 일반 아이템 사이 조금 더 띄우기 */
    border-radius: 50%; /* 장신구는 원형으로 표시 */
}

/* 플레이어 아이템 아이콘 (한 줄 레이아웃용) - 크기 최적화 */
/* 3. 아이템 아이콘 미세 확대 */
.item-icon {
    width: 26px !important; /* 22px → 26px */
    height: 26px !important;
    background-color: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0 !important; /* 절대 줄어들지 않음 */
}

.item-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.item-icon.trinket {
    margin-left: 4px;
    border-radius: 50%;
}

/* 호환성을 위한 기존 클래스 유지 */
.player-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: background 0.2s;
    height: auto;
}

.player-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.player-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 80px;
}

.position {
    font-size: 0.75em;
    color: #b0b0b0;
    text-transform: uppercase;
}

.kda-score {
    color: #888;
    font-size: 0.8em;
}

/* 호환성을 위한 기존 클래스 유지 */
.player-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 플레이어 스탯 (호환성 유지 - 가로 배치 강제) */
.player-stats {
    display: flex !important;
    flex-direction: row !important; /* 가로 배치 강제 */
    align-items: center !important;
    gap: 15px;
    flex-wrap: nowrap !important; /* 줄바꿈 방지 */
    white-space: nowrap !important;
}

.player-kda, .player-cs, .player-kp {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 0.75em;
    color: #b0b0b0;
}

.stat-value {
    font-size: 0.9em;
    font-weight: 600;
    color: #fff;
}

.stat-ratio {
    font-size: 0.8em;
    color: #888;
}

.player-items {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    white-space: nowrap;
    flex-wrap: nowrap !important; /* [중요] 줄바꿈 절대 금지 */
    align-items: center;
}

.player-item-icon {
    width: 20px !important; /* 24px → 20px 축소 */
    height: 20px !important;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0 !important;
}

.player-item-icon.empty {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-champion {
    font-weight: 600;
    color: #fff;
    font-size: 0.95em;
}

.player-position {
    font-size: 0.8em;
    color: #b0b0b0;
    text-transform: uppercase;
}

/* 반응형 디자인 */
/* PC 화면에서는 무조건 좌우 배치 유지, 모바일에서만 세로 배치 */

@media (max-width: 1400px) {
    /* 상단 박스를 2줄로 변경 (중간 화면) */
    .stats-graphs {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 1024px) {
    /* 중간 사이즈 화면에서 매치 리스트 꽉 채우기 */
    .matches-section {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    .stats-graphs {
        grid-template-columns: repeat(2, 1fr) !important; /* 2줄로 변경 */
    }
}

@media (max-width: 1200px) {
    /* 상단 박스를 2줄로 변경 (태블릿) */
    .stats-graphs {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .matches-section {
        width: 100% !important; /* 태블릿에서는 꽉 차게 */
        margin-left: 0 !important; /* 왼쪽 마진 제거 */
        max-width: 100% !important;
    }
    
    .analysis-split-container {
        flex-direction: column;
    }
    
    .analysis-my-stats {
        flex: 1;
        width: 100%;
        border-left: none;
        border-top: 2px solid rgba(255, 255, 255, 0.1);
    }
    
    .analysis-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .tooltip-container {
        display: none;
    }
    
    .dashboard {
        flex-direction: column;
        padding: 15px;
        max-width: 100%;
    }
    
    .sidebar-wrapper {
        display: none; /* 사이드바는 이미 없음 */
    }
    
    .profile-card {
        width: 100%;
        min-height: 250px; /* 모바일에서는 최소 높이 축소 */
    }
    
    .profile-icon img {
        width: 80px; /* 모바일에서도 적당한 크기 유지 */
        height: 80px;
    }
    
    .profile-name {
        font-size: 1.4rem; /* 모바일에서 폰트 크기 조정 */
    }
    
    .recent-stats {
        font-size: 1rem; /* 모바일에서 폰트 크기 조정 */
    }
    
    .main-content {
        max-width: 100%;
        margin: 0;
    }
    
    /* 매치 리스트를 모바일에서는 꽉 차게 */
    .matches-section {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    /* 상단 박스를 1줄로 변경 (모바일) */
    .stats-graphs {
        grid-template-columns: 1fr !important;
    }
    
    .stats-card, .score-card, .grade-box, .profile-card {
        min-height: 300px !important; /* 모바일에서는 최소 높이 축소 */
    }
    
    /* 모바일에서만 팀 컨테이너를 세로 배치 */
    .teams-container {
        grid-template-columns: 1fr !important; /* 위아래 배치 */
    }
    
    .timeline-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .logo {
        font-size: 2em;
    }
    
    .match-card-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .card-left {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .teams-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card-right {
        flex: 1;
        width: 100%;
        justify-content: flex-start;
    }
    
    .verdict-text {
        font-size: 1.4em;
    }
    
    .analysis-split-container {
        flex-direction: column;
    }
    
    .analysis-my-stats {
        flex: 1;
        width: 100%;
        border-left: none;
        border-top: 2px solid rgba(255, 255, 255, 0.1);
    }
}

/* 종합 등급 박스 스타일 */
/* 종합 등급 카드 중앙 정렬 - 강제 적용 */
.grade-content,
.grade-card-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important; /* 수직 중앙 정렬 */
    align-items: center !important;     /* 수평 중앙 정렬 */
    height: 100% !important;            /* 박스 높이 꽉 채우기 */
    min-height: 320px !important;       /* 최소 높이 확보 */
    padding: 0 !important;   /* 중앙 정렬을 방해하는 패딩 제거 */
    text-align: center !important;
    margin: 0 !important;    /* 마진 제거 */
    margin-top: -20px !important; /* 폰트 기본 하단 패딩 보정을 위한 음수 마진 */
    transform: translate(10px, -10px) !important; /* 약간 오른쪽, 위로 이동 (시각적 중앙 정렬) */
}

.grade-title {
    font-size: 2.5rem;       /* 크기 확대 */
    font-weight: bold;
    margin-bottom: 0.5rem !important;   /* 등급 텍스트와의 간격 */
    margin-top: 0 !important;        /* 상단 여백 제거 (정중앙 정렬) */
    margin-left: 0 !important;      /* 좌우 여백 제거 */
    margin-right: 0 !important;     /* 좌우 여백 제거 */
    padding: 0 !important;           /* 패딩 제거 */
    color: #e0e0e0;
    line-height: 1.2 !important;    /* 줄 간격 조정 */
}

.grade-text-large {
    /* 등급 텍스트 크기 유동적 조절 (화면 배율에 따라 조절됨) */
    font-size: clamp(5rem, 10vw, 11rem) !important; 
    font-weight: 900;
    line-height: 1;
    width: 100%;
    margin: 0 !important; /* 텍스트 자체의 여백 제거 */
    padding: 0 !important; /* 패딩 제거 */
    display: flex;
    justify-content: center;
    align-items: center;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3); /* 네온 효과 */
    /* 색상은 기존 등급별 컬러 클래스(grade-s-plus 등)가 적용되도록 함 */
}

/* 등급별 색상 - grade-text-large에도 적용 */
.grade-text-large.grade-s-plus {
    color: #ff2b2b !important;
    text-shadow: 0 0 15px rgba(255, 43, 43, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.grade-text-large.grade-s {
    color: #ffc400 !important;
    text-shadow: 0 0 10px rgba(255, 196, 0, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.grade-text-large.grade-a-plus {
    color: #d05ce3 !important;
    text-shadow: 0 0 10px rgba(208, 92, 227, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.grade-text-large.grade-a {
    color: #2b8cff !important;
    text-shadow: 0 0 10px rgba(43, 140, 255, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.grade-text-large.grade-b-plus {
    color: #00e676 !important;
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.grade-text-large.grade-b {
    color: #ffffff !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5), 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* 범용 등급 색상 클래스 (grade-title과 grade-text-large 모두에 적용) */
.grade-s-plus {
    color: #ff2b2b;
    text-shadow: 0 0 10px rgba(255, 43, 43, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.grade-s {
    color: #ffc400;
    text-shadow: 0 0 10px rgba(255, 196, 0, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.grade-a-plus {
    color: #d05ce3;
    text-shadow: 0 0 10px rgba(208, 92, 227, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.grade-a {
    color: #2b8cff;
    text-shadow: 0 0 10px rgba(43, 140, 255, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.grade-b-plus {
    color: #00e676;
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.grade-b {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* grade-title에도 등급 색상 적용 (더 강한 효과) */
.grade-title.grade-s-plus {
    text-shadow: 0 0 15px rgba(255, 43, 43, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.grade-title.grade-s {
    text-shadow: 0 0 12px rgba(255, 196, 0, 0.7), 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.grade-title.grade-a-plus {
    text-shadow: 0 0 12px rgba(208, 92, 227, 0.7), 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.grade-title.grade-a {
    text-shadow: 0 0 12px rgba(43, 140, 255, 0.7), 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.grade-title.grade-b-plus {
    text-shadow: 0 0 12px rgba(0, 230, 118, 0.7), 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.grade-title.grade-b {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* grade-text-large는 더 큰 글씨이므로 더 강한 효과 유지 */
.grade-text-large.grade-s-plus {
    text-shadow: 0 0 15px rgba(255, 43, 43, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}

/* ============================================
   강제 너비 확장 오버라이드 (최우선 적용)
   ============================================ */

/* ============================================
   강제 너비 확장 오버라이드 (최우선 적용)
   ============================================ */

/* 대시보드 전체 레이아웃 확장 */
.dashboard {
    max-width: 98vw !important; /* 화면 가로를 거의 다 쓰도록 설정 */
    width: 98vw !important;
    margin: 0 auto !important;
    padding: 20px !important;
    justify-content: center !important;
}

/* 오버라이드 코드 제거 - 원래 레이아웃으로 복구됨 */

/* ============================================
   툴팁 스타일 (짤림 방지)
   ============================================ */

/* 툴팁 위치 하단 이동 (CSS 강제 적용) */
.tooltip-inner {
    /* [핵심] 기존 위치 속성 초기화 */
    top: auto !important;
    bottom: auto !important;
    right: auto !important;
    margin: 0 !important;

    /* [핵심] 위치: 아이콘 바로 아래 (130% 지점) */
    position: absolute !important;
    top: 130% !important; 
    left: 50% !important;
    transform: translateX(-50%) !important; /* 가로 가운데 정렬 */
    
    /* 레이어 최상위 설정 */
    z-index: 999999 !important;
    
    /* 크기 및 텍스트 설정 */
    width: max-content !important;
    min-width: 200px !important;
    max-width: 300px !important;
    white-space: pre-wrap !important; /* 줄바꿈 허용 */
    text-align: left !important;
    
    /* 디자인 (가독성 확보) */
    background-color: rgba(15, 15, 15, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff !important;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    pointer-events: none; /* 마우스 간섭 방지 */
}

/* (선택) 말풍선 꼬리를 위쪽으로 향하게 수정 */
.tooltip-inner::after {
    content: '';
    position: absolute;
    bottom: 100%; /* 툴팁 상단에 붙임 */
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    /* 투명 / 투명 / 검정색(아래쪽) / 투명 */
    border-color: transparent transparent rgba(15, 15, 15, 0.98) transparent;
}

/* 툴팁 화살표 (기존 호환) */
.tooltip-arrow {
    z-index: 999999 !important;
}

/* ============================================
   새로운 툴팁 스타일 (Cache Busting)
   ============================================ */

/* 1. 부모 요소 (물음표 아이콘 감싸는 태그) 설정 */
.tooltip-icon {
    position: relative;
    cursor: help;
    z-index: 100;
}

/* 2. 새로운 툴팁 박스 스타일 (무조건 아래로) */
.custom-tooltip-box {
    /* [위치 강제] 아이콘 정중앙 아래쪽 */
    position: absolute !important;
    top: 140% !important; /* 아이콘 밑으로 넉넉히 */
    left: 50% !important;
    transform: translateX(-50%) !important;
    
    /* 기존 위치 속성 초기화 */
    bottom: auto !important;
    right: auto !important;
    margin: 0 !important;
    
    /* [크기 및 모양] */
    width: max-content !important;
    min-width: 160px;
    /* 배경색을 진한 남색/검정 계열로 변경하여 네온 컬러가 잘 보이도록 함 */
    background-color: rgba(15, 18, 25, 0.98) !important;
    color: #fff !important;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2); /* 테두리는 은은하게 유지 */
    
    /* [텍스트] */
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.5;
    z-index: 999999 !important; /* 최상위 노출 */
    
    /* [기본 상태: 숨김] */
    display: none;
    pointer-events: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* 3. 호버 시 표시 */
.tooltip-icon:hover .custom-tooltip-box {
    display: block !important;
    visibility: visible !important;
}

/* 4. Overflow 해제 (필수) */
.grade-box, .stats-graphs {
    overflow: visible !important;
}

/* ============================================
   매치업 헤더 (챔피언 아이콘 VS 아이콘)
   ============================================ */

/* 매치업 헤더 컨테이너 */
.matchup-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px; /* VS 배지와 팀 그룹 간 간격 */
    margin-bottom: 15px; /* 타임라인 텍스트와의 간격 */
    margin-top: 10px;
}

/* 팀별 아이콘 그룹 (바텀 듀오용) */
.team-group {
    display: flex;
    align-items: center;
    gap: 4px; /* 원딜-서폿 사이 간격 */
}

/* 챔피언 아이콘 */
.matchup-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* 원형 */
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    background-color: #1a1a1a; /* 투명 이미지 대비 */
    object-fit: cover;
}

/* 아군 아이콘 강조 */
.matchup-icon.my-team {
    border-color: #00E7FF; /* 아군: 시안색 */
}

/* 적군 아이콘 강조 */
.matchup-icon.enemy-team {
    border-color: #ff4757; /* 적군: 빨간색 */
}

/* VS 배지 */
.vs-badge {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffd93d; /* 노란색 강조 */
    font-style: italic;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.8);
}
