/* General Body Styles */
html {
    font-size: 14px;
}
body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f8f9fa;
    color: #343a40;
    margin: 0;
    padding: 0;
    /* 하단 고정 네비게이션이 가리지 않도록 여백 확보 */
    padding-bottom: 80px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Support 섹션 스타일 ===== */

/* 헬퍼 팀원 지원 스타일 */
.support-helper-section {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.support-helper-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.support-helper-date {
    color: #6c757d;
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

.support-helper-image-container {
    text-align: center;
    margin-bottom: 20px;
}

.support-helper-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 아이디 기부 스타일 */
.support-id-section {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.support-id-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.support-id-date {
    color: #6c757d;
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

.support-id-image-container {
    text-align: center;
    margin-bottom: 20px;
}

.support-id-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 모금 스타일 */
.support-fundraising-section {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.support-fundraising-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.support-fundraising-date {
    color: #6c757d;
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

.support-fundraising-image-container {
    text-align: center;
    margin-bottom: 20px;
}

.support-fundraising-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 다운로드 가이드 스타일 (아이디 생성과 동일하게) */
.guide-download-section {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.download-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
}

.download-subtab {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.download-subtab.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.download-subtab:hover {
    background: #e9ecef;
}

.download-subtab.active:hover {
    background: #0056b3;
}

.guide-download-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.guide-download-date {
    color: #6c757d;
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

.guide-download-image-container {
    text-align: center;
    margin-bottom: 20px;
}

.guide-download-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Top Menu Bar */
.top-menu-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background-color: #D0E2EF; /* requested top bar color */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid #e5efad;
}

.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-menu span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #495057;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover span {
    background-color: #007bff;
}

.app-logo { height: 24px; display: block; }

.logo-btn { background:none; border:none; padding:0; cursor:pointer; display:flex; align-items:center; gap:10px; }
.app-title{ font-size:16px; font-weight:700; color:#2b2f32; white-space:nowrap; }

.menu-placeholder {
    width: 24px; /* Same width as hamburger menu for center alignment */
}

/* 사이드 메뉴 */
.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: #ffffff;
    z-index: 2000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.side-menu.active {
    left: 0;
}

.side-menu-header {
    padding: 20px;
    border-bottom: none; /* 닫기(X) 아래 구분선 제거 */
    display: flex;
    justify-content: flex-start;
}

.close-menu {
    background: none;
    border: none;
    font-size: 24px;
    color: #495057;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-menu:hover {
    background-color: #f8f9fa;
}

.side-menu-content {
    padding: 20px 0;
}

/* Accordion menu */
.menu-section { border-bottom: none; }
.menu-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent; /* 기본은 투명 (보이지 않음) */
}
.menu-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}
.menu-sublist { display: none; padding: 8px 0 14px 0; }
.menu-section.open .menu-sublist { display: block; }
.menu-section.open .menu-arrow { transform: rotate(180deg) translateY(3px); }
.menu-section.open .menu-section-header { border-bottom: 1px solid #eceff3; }

.menu-subitem {
    padding: 10px 24px 10px 32px; /* 한 탭 정도 들여쓰기 */
    font-size: 14px; /* 하위 메뉴는 더 작게 */
    color: #343a40;
    text-align: left;
    width: 100%;
    background: transparent;
    border: none;
}
.menu-subitem + .menu-subitem { margin-top: 4px; }
.menu-subitem:hover { background: #f8f9fa; }

.menu-arrow {
    font-size: 22px;
    color: #495057;
    font-weight: 500;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

/* 메뉴 오버레이 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Artist Hero Section (반응형 높이 비율을 자연스럽게) */
.artist-hero {
    width: 100%;
    aspect-ratio: 4 / 3; /* 더 세로가 넉넉한 비율 */
    max-height: none;
    min-height: 0;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 12px;
}

/* 모바일에서는 배너를 더 키움 */
@media (max-width: 480px){
  .artist-hero{
    aspect-ratio: 4 / 3; /* 모바일에서도 4:3 유지 */
    max-height: none;
    min-height: 0;
  }
}

.artist-image { width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block; }

/* Hero slider */
.hero-slider{ position:relative; width:100%; height:100%; overflow:hidden; }
.hero-track{ display:flex; width:100%; height:100%; transition:transform .35s ease; touch-action:pan-y; }
.hero-slide{ min-width:100%; height:100%; }
.hero-track{ cursor: grab; }
.hero-track.dragging{ cursor: grabbing; }
.hero-slider img{ -webkit-user-drag: none; user-select: none; }
.hero-nav{ position:absolute; top:50%; transform:translateY(-50%); background:rgba(0,0,0,.25); color:#fff; border:none; width:32px; height:32px; border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.hero-nav.prev{ left:10px; }
.hero-nav.next{ right:10px; }
.hero-dots{ position:absolute; left:0; right:0; bottom:10px; display:flex; gap:6px; justify-content:center; pointer-events:none; }
.hero-dots button{ width:8px; height:8px; border-radius:50%; border:none; background:rgba(255,255,255,.6); cursor:pointer; }
.hero-dots button.active{ background:#fff; }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Quick Links Section */
.quick-links-section{ background:#fff; border-radius:16px; padding:22px; margin-bottom:20px; border:1px solid #e9ecef; box-shadow:0 4px 20px rgba(0,0,0,0.06); }
.quick-links-section h2{ font-size:1.15rem; font-weight:500; color:#495057; margin:0 0 14px 0; }
.quick-links-list{ display:flex; flex-direction:column; gap:12px; }
.quick-link-item{ display:flex; align-items:center; gap:14px; padding:14px; border-radius:12px; border:1px solid #eef1f4; background:#f8fafc; cursor:pointer; transition:transform .15s ease, box-shadow .15s ease, background .15s ease; text-align:left; }
.quick-link-item:hover{ background:#f1f3f5; transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,0.08); }
.quick-link-icon{ width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:700; background:#D0E2EF; }
.quick-link-icon.yellow{ background:#D0E2EF; }
.quick-link-icon.green{ background:#D0E2EF; }
.quick-link-icon.blue{ background:#D0E2EF; }
.quick-link-icon.gray{ background:#D0E2EF; }
.quick-link-label{ font-size:0.98rem; font-weight:500; color:#111; }

@media (min-width: 640px){
  .quick-links-list{ flex-direction:column; }
}

/* Bottom Sheet for Quick Streaming */
.bottom-sheet-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.4); opacity:0; visibility:hidden; transition:all .2s ease; z-index:1400; }
.bottom-sheet-overlay.active{ opacity:1; visibility:visible; }
.bottom-sheet{ position:fixed; left:0; right:0; bottom:-100%; background:#fff; border-top-left-radius:18px; border-top-right-radius:18px; box-shadow:0 -10px 30px rgba(0,0,0,.15); transition:bottom .25s ease; z-index:1500; }
.bottom-sheet.active{ bottom:0; }
.sheet-inner{ padding:18px 16px calc(20px + env(safe-area-inset-bottom)) 16px; }
.sheet-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.sheet-header h3{ margin:0; font-size:1.1rem; font-weight:600; }
.sheet-close{ background:#f1f3f5; border:none; border-radius:8px; width:36px; height:36px; cursor:pointer; font-size:18px; }
.sheet-content{ max-height:65vh; overflow:auto; padding-top:6px; }
.sheet-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.sheet-btn{ display:flex; align-items:center; gap:10px; border:1px solid #e9ecef; padding:14px 12px; border-radius:12px; text-decoration:none; color:#111; font-weight:600; background:#f8fafc; }
.sheet-btn:hover{ background:#f1f3f5; }
.sheet-icon{ width:20px; height:20px; display:flex; align-items:center; justify-content:center; }

/* Guide: ID section */
.guide-id-section{ background:#fff; border:1px solid #e9ecef; border-radius:16px; padding:22px; box-shadow:0 4px 20px rgba(0,0,0,0.06); margin:20px auto; max-width:800px; }
.id-subtabs{ display:flex; gap:28px; flex-wrap:wrap; margin:6px 0 24px 0; align-items:center; padding-bottom:8px; border-bottom:1px solid #eceff3; }
.id-subtab{ background:transparent; border:none; padding:6px 0; font-weight:500; font-size:20px; color:#111; cursor:pointer; border-bottom:3px solid transparent; }
.id-subtab:hover{ color:#000; }
.id-subtab.active{ border-bottom:4px solid #111; font-weight:600; }
.guide-id-section .id-subtab{ border-bottom:3px solid transparent; }

/* Guide > Streaming 전용: 하위 탭 글자 크기 소폭 축소 */
#guideStreamingSection .id-subtab{ font-size:18px; }
@media (max-width: 480px){
  #guideStreamingSection .id-subtab{ font-size:16px; }
}

/* Vote > 투표권 모으기: 하위 탭 글자 크기 소폭 축소 */
#voteCollectSection .id-subtab{ font-size:18px; }
@media (max-width: 480px){
  #voteCollectSection .id-subtab{ font-size:16px; }
}

/* Guide > 아이디 생성: 하위 탭 글자 크기 소폭 축소 */
#guideIdSection .id-subtab{ font-size:18px; }
@media (max-width: 480px){
  #guideIdSection .id-subtab{ font-size:16px; }
}

/* Guide > 다운로드: 2단계 탭(서비스) 크기 조정 */
#downloadServiceTabs .id-subtab{ font-size:16px; }
@media (max-width:480px){
  #downloadServiceTabs .id-subtab{ font-size:14px; }
}

/* Guide > 다운로드: 카테고리 탭 하이라이트 (네비 색상) */
#downloadCategoryTabs .id-subtab{ padding:6px 10px; border-radius:8px; font-size:16px; }
#downloadCategoryTabs .id-subtab{ font-size:16px; }
#downloadCategoryTabs .id-subtab:hover{ background:#f4f9cf; }
#downloadCategoryTabs .id-subtab.active{ background:#D0E2EF; border-bottom:0; font-weight:600; }
@media (max-width:480px){
  #downloadCategoryTabs .id-subtab{ font-size:14px; }
}

/* Guide > 응원법: 앨범/곡 탭을 다운로드 스타일과 통일 */
#guideChantSection > .id-subtabs .id-subtab{ padding:6px 10px; border-radius:8px; font-size:16px; }
#guideChantSection > .id-subtabs .id-subtab.active{ background:#D0E2EF; border-bottom:0; font-weight:600; }
#guideChantSection > .id-subtabs .id-subtab:hover{ background:#f4f9cf; }
#chantTrackSubtabs .id-subtab{ padding:6px 10px; border-radius:8px; }
#chantTrackSubtabs .id-subtab.active{ background:#D0E2EF; border-bottom:0; font-weight:600; }
#chantTrackSubtabs .id-subtab:hover{ background:#f4f9cf; }
@media (max-width:480px){
  #guideChantSection > .id-subtabs .id-subtab{ font-size:14px; }
}

/* Guide > 응원법: 트랙 하위 탭 크기/스크롤 */
#chantTrackSubtabs .id-subtab{ font-size:16px; }
@media (max-width: 480px){
  #chantTrackSubtabs .id-subtab{ font-size:14px; }
}

/* Guide > 응원법: 앨범 탭 가독성 향상 (네비 바 색상 하이라이트) */
#guideChantSection > .id-subtabs .id-subtab{
  padding: 6px 10px;
  border-radius: 8px;
}
#guideChantSection > .id-subtabs .id-subtab.active{
  background: #D0E2EF;
  border-bottom: 0; /* 기본 밑줄 제거 */
  font-weight: 600;
}
#guideChantSection > .id-subtabs .id-subtab:hover{
  background: #f4f9cf;
}

/* Responsive horizontal scroll for subtab rows */
@media (max-width: 768px){
  .id-subtabs, .download-subtabs{ 
    overflow-x:auto; 
    flex-wrap:nowrap; 
    gap:18px; 
    -webkit-overflow-scrolling: touch; 
    scroll-behavior: smooth;
  }
  .id-subtab, .download-subtab{ flex:0 0 auto; }
  /* Hide scrollbar (mobile) */
  .id-subtabs{ -ms-overflow-style:none; scrollbar-width:none; }
  .id-subtabs::-webkit-scrollbar{ display:none; }
  .download-subtabs{ -ms-overflow-style:none; scrollbar-width:none; }
  .download-subtabs::-webkit-scrollbar{ display:none; }
}

/* Drag cursor for desktop dragging */
.drag-scroll{ cursor: grab; }
.drag-scroll.dragging{ cursor: grabbing; }
.guide-id-title{ display:none; }
.guide-id-date{ display:none; }
.guide-id-image-container{ background:transparent; border:none; border-radius:12px; height:auto; display:block; margin-bottom:14px; padding:0; }
.guide-id-image-container.grid-mode{ background:transparent; border:none; height:auto; display:block; padding:0; }
.guide-id-image{ width:auto; max-width:100%; height:auto; display:block; margin:0 auto; }
.guide-dual-grid{ display:block; }
.guide-dual-card{ margin-bottom:16px; }
.guide-dual-title{ font-weight:600; margin:0 0 8px 0; }
.guide-dual-img{ width:auto; max-width:100%; height:auto; display:block; }
.guide-actions{ display:flex; gap:12px; }
.guide-action-btn{ flex:1; border:1px solid #e9ecef; border-radius:10px; background:#F4F4F4; padding:12px; font-weight:600; cursor:pointer; color:#111; }
.guide-action-btn.primary{ background:#F4F4F4; color:#111; border-color:#e9ecef; }
/* YouTube Section */
.youtube-section {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.youtube-section h2 {
    font-size: 1.15rem;
    font-weight: 500;
    color: #495057;
    margin: 0;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    flex: 1;
    max-width: 150px;
}

.stat-icon {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
}

/* Streaming Section */
.streaming-section {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

/* Guide Hub (for bottom nav) */
.guide-hub { background:#fff; border:1px solid #e9ecef; border-radius:16px; padding:24px; box-shadow:0 4px 20px rgba(0,0,0,0.06); margin-bottom:24px; }
.guide-hub h2 { font-size:1.3rem; margin:0 0 16px 0; color:#212529; }
.hub-grid { display:grid; grid-template-columns:1fr; gap:14px; }
.hub-card { display:flex; flex-direction:row; align-items:center; justify-content:flex-start; gap:12px; text-decoration:none; color:#111; background:#f5f7f9; border:1px solid #eef1f4; border-radius:12px; padding:16px; }
.hub-emoji { display:none; }
.hub-icon { width:28px; height:28px; display:block; }
.hub-title { font-weight:600; font-size:1.1rem; }

/* 가이드 메인 카드 2열 배치 */
@media (min-width:560px){
  .hub-grid { grid-template-columns:1fr 1fr; }
}

@media (min-width:560px){
  .hub-grid { grid-template-columns:1fr 1fr; }
}

.streaming-section h2 {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #495057;
    text-align: left;
}

.streaming-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.streaming-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.streaming-item:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.streaming-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 2px;
}

.bottom-actions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.action-btn {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 10px 8px;
    color: #495057;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.action-btn:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Main Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.nav-item {
    color: #495057;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.nav-item:hover {
    background-color: #e9ecef;
}

.nav-item.active {
    background-color: #0d6efd;
    color: #fff;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Chart Status Section */
.chart-status-section {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h2 {
    font-size: 1.15rem;
    font-weight: 500;
    color: #495057;
    margin: 0;
}

.update-time {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

/* Chart Grid */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.chart-item {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    border: 1px solid #f0f0f0;
    min-height: 56px;
    height: 56px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chart-item:not(:last-child) {
    margin-bottom: 8px;
}

.chart-item:hover {
    background-color: #fafafa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.chart-service {
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 2px;
}

.service-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 32px;
    justify-content: center;
}

.service-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #202124;
    line-height: 1.2;
}

.service-detail {
    font-size: 0.75rem;
    color: #5f6368;
    line-height: 1.2;
}

.chart-rank {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 60px;
    width: 60px;
}

.rank-display {
    font-size: 1.1rem;
    font-weight: 600;
    color: #202124;
}



.rank-change {
    font-size: 0.7rem;
    font-weight: 500;
}

.rank-change.up {
    color: #ea4335;
}

.rank-change.down {
    color: #1a73e8;
}

.rank-change.no-change {
    color: #5f6368;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Card Styles */
.card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.card h2 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #495057;
    display: flex;
    align-items: center;
}



/* Rank Grid */
.rank-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.rank-card {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.rank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rank-service-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    display: flex;
    align-items: center;
}

.service-logo {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 50%;
}

.rank-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.rank-badge.in-chart {
    background-color: #d1e7dd;
    color: #0f5132;
}

.rank-badge.out-chart {
    background-color: #f8d7da;
    color: #842029;
}

.rank-info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.rank-number {
    font-size: 1.8rem;
    font-weight: 600;
    color: #212529;
}

.rank-change {
    font-size: 0.95rem;
    font-weight: 600;
}

.rank-change.up {
    color: #ea4335;
}

.rank-change.down {
    color: #1a73e8;
}

.rank-change.new {
    color: #ea4335;
    font-weight: 800;
}

/* Chart Layout */
.chart-layout {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-layout .card:last-child {
    min-height: 400px; /* 차트 카드의 최소 높이 설정 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chart-layout canvas {
    max-height: 350px; /* 캔버스의 최대 높이 설정 */
    width: 100% !important;
    height: 100% !important;
}

/* Streaming & Action Links */
.streaming-links, .radio-links, .group-buy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.streaming-btn, .btn {
    flex-grow: 0;
    flex-basis: auto;
    text-align: center;
    padding: 10px 15px;
    border-radius: 25px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.streaming-btn:hover, .btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn {
    background-color: #0d6efd;
}

/* YouTube Section */
.youtube-content { display: block; }

.youtube-section .video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.youtube-section .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.youtube-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }

.youtube-stat-item {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.youtube-stat-item:hover {
    background-color: #e8eaed;
}

.youtube-stat-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.youtube-stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.youtube-stat-label {
    font-size: 0.8rem;
    color: #5f6368;
    font-weight: 500;
}

.youtube-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: #202124;
}

.youtube-section .youtube-stats-display {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    gap: 10px;
}

.youtube-section .stat-item {
    flex: 1;
    background-color: #f0f2f5;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.youtube-section .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.youtube-section .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #dc3545; /* YouTube red */
}

.youtube-section .youtube-btn {
    display: block;
    width: 100%;
    background-color: #dc3545; /* YouTube red */
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s;
}

.youtube-section .youtube-btn:hover {
    background-color: #c82333;
}

/* Footer */
.footer {
    padding: 10px 12px calc(18px + env(safe-area-inset-bottom)) 12px;
    background-color: #ffffff;
    border-top: 1px solid #e9ecef;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-width: 560px;
    margin: 0 auto;
}

.footer-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 4px;
}

.footer-icon-img { width: 28px; height: 28px; display: block; }

.footer-label {
    font-size: 0.78rem;
    color: #6c757d;
    font-weight: 500;
}

/* Service Colors */
.melon { background-color: #ffffff; }
.genie { background-color: #ffffff; }
.bugs { background-color: #ffffff; }
.vibe { background-color: #ffffff; }
.flo { background-color: #ffffff; }

/* legacy guide tabs/styles removed */

/* Responsive Design */
@media (max-width: 992px) {
    .chart-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .top-menu-bar {
        padding: 12px 15px;
    }
    
    .app-title { font-size: 14px; }
    
    .artist-hero {
        max-height: 250px;
    }
    
    .artist-image {
        height: 250px;
    }
    
    .chart-status-section,
    .youtube-section,
    .streaming-section {
        padding: 20px;
    margin-bottom: 20px;
}

    .chart-header h2 {
        font-size: 1.2rem;
    }
    
    .update-time {
        font-size: 0.8rem;
    }
    
    .youtube-section h2,
    .streaming-section h2 {
        font-size: 1.2rem;
    }
    
    .chart-grid {
        gap: 6px;
    }
    
    .chart-item {
        padding: 10px 12px;
        min-height: 52px;
        height: 52px;
    }
    
    .chart-rank {
        min-width: 50px;
        width: 50px;
    }
    
    .service-icon {
        width: 28px;
        height: 28px;
    }
    
    .service-info {
        min-height: 30px;
    }
    
    .service-name {
        font-size: 0.85rem;
    }
    
    .service-detail {
        font-size: 0.7rem;
    }
    
    .rank-display {
        font-size: 1rem;
    }
    
    .rank-change {
        font-size: 0.65rem;
    }
    
    .youtube-content {
        grid-template-columns: 1fr 250px;
        gap: 15px;
    }
    
    .youtube-stat-item {
        padding: 12px;
    }
    
    .youtube-stat-icon {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }
    
    .youtube-stat-value {
        font-size: 1rem;
    }
    
    .video-stats {
        gap: 15px;
    }
    
    .stat-item {
        padding: 12px 15px;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .footer {
        padding: 12px 15px calc(20px + env(safe-area-inset-bottom)) 15px;
    }
    
    .footer-nav {
        max-width: 420px;
    }
    
    .footer-item {
        padding: 6px;
    }
    
    .footer-icon {
        font-size: 1.1rem;
    }
    
    .footer-label {
        font-size: 0.7rem;
    }
    
    .streaming-grid {
        gap: 10px;
    }
    
    .streaming-item {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    .streaming-icon {
        width: 22px;
        height: 22px;
    }
    
    .action-btn {
        padding: 8px 6px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .top-menu-bar {
        padding: 10px 12px;
    }
    
    .app-title { font-size: 12px; }
    
    .artist-hero {
        max-height: 200px;
    }
    
    .artist-image {
        height: 200px;
    }
    
    .chart-status-section,
    .youtube-section,
    .streaming-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .chart-header h2 {
        font-size: 1.1rem;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .update-time {
        font-size: 0.75rem;
    }
    
    .youtube-section h2,
    .streaming-section h2 {
        font-size: 1.1rem;
    }
    
    .chart-grid {
        gap: 6px;
        grid-template-columns: 1fr;
    }
    
    .chart-item {
        padding: 10px 12px;
        min-height: 48px;
        height: 48px;
    }
    
    .chart-rank {
        min-width: 45px;
        width: 45px;
    }
    
    .service-icon {
        width: 26px;
        height: 26px;
    }
    
    .service-info {
        min-height: 28px;
    }
    
    .service-name {
        font-size: 0.8rem;
    }
    
    .service-detail {
        font-size: 0.65rem;
    }
    
    .rank-display {
        font-size: 0.95rem;
    }
    
    .rank-change {
        font-size: 0.6rem;
    }
    
    .youtube-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .youtube-stats-grid {
        flex-direction: row;
        gap: 8px;
    }
    
    .youtube-stat-item {
        flex: 1;
        padding: 10px;
    }
    
    .youtube-stat-icon {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
    
    .youtube-stat-label {
        font-size: 0.7rem;
    }
    
    .youtube-stat-value {
        font-size: 0.9rem;
    }
    
    .video-stats {
        gap: 12px;
        flex-direction: column;
    }
    
    .stat-item {
        padding: 10px 12px;
        max-width: none;
    }
    
    .stat-value {
        font-size: 0.95rem;
    }
    
    .footer {
        padding: 10px 12px calc(18px + env(safe-area-inset-bottom)) 12px;
    }
    
    .footer-nav {
        max-width: 380px;
    }
    
    .footer-item {
        padding: 4px;
    }
    
    .footer-icon {
        font-size: 1rem;
    }
    
    .footer-label {
        font-size: 0.65rem;
    }
    
    .streaming-grid {
        gap: 8px;
    }
    
    .streaming-item {
        padding: 10px;
        font-size: 0.8rem;
        gap: 8px;
    }
    
    .streaming-icon {
        width: 20px;
        height: 20px;
    }
    
    .bottom-actions {
        gap: 6px;
    }
    
    .action-btn {
        padding: 8px 4px;
        font-size: 0.65rem;
    }
}

.card h2 small {
    font-size: 0.6em; /* 기존 폰트 크기의 0.6배 */
    font-weight: normal;
    margin-left: 10px;
    color: #6c757d;
}