/* 로또 구간별 출현횟수 페이지 전용 스타일 */

.stats-container {
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(247, 147, 26, 0.2);
    border-radius: 12px;
    padding: 30px;
    margin: 30px auto;
    max-width: 1200px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 60px;  /* 메뉴와 타이틀 사이 간격 추가 */
    padding-top: 20px;  /* 추가 여백 */
}

.page-header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #f7931a, #ffb347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.page-header p {
    color: #888;
    font-size: 1.1rem;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 10px;
}

.tab-button {
    flex: 1;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #888;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-button.active {
    background: linear-gradient(135deg, #f7931a, #ffb347);
    color: #1a1a1a;
    border-color: transparent;
}

.tab-button:hover:not(.active) {
    background: rgba(247, 147, 26, 0.1);
    color: #f7931a;
    border-color: rgba(247, 147, 26, 0.3);
}

.section-tabs {
    display: flex;
    justify-content: space-around;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.section-tab {
    padding: 15px 30px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.section-tab.active {
    color: #f7931a;
}

.section-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f7931a, #ffb347);
}

.stats-table {
    margin-top: 30px;
}

.stats-row {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-row:last-child {
    border-bottom: none;
}

.range-label {
    width: 140px;
    color: #888;
    font-weight: 600;
    font-size: 0.95rem;
}

.stats-bar {
    flex: 1;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    margin: 0 20px;
    overflow: hidden;
    position: relative;
}

.stats-fill {
    height: 100%;
    border-radius: 16px;
    transition: width 0.8s ease;
    position: relative;
    overflow: hidden;
}

.stats-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 구간별 색상 - 10번대 */
.stats-row.range-1-10 .stats-fill { 
    background: #ffc107 !important; 
}
.stats-row.range-11-20 .stats-fill { 
    background: #42a5f5 !important; 
}
.stats-row.range-21-30 .stats-fill { 
    background: #ef5350 !important; 
}
.stats-row.range-31-40 .stats-fill { 
    background: #9e9e9e !important; 
}
.stats-row.range-41-45 .stats-fill { 
    background: #66bb6a !important; 
}

/* 구간별 색상 - 5번대 */
.stats-row.range-1-5 .stats-fill { 
    background: #ffc107 !important; 
}
.stats-row.range-6-10 .stats-fill { 
    background: #ffc107 !important; 
}
.stats-row.range-11-15 .stats-fill { 
    background: #42a5f5 !important; 
}
.stats-row.range-16-20 .stats-fill { 
    background: #42a5f5 !important; 
}
.stats-row.range-21-25 .stats-fill { 
    background: #ef5350 !important; 
}
.stats-row.range-26-30 .stats-fill { 
    background: #ef5350 !important; 
}
.stats-row.range-31-35 .stats-fill { 
    background: #9e9e9e !important; 
}
.stats-row.range-36-40 .stats-fill { 
    background: #9e9e9e !important; 
}
.stats-row.range-41-45 .stats-fill { 
    background: #66bb6a !important; 
}

.stats-count {
    width: 60px;
    text-align: right;
    font-weight: 700;
    font-size: 1.2rem;
    color: #f7931a;
}

.loading {
    text-align: center;
    padding: 60px;
    color: #888;
    font-size: 1.1rem;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(247, 147, 26, 0.2);
    border-top-color: #f7931a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

.error {
    text-align: center;
    padding: 60px;
    color: #ff4757;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-note {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    margin-top: 40px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.back-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #f7931a, #ffb347);
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(247, 147, 26, 0.3);
    transition: all 0.3s;
    z-index: 100;
}

.back-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(247, 147, 26, 0.4);
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .section-tabs {
        overflow-x: auto;
    }
    
    .section-tab {
        padding: 10px 15px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .range-label {
        width: 100px;
        font-size: 0.85rem;
    }
    
    .stats-count {
        width: 40px;
        font-size: 1rem;
    }
    
    .stats-bar {
        margin: 0 10px;
    }
}