/* 커스텀 스타일 */

/* 스크롤바 스타일링 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 애니메이션 효과 */
.year-tab {
    transition: all 0.2s ease;
}

.year-tab:hover {
    transform: translateY(-1px);
}

/* 카드 호버 효과 */
.bg-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 테이블 행 호버 효과 */
tr:hover td {
    background-color: #f8fafc;
}

/* 검색 결과 애니메이션 */
#search-results {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 로딩 스피너 */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    .px-3 {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* 차트 컨테이너 스타일 */
.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

/* 통계 카드 스타일 */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

/* 버튼 스타일 개선 */
button:active {
    transform: scale(0.98);
}

/* 입력 필드 포커스 효과 */
input:focus, select:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 테이블 개선 */
table {
    border-collapse: separate;
    border-spacing: 0;
}

th:first-child {
    border-top-left-radius: 8px;
}

th:last-child {
    border-top-right-radius: 8px;
}

/* 순위 배지 스타일 */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
}

.rank-1 { background-color: #ffd700; color: #000; }
.rank-2 { background-color: #c0c0c0; color: #000; }
.rank-3 { background-color: #cd7f32; color: #fff; }

/* 토스트 알림 스타일 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #059669;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 프로그레스 바 */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}