body {
    font-family: Arial, sans-serif;
    background-color: #1e1e1e;
    padding: 20px;
}

/* 컨테이너 스타일 추가 */
.container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px; /* 요소 간 간격 */
    max-width: 1200px; /* 원하는 최대 너비 설정 */
    margin: 0 auto; /* 중앙 정렬 */
}


h1 {
    font-family: 'Roboto', sans-serif; /* Google Fonts에서 검증된 폰트 */
    font-size: 4rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #ff4400, #ff0077, #0004ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.5);
    animation: glow 2s infinite;
}

/* 애니메이션 효과 */
@keyframes glow {
    0%, 100% {
        text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.5),
                     0 0 20px #0c0c0a,
                     0 0 40px #ffd700,
                     0 0 60px #ff7f50;
    }
    50% {
        text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.5),
                     0 0 30px #ffcc00,
                     0 0 60px #ffd700,
                     0 0 90px #ff7f50;
    }
}

h2 {
    text-align: center;
    color: #ffffff;
}

.champion-icon {
    width: 55px;
    height: 55px;
    margin-right: 5px;
    vertical-align: middle;
}

.champion-icons img {
    margin-right: 4px;
}

/* 경기 결과 입력 폼 너비 수정 */
#result-input {
    width: 100%; /* 60%에서 100%로 변경 */
    /* 기존 스타일 유지 */
    margin: 20px 0;
}

/* 승률 표시 영역 너비 수정 */
#winrate-display {
    width: 100%; /* 35%에서 100%로 변경 */
}

.line-input {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

input[type="text"], select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-right: 10px;
    flex: 1;
}

button {
    padding: 10px 20px;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

ul {
    list-style-type: none;
    padding: 0;
}

li {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 검색 입력 필드 스타일 */
#search-player {
    display: block;
    margin: 0 auto 20px auto;
    padding: 8px;
    width: 200px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* 라벨 스타일 */
.line-label {
    width: 50px;
    text-align: center;
    margin-right: 10px;
    box-sizing: border-box;
}

/* 승리팀, 패배팀 선택 드롭다운 너비를 고정 */
.winner-select, .loser-select {
    width: 200px;
    margin-right: 10px;
    padding: 5px;
    box-sizing: border-box;
}

/* 챔피언 입력 필드 너비 고정 */
.champion-input {
    width: 160px;
    margin-right: 10px;
    padding: 5px;
    box-sizing: border-box;
}

/* 테이블 스타일 */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    font-family: 'Arial', sans-serif;
    background-color: #616060;
    color: white;
}

.ranking-table th, .ranking-table td {
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid #444;
}

.ranking-table thead {
    background-color: #1a1a1a;
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
}

.ranking-table tbody tr {
    transition: background-color 0.2s ease;
}

.ranking-table tbody tr:hover {
    background-color: #333333;
}

/* 순위 텍스트 스타일 */
.ranking-table td:first-child {
    font-size: 2rem; /* 텍스트 크기 조정 */
    font-weight: bold; /* 텍스트 굵게 */
    color: #ffd700; /* 황금색으로 설정 */
    text-align: left; /* 중앙 정렬 */
}

/* 플레이어 이름 스타일링 */
.ranking-table td:nth-child(2) a {
    color: #ffffff; /* 텍스트 색상을 흰색으로 설정 */
    text-decoration: none; /* 밑줄 제거 */
    font-weight: bold; /* 텍스트를 굵게 */
    font-size: 16px; /* 폰트 크기 증가 */
    padding: 5px 10px; /* 텍스트 주변에 패딩 추가 */
    border-radius: 4px; /* 모서리를 둥글게 */
    background-color: #212221; /* 배경색을 파란색으로 설정 */
    transition: background-color 0.3s ease, color 0.3s ease; /* 부드러운 전환 효과 */
    display: inline-block; /* 인라인 블록으로 설정하여 패딩이 적용되도록 함 */
}

/* 플레이어 이름에 마우스 호버 시 스타일 변경 */
.ranking-table td:nth-child(2) a:hover {
    background-color: #0056b3; /* 배경색을 더 어두운 파란색으로 변경 */
    color: #ffffff; /* 텍스트 색상을 흰색으로 유지 */
}

/* 총 게임 수 열 중앙 정렬 */
.ranking-table td:nth-child(3) {
    text-align: center;
    vertical-align: middle;
    line-height: 1.5; /* 숫자가 세로로 더 정확히 가운데에 위치 */
    width: 80px; /* 열 너비 고정 */
}

/* 숫자 위치 오른쪽으로 살짝 이동 */
.ranking-table td:nth-child(3) .game-count {
    display: inline-block;
    justify-content: center; /* 수평 가운데 정렬 */
    padding-right: 0px; /* 숫자만 오른쪽으로 약간 이동 */
}

/* 모스트 챔피언 열의 너비 조정 */
.ranking-table th:last-child,
.ranking-table td:last-child {
    width: 300px; /* 원하는 너비로 설정 */
}

/* 테이블 셀 내부 요소 정렬 */
.ranking-table td {
    vertical-align: middle; /* 수직 중앙 정렬 */
}

/* 승률 셀 내부 요소 정렬을 위한 컨테이너 */
.winrate-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* 승률 텍스트 스타일 */
.winrate-text {
    font-weight: bold;
    margin-bottom: 5px;
    display: center;
    color: #ffffff; /* 텍스트 색상 변경 */
}

/* 승률 바의 기본 스타일 */
.winrate-bar {
    width: 100%;
    height: 15px;
    background-color: #d3d3d3;
    border: 1px solid #ccc; /* 테두리 추가 */
    border-radius: 5px;
    overflow: hidden;
    margin-top: 5px;
}

/* 승률 바의 실제 승률 부분 */
.winrate-bar-inner {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* 승률이 50% 이상일 때 초록색 */
.winrate-bar-inner.winrate-green {
    background-color: #28a745;
}

/* 승률이 50% 미만일 때 빨간색 */
.winrate-bar-inner.winrate-red {
    background-color: #dc3545;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: auto; /* 전체 모달에 스크롤 추가 */
}

.modal.active {
    display: flex; /* active 클래스가 추가되면 표시 */
}

.modal-content {
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    max-height: 80vh;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}

#player-info {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    max-height: 80vh; /* 최대 높이 설정 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* 모달 내부에 스크롤 추가 */
}

#player-info h2 {
    margin-top: 0;
}

#player-info button {
    margin-top: 20px;
}

/* 반응형 디자인 수정 */
@media screen and (max-width: 800px) {
    .container {
        flex-direction: column;
    }

    #result-input, #winrate-display {
        width: 100%;
    }
}

#lane-winrate-list,
#champion-winrate-list {
    list-style-type: none;
    padding: 0;
}

#lane-winrate-list li,
#champion-winrate-list li {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

#lane-winrate-list li img,
#champion-winrate-list li img {
    margin-right: 10px;
    width: 50px;
    height: 50px;
}
