/* 전체 레이아웃 */
body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #eef2f5; /* 배경색 수정 */
    color: #333;
}

.dashboard {
    max-width: 900px; /* 대시보드 너비 확장 */
    margin: 50px auto;
    background: #fff;
    padding: 30px; /* 내부 여백 확장 */
    border-radius: 12px; /* 둥근 모서리 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* 제목 스타일 */
h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2c3e50; /* 진한 회색 */
}

/* 📌 필터 디자인 개선 */
.filter {
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border: 2px solid #3498db;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 800px;
}

.filter-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter label {
    font-size: 14px;
    color: #333;
    font-weight: 600;
    margin-right: 5px;
}

.filter input[type="date"],
.filter select {
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    min-width: 150px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.filter input[type="date"]:focus,
.filter select:focus {
    border-color: #2980b9;
    outline: none;
}

.filter button {
    padding: 10px 15px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    color: #fff;
    background-color: #3498db;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 120px;
    text-align: center;
}

.filter button:hover {
    background-color: #2980b9;
}

.filter button:active {
    background-color: #21618c;
}

.monthFilter{
    display: none;
}

/* 📱 반응형 스타일 */
@media (max-width: 768px) {
    .filter {
        flex-direction: column;
        align-items: center;
    }

    .filter-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .filter input[type="date"],
    .filter select,
    .filter button {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .filter {
        padding: 15px;
    }

    .filter input[type="date"],
    .filter select,
    .filter button {
        font-size: 12px;
        padding: 8px 10px;
    }
}


/* 요약 정보 스타일 */
.summary {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa; /* 밝은 배경 */
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.summary h2 {
    font-size: 18px;
    color: #34495e; /* 진한 회색 */
    margin-bottom: 10px;
}

.summary p {
    font-size: 16px;
    margin: 5px 0;
    color: #555;
}

.summary strong {
    color: #000;
    font-weight: bold;
}

/* 섹션 간 구분 및 간격 */
.section {
    margin-bottom: 40px; /* 섹션 간 여백 */
    padding: 20px;
    border: 1px solid #ddd; /* 섹션 구분선 */
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 차트 컨테이너 반응형 크기 */
.chart-container {
    margin: 0 auto;
    padding: 15px;
    width: 100%;
    max-width: 900px; /* 데스크톱 최대 너비 */
    height: auto;
    aspect-ratio: 16 / 9; /* 차트 비율 유지 */
}

/* 모바일 환경에서 차트 크기 조정 */
/* 모바일 환경에서 차트 반응형 개선 */
@media (max-width: 768px) {
    .chart-container {
        max-width: 100%; /* 화면 크기에 맞게 조정 */
        padding: 0; /* 여백 제거 */
        aspect-ratio: auto; /* 비율 강제 적용 제거 */
    }

    #weeklyRankingsChart {
        max-width: 100%; /* 캔버스 크기 화면에 맞춤 */
        height: auto; /* 높이 자동 조정 */
    }

    /* 제목 간격 조정 */
    .new-section h1 {
        font-size: 18px; /* 글자 크기 조정 */
        margin-bottom: 10px;
    }

    /* 날짜 선택 드롭다운 여백 수정 */
    #dateSelector {
        width: 100%; /* 화면 전체 사용 */
        margin: 5px auto;
        font-size: 12px; /* 글자 크기 줄임 */
    }
}

.filter-buttons {
    margin-top: 20px;
    text-align: center;
}

.filter-buttons button {
    padding: 10px 15px;
    margin: 5px;
    font-size: 14px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-buttons button:hover {
    background-color: #2980b9;
}


/* 고정 네비게이션 스타일 */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #34495e;
    padding: 10px 20px;
    text-align: center;
    z-index: 1000; /* 다른 요소 위에 표시 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.navigation li {
    display: inline;
}

.navigation a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    transition: background-color 0.3s ease;
}

.navigation a:hover {
    background-color: #2980b9;
    border-radius: 5px;
}

/* 네비게이션 아래 컨텐츠 위치 보정 */
.dashboard {
    margin-top: 80px; /* 네비게이션 높이만큼 추가 */
}

/* 날짜 선택 드롭다운 기본 중앙 정렬 */
#dateSelector {
    margin: 10px auto; /* 상하 여백 추가, 좌우 자동 정렬 */
    display: block; /* 블록 요소로 설정하여 중앙 정렬 적용 */
    padding: 10px; /* 내부 여백 */
    font-size: 14px; /* 기본 폰트 크기 */
    border: 1px solid #ccc; /* 테두리 */
    border-radius: 5px; /* 둥근 모서리 */
    background-color: #f8f9fa; /* 밝은 배경색 */
    color: #34495e; /* 텍스트 색상 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 드롭다운 음영 */
    transition: all 0.3s ease; /* 부드러운 전환 */
}

/* 드롭다운 hover 효과 */
#dateSelector:hover {
    background-color: #e3e6ea;
    border-color: #b0bec5;
}

/* 반응형 스타일: 화면 너비가 768px 이하일 때 */
@media (max-width: 768px) {
    #dateSelector {
        font-size: 12px; /* 폰트 크기 축소 */
        padding: 8px; /* 내부 여백 축소 */
        width: 90%; /* 드롭다운 너비를 화면 너비에 맞춤 */
        max-width: 300px; /* 최대 너비 제한 */
    }
}

/* 반응형 스타일: 화면 너비가 480px 이하일 때 */
@media (max-width: 480px) {
    #dateSelector {
        font-size: 10px; /* 더 작은 폰트 크기 */
        padding: 6px; /* 내부 여백 축소 */
        width: 30%; /* 드롭다운 너비를 화면에 거의 꽉 차게 조정 */
    }
}


