@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

body {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    max-width: 800px; /* 최대 너비 설정 */
    margin: 0 auto;
}

.card {
    border: 1px solid #ccc;
    border-radius: 8px;
    margin: 10px;
    padding: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.card:hover {
    background-color: #f0f0f0;
}

.content {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* 모달 배경 스타일 */
.modal {

    margin: 0 auto;
    display: none; /* 기본적으로 숨김 */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* 반투명 배경 */
}

/* 모달 내용 스타일 */
.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 중앙 정렬 */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* 폭 */
}

/* 닫기 버튼 스타일 */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

ul {
    list-style-type: none; /* 불릿 제거 */
    padding: 0; /* 기본 패딩 제거 */
    margin: 0; /* 기본 마진 제거 */
}

/*반응형으로 만들기*/
@media (max-width: 768px) {
    .header, .footer {
        font-size: 14px; /* 작은 화면에서 글자 크기 조정 */
    }

    .content {
        padding: 10px; /* 패딩 줄이기 */
    }
}

@media (max-width: 480px) {
    .header, .footer {
        font-size: 12px; /* 더 작은 화면에서 글자 크기 조정 */
    }

    .content {
        padding: 5px; /* 패딩 더 줄이기 */
    }
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.hamburger {
    font-size: 30px;
    cursor: pointer;
    position: fixed; /* 고정 위치 */
    top: 20px;
    right: 20px; /* 오른쪽 상단 */
    z-index: 1000; /* 다른 요소 위에 표시 */
}

.menu-trigger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 40px;
    height: 30px;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.menu-trigger span {
    display: block;
    width: 100%;
    height: 4px;
    background-color: black;
}

.menu {
    position: fixed; /* 고정 위치 */
    top: 0;
    right: -300px; /* 화면 밖으로 초기 위치 설정 */
    width: 200px; /* 메뉴 너비 */
    height: 100%; /* 전체 높이 */
    background-color: white; /* 메뉴 배경색 */
    color: white; /* 글자색 */
    padding: 20px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5); /* 그림자 */
    transition: right 0.3s ease; /* 부드러운 전환 */
    z-index: 1000;
}

.menu-header {
    display: flex; /* 플렉스 박스 사용 */
    justify-content: flex-end; /* 오른쪽 정렬 */
    margin-bottom: 20px; /* 버튼과 내용 간 간격 */
}

.menu.active {
    right: 0; /* 활성화 시 오른쪽으로 이동 */
}

.menu li {
    padding: 10px 20px; /* 리스트 항목 패딩 */
}

/* 링크 스타일 */
.menu a {
    text-decoration: none; /* 기본 링크 스타일 제거 */
    color: black; /* 링크 텍스트 색상 */
    display: block; /* 전체 영역 클릭 가능 */
}

/* 링크 호버 스타일 */
.menu a:hover {
    color: blue; /* 마우스 호버 시 링크 색상 변경 */
}

button{
    background-color: #f8f9fa; /* 배경색 */
    border : 1px solid #D2D3D3;
    padding: 5px 5px;
    color: black;              /* 글자색 */
    border-radius: 5px;       /* 둥글게 만들기 */
    cursor: pointer;          /* 포인터 커서 */
    transition: background-color 0.3s; /* 부드러운 배경색 변화 */
}

.close-menu {
    background: none;
    border: none;
    font-size: 40px;
    color: black; /* 글자색 수정 */
    cursor: pointer;
    margin-bottom: 20px; /* 버튼과 내용 간 간격 */
}

.header-container {
    display: flex;
    justify-content: space-between; /* 제목과 버튼을 양쪽 끝으로 배치 */
    align-items: center; /* 세로 정렬 */
    padding: 20px; /* 여백 추가 */
    margin: 10px;
}

h3 {
    margin: 0; /* 기본 마진 제거 */
}

.login-button {
    /* 버튼 스타일을 여기에 추가할 수 있습니다. */
    color: #8F9194;
    padding: 10px 15px; /* 버튼 패딩 */
    background-color: #ffffff; /* 버튼 배경색 */
    border: none; /* 테두리 제거 */
    border-radius: 5px; /* 둥근 모서리 */
    cursor: pointer; /* 포인터 커서 */
}

.modal {
    display: none; /* 기본적으로 숨김 */
    position: fixed; /* 고정 위치 */
    z-index: 1; /* 최상위 */
    left: 0;
    top: 0;
    width: 100%; /* 전체 너비 */
    height: 100%; /* 전체 높이 */
    overflow: auto; /* 스크롤 가능 */
    background-color: rgba(0, 0, 0, 0.5); /* 반투명 배경 */
}

.modal-content {
    text-align: center;
    background-color: #fff;
    margin: 15% auto; /* 중앙 정렬 */
    padding: 20px;
    border: 1px solid #888;
    width: 300px; /* 너비 설정 */
    border-radius: 5px; /* 모서리 둥글게 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.overlay {
    display: none; /* 기본적으로 숨김 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* 반투명 검정 배경 */
    z-index: 999; /* 메뉴보다 위에 표시 */
}

.overlay.active {
    display: block; /* 오버레이 활성화 시 표시 */
}

.image-container {
    display: inline-block;
    background-color: #ffffff; /* 원하는 배경색 코드 */
    padding: 10px; /* 이미지와 배경 사이 여백 */
    border-radius: 10px; /* 둥근 모서리 */
}
.image-container img {
    display: block;
    width: 17px; /* 원하는 이미지 크기로 조정 */
    height: 17px;
}

.tab-container {
    display: flex;
    justify-content: center;
    border-bottom: 2px solid #ddd;
    width: 80%;
    margin: 0 auto 25px;
}

.tab {
    flex: 1;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: gray;
    background-color: white;
    border: none;
    outline: none;
    text-decoration: none;
}

.tab.active {
    color: black;
    border-bottom: 3px solid black;
}

#first-grade-banner {
    position: relative;
    height: 50px;
    overflow: hidden;
}

.ranking-item {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    opacity: 0;
    animation-name: slideUp;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
}

@keyframes slideUp {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    40% {  /* 이전보다 더 긴 시간 동안 올라오는 구간 */
        transform: translateY(0);
        opacity: 1;
    }
    80% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}


.shiny-text {
    display: block;
    max-width: 70%;
    margin: 30px auto;
    padding: 15px;
    border: 1px solid #ADD8E6; /* 기존 보더 색상 유지 */
    border-radius: 10px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(90deg, #00bfff, #1e90ff, #00ffff, #87cefa, #1e90ff, #00bfff);
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradientLoop 5s ease infinite;
}

/* 애니메이션 */
@keyframes gradientLoop {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.shiny-text * {
    background: inherit;
    background-clip: inherit;
    -webkit-background-clip: inherit;
    color: inherit;
}

.submenu {
    display: none;
    list-style: none;
    padding-left: 5px;
}

.submenu.show {
    display: block;
}
