@charset "UTF-8";
.discover-controls-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #0f3460;
    padding-bottom: 15px;
}

.global-country-header {
    height: 0;
    margin: 0;
    overflow: hidden;
}

.global-country-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

#current-country-flag {
    font-size: 2.5rem;
    margin-right: 15px;
}

.chart-tabs {
    display: flex;
    gap: 10px;
}

.tab-button {
    background: none;
    border: 1px solid #0f3460;
    color: #a0a0a0;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tab-button.active, .tab-button:hover {
    color: #ffffff;
    background-color: #e94560;
    border-color: #e94560;
}

.header-controls {
    display: flex;
    justify-content: flex-end;
}

.global-country-selector {
    position: relative;
}

#selected-country-display {
    background-color: #0f3460;
    color: #e94560;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    min-width: 150px;
    justify-content: space-between;
}

#selected-country-display:hover {
    background-color: #e94560;
    color: #ffffff;
}

#selected-country-display .fas {
    margin-left: 10px;
}

.country-dropdown-panel {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    width: 300px;
    max-height: 60vh;
    overflow: hidden;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    margin-top: 5px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.country-dropdown-panel.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

#country-search-input {
    width: calc(100% - 20px);
    padding: 10px;
    margin: 10px 10px 5px 10px;
    border-radius: 6px;
    border: 1px solid #0f3460;
    background-color: #16213e;
    color: #e0e0e0;
    font-size: 1rem;
}

#country-search-input:focus {
    outline: none;
    border-color: #e94560;
}

#countries-list {
    overflow-y: auto;
    flex-grow: 1;
    padding: 0 10px 10px 10px;
}

#countries-list::-webkit-scrollbar {
    width: 6px;
}

#countries-list::-webkit-scrollbar-track {
    background: transparent;
}

#countries-list::-webkit-scrollbar-thumb {
    background-color: #0f3460;
    border-radius: 3px;
}

#countries-list::-webkit-scrollbar-thumb:hover {
    background-color: #e94560;
}

.country-option {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.country-option:hover {
    background-color: #0f3460;
}

.country-flag {
    font-size: 1.5rem;
    margin-right: 15px;
    min-width: 30px;
}

.country-name {
    font-size: 1rem;
    color: #ffffff;
}

#countries-list hr {
    border: none;
    border-top: 1px solid #0f3460;
    margin: 8px 0;
}



.playlist-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.playlist-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 1.2rem;
    color: #a0a0a0;
}

.playlist-message .fas {
    font-size: 3rem;
    margin-bottom: 1rem;
}


/* --- Mobile Responsive Styles for Discover Controls --- */
@media (max-width: 768px) {

    /* [추가] Discover 섹션의 좌우 여백 줄이기 */
    #discover-section {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* 1. 컨트롤 전체 래퍼(Wrapper) 스타일 변경 */
    .discover-controls-wrapper {
        /* flex 방향을 수직(column)으로 바꾸고, 순서를 뒤집어 국가 선택(header-controls)을 위로 올립니다. */
        flex-direction: column-reverse; 
        /* 자식 요소들이 컨테이너의 전체 너비를 차지하도록 합니다. */
        align-items: stretch;
        /* 위아래 요소(국가 선택, 탭 버튼) 사이에 간격을 줍니다. */
        gap: 15px;
        padding-bottom: 20px;
    }

    /* 2. 국가 선택 메뉴가 포함된 컨테이너 스타일 */
    .header-controls {
        justify-content: center; /* 중앙 정렬 */
        width: 100%; /* 전체 너비 사용 */
    }
    
    .global-country-selector {
        width: 100%; /* 너비를 100%로 설정 */
    }

    #selected-country-display {
        width: 100%; /* 버튼 자체도 100% 너비로 만듭니다. */
        justify-content: center; /* 버튼 내부 텍스트와 아이콘을 중앙에 배치합니다. */
    }

    /* 3. 탭 버튼 컨테이너 스타일 */
    .chart-tabs {
        width: 100%; /* 전체 너비 사용 */
        justify-content: center; /* 탭 버튼들을 중앙에 배치 */
    }
    
    /* 4. 개별 탭 버튼 스타일 */
    .tab-button {
        /* flex-grow를 1로 설정하여 탭들이 남는 공간을 균등하게 나눠 갖도록 합니다. */
        flex-grow: 1;
        text-align: center; /* 버튼 안의 텍스트를 중앙 정렬합니다. */
        padding: 10px 5px; /* 모바일에 맞게 패딩을 조절합니다. */
        font-size: 0.85rem; /* 폰트 크기를 약간 줄여 공간을 확보합니다. */
    }
}