/* 스크롤 부드럽게 하기 */
html {
    scroll-behavior: smooth; /* 링크 클릭 시 부드럽게 스크롤되도록 설정 */
    height: 100%;
    margin: 0;
}

/* Flex 레이아웃 설정 */
body {
    display: flex;
    height: 100%;
    margin: 0;
    padding-top: 50px;
    flex-direction: column;
    justify-content: space-between; /* 푸터를 항상 하단에 고정 */
    background: url('../image/background3.png') no-repeat center center fixed;
    background-size: cover;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
    color: #000; /* 글자 색 설정 */
}


/* 메인 컨테이너 중앙 정렬 */
#mainContainer {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
    background-size: cover;
    flex: 1; /* 남은 공간을 모두 차지 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 세로 중앙 정렬 */
    align-items: center; /* 가로 중앙 정렬 */
    padding: 20px;
    text-align: center;
}

/* 푸터 관련 스타일 */
#footerContainer {
    font-size: 13px;
    background-color: #333; /* 푸터 배경색 */
    color: white;
    text-align: center;
    padding: 20px 0;
    width: 100%; /* 전체 너비 차지 */
}

/* 네비게이션 바 관련 */
.navbar-brand {
    margin: 0 auto; /* 네비게이션 아이템을 중앙 정렬 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-brand img {
    padding-left: 2px; /* 왼쪽 여백 조정 */
    padding-right: 5px; /* 오른쪽 여백 추가 */
    height: 35px;
    width: 35px;
    border-radius: 50%;
    object-fit: cover;
}

/* 네비게이션 바 고정 */
.navbar {
    position: fixed; /* 스크롤해도 화면 상단에 고정 */
    top: 0; /* 화면 상단에 위치 */
    left: 0; /* 화면 왼쪽에 위치 */
    width: 100%; /* 전체 너비 차지 */
    z-index: 1000; /* 다른 콘텐츠보다 위에 표시되도록 설정 */
    color: white;
}

/* 네비게이션 바 관련 */
.navbar-nav {
    display: flex; /* 메뉴 항목들을 가로로 나열 */
    align-items: center; /* 항목들을 수직 중앙 정렬 */
    padding-left: 0;
}

/* 기존 디자인 삭제 후 이모지 위치만 조정 */
.rank-card {
    background-color: rgb(255, 255, 255, 0.1);
    margin-top: 35px;
    border: 1px solid #ddd;
    position: relative;
    border-radius: 15px;
    padding: 20px;
    width: 280px;
    text-align: center;
}

.player-avatar {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    margin: 0 auto 15px;
    display: block;
    object-fit: cover;
}

.top-player-avatar {
    width: 160px;
    height: 160px;
}

.player-name {
    font-size: 18px;
    color: white;
    font-weight: 500;
    margin-bottom: 5px;
    word-break: break-all;
    font-weight: bold; /* 굵게 설정 */
}

.player-amount {
    color: white;
    font-size: 16px;
    font-weight: 700;
}

/* 이모지 왼쪽 모서리로 이동 */
.medal-icon {
    font-size: 50px; /* 이모지 크기 */
    position: absolute;
    top: -25px;  /* 카드 상단으로 위치 */
    left: -25px; /* 카드 왼쪽 모서리로 이동 */
}

.container-fluid-1 {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.page-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
    margin-top: 0px;
    font-weight: bold;
    color: white;
}

.top-ranks {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
}

.other-ranks {
    background-color: rgb(255, 255, 255, 0.1);
    border-radius: 15px;
    color: white;
    font-weight: bold; /* 굵게 설정 */
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    overflow: hidden;
}

.rank-row {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
}

.rank-row:last-child {
    border-bottom: none;
}

.rank-number {
    width: 60px;
    font-size: 20px;
    font-weight: bold;
    color: white;
}

.rank-player {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.rank-player img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
}

.rank-player span {
    font-size: 16px;
    word-break: break-all;
}

.rank-amount {
    background-color: #f8f9fa;
    padding: 8px 18px;
    border-radius: 20px;
    color: #666;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

/* 모바일에서 1위, 2위, 3위 중앙 정렬 및 1위 최상단 배치 */
@media (max-width: 768px) {
    .top-ranks {
        flex-direction: column;
        align-items: center; /* 중앙 정렬 */
        gap: 20px;
    }

    .rank-1 {
        order: -1; /* 1위를 가장 먼저 배치 */
    }

    .rank-card {
        width: 240px; /* 모바일에서 카드 크기 축소 */
    }
    .navbar {
        display: flex;
        justify-content: flex-start; /* 로고와 메뉴를 왼쪽 정렬 */
        align-items: center;
    }

    .navbar-brand {
        display: flex;
        align-items: center;
        justify-content: flex-start; /* 로고를 왼쪽 정렬 */
        margin-left: 0.01rem;
        font-size: 1.25rem;
    }

    .navbar-brand img {
        height: 35px;
        width: 35px;
        border-radius: 50%;
        object-fit: cover;
    }

    /* 네비게이션 메뉴 왼쪽 정렬 */
    .navbar-nav {
        display: flex;
        justify-content: flex-start; /* 메뉴 항목들을 왼쪽 정렬 */
        align-items: center;
        width: auto;
    }

    .nav-item {
        text-align: left;
        margin-right: auto;
    }

    /* 메뉴 버튼은 그대로 중앙으로 두기 */
    .navbar-toggler {
        margin-left: auto; /* 메뉴 버튼을 오른쪽 끝에 위치시킴 */
    }
}
