/*
 * 돈키우기 로또 - 최다당첨번호 스타일
 * GeneratePress 테마와 조화롭게 디자인
 */

/* ===== 기본 컨테이너 ===== */
.donkiugi-lotto-frequency-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: inherit;
}

.donkiugi-no-data {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

/* ===== 통계 정보 섹션 ===== */
.donkiugi-lotto-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stats-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stats-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stats-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-value {
    font-size: 18px;
    font-weight: bold;
}

.stats-value.highlight {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* ===== TOP 10 섹션 ===== */
.donkiugi-lotto-top10 {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.top10-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    color: #333;
}

.top10-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.top10-item {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.top10-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-color: #0073aa;
}

.top10-item.rank-1 {
    background: linear-gradient(145deg, #fff3cd, #ffeaa7);
    border-color: #ffd700;
}

.top10-item.rank-2 {
    background: linear-gradient(145deg, #e2e3e5, #d6d8db);
    border-color: #c0c0c0;
}

.top10-item.rank-3 {
    background: linear-gradient(145deg, #f8d7da, #f5c6cb);
    border-color: #cd7f32;
}

.rank-badge {
    background: #0073aa;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 15px;
    margin-bottom: 8px;
    display: inline-block;
    font-weight: bold;
}

.top10-item.rank-1 .rank-badge {
    background: #ffd700;
    color: #333;
}

.top10-item.rank-2 .rank-badge {
    background: #c0c0c0;
    color: #333;
}

.top10-item.rank-3 .rank-badge {
    background: #cd7f32;
    color: white;
}

.number-ball {
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #0073aa, #005177);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin: 8px 0;
    box-shadow: 0 3px 10px rgba(0, 115, 170, 0.3);
}

.frequency-count {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-top: 5px;
}

/* ===== 상세 테이블 ===== */
.frequency-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.frequency-table-wrapper {
    overflow-x: auto;
}

.donkiugi-frequency-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.donkiugi-frequency-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.donkiugi-frequency-table th {
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.donkiugi-frequency-table tbody tr {
    transition: background-color 0.2s ease;
}

.donkiugi-frequency-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.donkiugi-frequency-table tbody tr:hover {
    background: #e3f2fd;
}

.donkiugi-frequency-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

/* 순위 셀 */
.rank-cell .rank-badge {
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.rank-badge.rank-1 {
    background: #ffd700 !important;
    color: #333 !important;
}

.rank-badge.rank-2 {
    background: #c0c0c0 !important;
    color: #333 !important;
}

.rank-badge.rank-3 {
    background: #cd7f32 !important;
    color: white !important;
}

/* 번호 셀 */
.number-cell .number-ball {
    width: 35px;
    height: 35px;
    font-size: 14px;
}

/* 당첨 횟수별 번호볼 색상 */
.number-1,
.number-2,
.number-3,
.number-4,
.number-5,
.number-6,
.number-7,
.number-8,
.number-9 {
    background: linear-gradient(145deg, #ffc107, #ff8f00);
}

.number-10,
.number-11,
.number-12,
.number-13,
.number-14,
.number-15,
.number-16,
.number-17,
.number-18,
.number-19 {
    background: linear-gradient(145deg, #0073aa, #005177);
}

.number-20,
.number-21,
.number-22,
.number-23,
.number-24,
.number-25,
.number-26,
.number-27,
.number-28,
.number-29 {
    background: linear-gradient(145deg, #dc3545, #c82333);
}

.number-30,
.number-31,
.number-32,
.number-33,
.number-34,
.number-35,
.number-36,
.number-37,
.number-38,
.number-39 {
    background: linear-gradient(145deg, #6f42c1, #59359a);
}

.number-40,
.number-41,
.number-42,
.number-43,
.number-44,
.number-45 {
    background: linear-gradient(145deg, #28a745, #1e7e34);
}

/* 빈도수 셀 */
.frequency-cell {
    font-weight: bold;
    font-size: 15px;
    color: #0073aa;
}

/* 백분율 셀 */
.percentage-cell {
    color: #6c757d;
    font-size: 13px;
}

/* 시각화 바 */
.visual-cell {
    width: 150px;
}

.frequency-bar-container {
    position: relative;
    background: #e9ecef;
    height: 25px;
    border-radius: 12px;
    overflow: hidden;
}

.frequency-bar {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #005177);
    border-radius: 12px;
    transition: width 0.8s ease;
    position: relative;
}

.frequency-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* 테이블 푸터 */
.frequency-table-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.data-info {
    margin: 0;
    font-size: 13px;
    color: #6c757d;
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .donkiugi-lotto-stats {
        padding: 20px 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }

    .stats-item {
        padding: 12px;
    }

    .stats-value {
        font-size: 16px;
    }

    .top10-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

    .top10-item {
        padding: 12px;
    }

    .number-ball {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .donkiugi-frequency-table {
        font-size: 12px;
    }

    .donkiugi-frequency-table th,
    .donkiugi-frequency-table td {
        padding: 8px 5px;
    }

    .visual-cell {
        width: 100px;
    }

    .frequency-bar-container {
        height: 20px;
    }

    .frequency-bar-text {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .top10-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .visual-column {
        display: none;
    }
}

/* ===== 애니메이션 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.donkiugi-lotto-frequency-container {
    animation: fadeInUp 0.6s ease;
}

.top10-item {
    animation: fadeInUp 0.6s ease;
}

.top10-item:nth-child(1) {
    animation-delay: 0.1s;
}

.top10-item:nth-child(2) {
    animation-delay: 0.2s;
}

.top10-item:nth-child(3) {
    animation-delay: 0.3s;
}

.top10-item:nth-child(4) {
    animation-delay: 0.4s;
}

.top10-item:nth-child(5) {
    animation-delay: 0.5s;
}

/* ===== 프린트 스타일 ===== */
@media print {

    .donkiugi-lotto-stats,
    .donkiugi-lotto-top10,
    .frequency-table-container {
        box-shadow: none;
        border: 1px solid #333;
    }

    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .top10-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .number-ball {
        background: #333 !important;
        color: white !important;
    }
}