/* 메인 컨테이너에 Flexbox 적용 */
#main-container {
    display: flex;
    flex-wrap: nowrap; /* 필요에 따라 wrap으로 변경 가능 */
    justify-content: space-between; /* 요소 사이의 여백 균등 분배 */
    align-items: flex-start; /* 세로 방향 상단 정렬 */
    margin-bottom: 30px; /* 아래쪽 여백 */
}

/* 검색 결과 영역 스타일 */
#results-container {
    margin-left: 20px;
    flex: 0 1 60%; /* 기본 너비 60% */
    margin-right: 20px; /* 오른쪽 여백 */
    max-height: 900px; /* 컨테이너의 최대 높이 설정 */
    overflow-y: auto; /* 세로 스크롤 활성화 */
    padding: 10px;
    background-color: #d5eee4; /* 배경색 설정 */
    border: 5px solid #c7bcdf; /* 경계선 추가 */
    border-radius: 3px; /* 모서리 둥글게 */
}

/* 챔피언 선택 그리드 */
.champion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); /* 80px 너비의 그리드를 채움 */
    gap: 10px;
    padding: 20px;
    background-color: #1e1e1e;
    border-radius: 10px;
}

/* 챔피언 버튼 스타일 */
.champion-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #2c2c2c;
    border: 2px solid #555;
    padding: 10px;
    border-radius: 5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}


.champion-button img {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    object-fit: cover;
}

.champion-button span {
    margin-top: 5px;
    font-size: 14px;
    color: #ffffff;
    text-align: center;
}

.champion-button:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.7);
}

/* 사이드바 영역 스타일 */
#sidebar-container {
    flex: 0 1 35%; /* 기본 너비 35% */
    max-width: 35%;
    display: flex;
    flex-direction: column; /* 세로 방향 배치 */
    overflow-x: hidden;
    margin-right: 50px;
    gap: 0px; 
}

/* 사이드바 내 섹션 공통 스타일 */
.sidebar-section {
    margin-bottom: 20px;
}


body {
    font-family: Arial, sans-serif;
    background: linear-gradient(120deg, #f3f4f6, #e2e8f0);
}

.section {
  background-color: rgb(168, 35, 151);
  padding: 30px;
  border-radius: 10px;
  margin: 20px 0;
}

#search-container {
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    position: relative; /* 제안 리스트 위치 조정을 위해 */
}

#search-box {
    width: 100px;
    padding: 10px 15px;
    border: none;
    border-radius: 25px;
    background-color: #2c2c2c;
    color: #ffffff;
    font-size: 1em;
    outline: none;
    transition: width 0.4s ease-in-out;
}

#search-box:focus {
    width: 200px;
}


/* 버튼 스타일 조정 */
#search-button, .next-game-btn, .undo-ban-btn {
    /* 기존 버튼 스타일 유지 */
    flex: 0 0 auto; /* 버튼들이 크기를 유지하도록 설정 */
    white-space: nowrap;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#search-button:hover, .next-game-btn:hover, .undo-ban-btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* 검색 결과에서 생성된 챔피언 버튼 */
.champion-button {
    padding: 0; /* 버튼 내부 여백 제거 */
    border: none; /* 테두리 제거 */
    background: none; /* 배경색 제거 */
    display: inline-block;
    margin-right: 5px; /* 버튼 간격 조정 */
}

/* 버튼 내부 이미지 스타일 */
.champion-button img {
    width: 60px; /* 고정된 너비 */
    height: 60px; /* 고정된 높이 */
    object-fit: cover; /* 이미지가 버튼 크기에 맞게 조정 */
    display: block;
}

.ban-restricted-button {
    padding: 0; /* 버튼 내부 여백 제거 */
    border: none; /* 테두리 제거 */
    background: none; /* 배경색 제거 */
    display: inline-block;
    width: 80px !important; /* 크기 늘리기, !important로 우선순위 설정 */
    height: 50px !important; /* 크기 늘리기, !important로 우선순위 설정 */
    margin-right: 15px; /* 버튼 간격 조정 */
}


/* 버튼 내부 이미지 스타일 */
.ban-restricted-button img {
    width: 150px; /* 고정된 너비 */
    height: 150px; /* 고정된 높이 */
    object-fit: cover; /* 이미지가 버튼 크기에 맞게 조정 */
    display: block;
}

h2 {
    color: #333;
}

/* 모든 게임의 벤 목록 컨테이너 스타일 */
#all-games-bans-container {
    height: 300px;
    position: relative; /* z-index 적용을 위해 position 설정 필요 */
    z-index: 10; /* 높은 z-index 값으로 다른 요소들 위에 위치 */
    width: 100%;
    max-height: 330px; /* 원하는 최대 높이로 설정 */
    overflow-y: auto; /* 내용이 넘칠 경우 세로 스크롤 생성 */
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 10px; /* 열 사이의 간격 */
    display: flex;
}

#all-games-bans-container h2 {
    font-size: 10px;
    margin-bottom: 10px;
    color: #333;
    text-align: left;
    flex-shrink: 0; /* 요소가 축소되지 않도록 설정 */
}

.game-bans-title {
    margin-top: 5px;
    font-weight: bold;
    color: #DAA520; /* 금색 */
    font-size: 20px;
    box-sizing: border-box;
    text-align: center;
}

/* 각 게임 벤 목록 스타일 */
.game-bans-list {
    margin-bottom: 10px;
    background-color: #f9f9f9;
    padding: 5px;
    border-radius: 3px;
}

/* 현재 게임 벤된 챔피언 컨테이너 */
#banned-champions-container {
    margin-bottom: 30px;
    height: 150px; /* 최대 높이 설정 */
    overflow-x: auto; /* 가로 스크롤 허용 */
    overflow-y: hidden; /* 세로 스크롤은 감춤 */
    white-space: nowrap; /* 가로로 나열되도록 설정 */
    background-color: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* 이미지 스타일 */
#banned-champions-container img {
    width: 40px; /* 고정된 너비 */
    height: 40px; /* 고정된 높이 */
    margin-right: 2px; /* 이미지 간의 간격 */
    display: inline-block; /* 이미지를 가로로 배치 */
    object-fit: cover; /* 이미지 비율 유지 */
}

/* 벤 금지 챔피언 컨테이너 */
#ban-restricted-champions-container {
    margin-bottom: 30px;
    height: 170px; /* 최대 높이 설정 */
    overflow-x: auto; /* 가로 스크롤 허용 */
    overflow-y: hidden; /* 세로 스크롤은 감춤 */
    white-space: nowrap; /* 가로로 나열되도록 설정 */
    background-color: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#ban-restricted-champions-container img {
    width: 50px; /* 고정된 너비 */
    height: 50px; /* 고정된 높이 */
    margin-right: 2px; /* 이미지 간의 간격 */
    display: inline-block; /* 이미지를 가로로 배치 */
    object-fit: cover; /* 이미지 비율 유지 */
}

/* 전체 게임 벤 목록의 챔피언 리스트 */
.game-bans-list ul {
    margin-top: 0px;
    padding: 0; /* 리스트의 기본 패딩 제거 */
    margin: 30px; /* 리스트의 기본 마진 제거 */
}

.game-bans-list li {
    margin-top: 0px;
    text-align: left; /* 텍스트를 왼쪽 정렬 */
    padding: 0px 0; /* 각 항목에 약간의 패딩 추가 (선택 사항) */
    font-size: 15px; /* 텍스트 크기 조정 */
}

/* 제안 리스트 전환 효과 */
.suggestions-list {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.suggestions-list.show {
    opacity: 1;
    visibility: visible;
}

/* 반응형 디자인 조정 */
@media (max-width: 768px) {
    #main-container {
        flex-direction: column;
    }

    #results-container,
    #sidebar-container {
        flex: 1 1 100%;
        margin-right: 0;
    }

    #all-games-bans-container {
        max-height: 150px;
    }
}

@import url('https://fonts.googleapis.com/css2?family=Black+Han+Sans&display=swap'); /* 커스텀 폰트 불러오기 */

h1 {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 3em;
  background: linear-gradient(90deg, #1050a5, #d53a3a);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent; /* 표준 속성 */
  -webkit-text-fill-color: transparent; /* 일부 오래된 브라우저에서 필요할까봐 정의*/
  text-shadow: 8px 8px 1px rgba(44, 9, 9, 0.1);
  animation: slideIn 1s ease-out;
}

@keyframes slideIn { /* slideIn 애니메이션 정의*/
    from {
      transform: translateX(-30%);
    }
    to {
      transform: translateX(0);
    }
  }

 /*기존 메인페이지에서 승률*/
.header-container {
    margin-left: 30px;
    display: flex;
    align-items: center; /* 수직 가운데 정렬 */
    justify-content: flex-start; /* 왼쪽 정렬 */
    gap: 30px; /* h1과 버튼 사이의 간격 */
}

#winrate-button, .FearlessDraft-button {
    padding: 7px 20px;
    background-color: #f31e1e;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
}

#winrate-button:hover {
    background-color: #0056b3;
}

#FearlessDraft-button:hover {
    background-color: #0056b3;
}


  /* 승률 페이지에서 사용하는 스타일 */
.winrate-container {
    text-align: center;
    margin-top: 20px;
}

#winrate-summoner-name {
    padding: 10px;
    width: 300px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#winrate-check-button {
    padding: 10px 20px;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    margin-left: 10px;
}

#winrate-check-button:hover {
    background-color: #0056b3;
}

#winrate-result-container {
    margin-top: 20px;
    text-align: center;
    font-size: 18px;
}

/* 캡처버튼 */
.action-buttons {
    display: flex;
    justify-content: left;
    margin-left: 10px;
    margin-bottom: 10px;
     z-index: 10; /* 우선순위를 높여 다른 요소 위에 표시 */
}

#capture-ban-list {
    background-color: #28a745; 
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#capture-ban-list:hover {
    background-color: #0056b3;
}