/* style.css */

/* 전체 페이지 기본 스타일 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

/* 고정 헤더 스타일 */
h1 {
    text-align: center;
    margin: 0;
    position: fixed; /* 헤더 고정 */
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 1000; /* 다른 요소 위에 배치 */
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 고정 필터 스타일 */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: fixed; /* 필터 고정 */
    top: 60px; /* 상단 고정 헤더 아래 위치 */
    left: 0;
    width: 100%;
    background-color: #fff;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* 헤더 위에 배치 */
    box-sizing: border-box; /* 패딩과 보더를 박스 크기에 포함 */
}

/* 필터 내부 스타일 */
.filter-container label {
    margin-right: 10px;
    font-weight: bold;
}

.filter-container select, .filter-container input {
    margin-right: 20px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* 페이지 컨텐츠 여백 */
main {
    margin-top: 130px; /* 필터와 헤더의 총 높이만큼 여백 추가 */
}

/* 테이블을 감싸는 컨테이너 */
.table-wrapper {
    overflow-x: auto; /* 가로 스크롤 활성화 */
    margin: 0 auto;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#statsTable {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    table-layout: auto; /* 열 너비 자동 조정 */
}

#statsTable th, #statsTable td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    overflow: hidden;
    text-overflow: ellipsis; /* 넘치는 텍스트를 생략 부호로 표시 */
    white-space: nowrap; /* 텍스트 줄바꿈 방지 */
}

#statsTable th {
    background-color: #f4f4f4;
    cursor: pointer;
}

#statsTable th.sorted-asc::after {
    content: '▲';
    margin-left: 5px;
}

#statsTable th.sorted-desc::after {
    content: '▼';
    margin-left: 5px;
}
