@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@300;400;500;700&display=swap');

@font-face {
    font-family: 'Ownglyph_kimkonghae';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/2408@1.0/Ownglyph_kimkonghae.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

:root {
    --background-color: #E0F2F1;
    --primary-color: #FFCDD2;
    --secondary-color: #80CBC4;
    --text-color: #37474F;
    --button-color: #FF80AB;
    --tab-active-color: #FFFFFF;
    --tab-inactive-color: #E0E0E0;
}

body {
    font-family: 'Ownglyph_kimkonghae', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 15px;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--secondary-color);
}

.ranking-note {
    margin: 0 18px 20px;
    text-align: center;
    font-size: 1rem;
    color: #546E7A;
}

button {
    font-family: 'Ownglyph_kimkonghae', sans-serif;
    background-color: var(--button-color);
    color: white;
    border: none;
    padding: 12px 24px;
    margin: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #FF4081;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.tab-container {
    display: flex;
    margin-bottom: 0;
    border-bottom: 1px solid var(--secondary-color);
    width: 100%;
}

.tab-button {
    display: inline-block;
    background-color: var(--tab-inactive-color);
    color: var(--text-color);
    border: 1px solid var(--secondary-color);
    border-bottom: none;
    padding: 10px 20px;
    margin: 0 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px 10px 0 0;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    bottom: -1px;
}

.tab-button.active {
    background-color: var(--tab-active-color);
    border-bottom: 1px solid var(--tab-active-color);
    z-index: 1;
}

.tab-content {
    display: none;
    background-color: var(--tab-active-color);
    border: 1px solid var(--secondary-color);
    border-top: none;
    /* padding: 20px; */
    border-radius: 0 0 10px 10px;
    width: 80%;
}

.tab-content.active {
    display: block;
}

#winner-rankings {
    width: 100%; /* 원하는 너비 값으로 설정 */
    margin: 0 0 0 0; /* 가운데 정렬 */
}

#female-ranking,
#male-ranking {
    width: 100%;
}

.winner-stats {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.winner-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.winner-rank {
    font-size: 1.2em;
    font-weight: 700;
    margin-right: 10px;
    min-width: 30px;
    text-align: center;
}

.winner-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
}

.image-container {
    position: relative;
    display: inline-block;
}

.medal-icon {
    position: absolute;
    top: -5px;
    right: 5px;
    width: 35px; /* 메달 아이콘의 크기를 조절하세요 */
    height: 35px;
}

.gold-medal {
    z-index: 3;
}

.silver-medal {
    z-index: 2;
}

.bronze-medal {
    z-index: 1;
}

.winner-info {
    flex-grow: 1;
}

.winner-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.winner-meta {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #546E7A;
}

.winner-bar {
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.winner-bar-fill {
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

.winner-votes {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 500;
    color: var(--text-color);
}

.winner-stats::-webkit-scrollbar {
    width: 8px;
}

.winner-stats::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.winner-stats::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

.winner-stats::-webkit-scrollbar-thumb:hover {
    background: #4DB6AC;
}

.ranking-empty {
    padding: 40px 20px;
    text-align: center;
    background-color: #f5f5f5;
    border-radius: 0 0 10px 10px;
    color: #546E7A;
}

.share-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#copy-link-message {
    text-align: center;
    color: var(--secondary-color);
    font-weight: 500;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#copy-link-message.show {
    opacity: 1;
}

#shareModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 5px 30px 30px 30px;
    border-radius: 8px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 60%;
    max-width: 300px;
}

.modal-content .share-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
}

.share-button {
    width: 40px;  /* 버튼의 너비 */
    height: 40px;  /* 버튼의 높이 */
    display: inline-block;  /* 요소를 인라인 블록으로 설정 */
    border: none;  /* 테두리 없음 */
    background: none;  /* 배경 없음 */
    cursor: pointer;
    touch-action: manipulation;
    position: relative;
    padding: 4px;
}

#closeModalBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    touch-action: manipulation;
}

#copyLinkBtn {
    width: 32px;  /* 버튼의 너비 */
    height: 32px;  /* 버튼의 높이 */
}

#twitterShareBtn {
    width: 45px;  /* 버튼의 너비 */
    height: 45px;  /* 버튼의 높이 */
}

.share-button img {
    width: 100%; 
    height: 100%; 
    display: block;
}

#notification {
    display: none;
    position: fixed;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--secondary-color);
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    z-index: 2000;
    font-size: 16px;
}

.contact-footer {
    background-color: #f3f4f6;
    padding: 2rem 0;
    margin-top: 2rem;
    text-align: center;
  }
  
.contact-footer h3 {
font-size: 1.5rem;
font-weight: bold;
color: #374151;
margin-bottom: 5px;
}

.contact-details {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 2rem;
}

.contact-item {
display: flex;
align-items: center;
}

.contact-item span, .contact-item a {
    color: #4b5563;
}

.contact-icon {
    width: 24px;  /* 원하는 크기로 조정 */
    height: 24px;  /* 원하는 크기로 조정 */
    margin-right: 10px;
}

@media (max-width: 600px) {
    #shareButton {
        font-size: 20px;
        padding: 20px 30px;
    }
    .share-button {
        font-size: 36px;
    }

    #closeModalBtn {
        font-size: 28px;
        padding: 15px;
    }
}
