/* CSS khusus untuk halaman Statistik */

/* Container utama dengan max-width konsisten */
.statistik-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px 20px;
}

.statistik-header {
    text-align: center;
    color: #ffd700;
    margin: 20px 0;
}

/* Filter container */
.filter-container {
    max-width: 1200px;
    margin: 0 auto 25px;
    padding: 10px 15px;
}

.pasaran-container {
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
    text-align: center;
}

.pasaran-container::after {
    content: "";
    display: block;
    height: 1px;
    width: 80%;
    max-width: 400px;
    background: linear-gradient(to right, transparent, rgba(255,215,154,0.3), transparent);
    margin: 15px auto 5px;
}

/* Filter select */
.filter-select {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    background-color: #3e2a0e;
    color: #ffd79a;
    border: 1px solid #5e4a2e;
    border-radius: 4px;
    cursor: pointer;
}

/* Tab Menu */
.tab-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 10px auto 15px;
    max-width: 1200px;
}

.tab-item {
    flex: 1;
    min-width: 80px;
    padding: 12px 10px;
    text-align: center;
    background-color: #3e2a0e;
    color: #ffd79a;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.tab-item:hover {
    background-color: #5e4a2e;
}

.tab-item.active {
    background-color: #ffd700;
    color: #201505;
}

/* Subtab Menu */
.subtab-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0 auto 15px;
    max-width: 1200px;
}

.subtab-item {
    flex: 1;
    min-width: 70px;
    padding: 10px;
    text-align: center;
    background-color: #3e2a0e;
    color: #ffd79a;
    text-decoration: none;
    border-radius: 4px;
}

.subtab-item.active {
    background-color: #ffd700;
    color: #201505;
}

/* STYLING KHUSUS UNTUK PRIZE FILTER */
.prize-filter {
    justify-content: center;
    gap: 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #3e2a0e;
}

.prize-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    min-width: 120px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.prize-item i {
    font-size: 24px;
    margin-bottom: 5px;
}

.prize-item span {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* Prize colors and effects */
.prize-item:nth-child(1) {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #201505;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.prize-item:nth-child(1).active {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.prize-item:nth-child(2) {
    background: linear-gradient(135deg, #c0c0c0 0%, #e6e6e6 100%);
    color: #333;
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.3);
}

.prize-item:nth-child(2).active {
    background: linear-gradient(135deg, #e6e6e6 0%, #c0c0c0 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(192, 192, 192, 0.4);
}

.prize-item:nth-child(3) {
    background: linear-gradient(135deg, #cd7f32 0%, #daa520 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.3);
}

.prize-item:nth-child(3).active {
    background: linear-gradient(135deg, #daa520 0%, #cd7f32 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(205, 127, 50, 0.4);
}

.prize-item:hover {
    transform: translateY(-2px);
}

.prize-item:active {
    transform: translateY(0);
}

/* Glow effect untuk active prize */
.prize-item.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: inherit;
    border-radius: inherit;
    filter: blur(8px);
    opacity: 0.7;
    z-index: -1;
}

/* Table Wrapper dengan max-width konsisten */
.table-wrapper {
    max-width: 1200px;
    margin: 0 auto 20px;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #3e2a0e;
    background: rgba(255,255,255,0.03);
}

/* Statistics Table */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.stats-table th {
    padding: 12px 8px;
    background-color: #3e2a0e;
    color: #ffd700;
    font-weight: bold;
    border-bottom: 2px solid #201505;
    position: sticky;
    top: 0;
    z-index: 10;
}

.stats-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #3e2a0e;
}

.stats-table tr:nth-child(odd) {
    background-color: rgba(62, 42, 14, 0.3);
}

.stats-table tr:hover td {
    background: rgba(255,215,0,0.03);
}

/* Number frequency styling */
.freq-high {
    background-color: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    font-weight: bold;
}

.freq-medium {
    background-color: rgba(255, 165, 0, 0.2);
    color: #ffa500;
    font-weight: bold;
}

.freq-low {
    background-color: rgba(128, 128, 128, 0.2);
    color: #c0c0c0;
}

/* Statistics charts container */
.stats-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.chart-container {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #3e2a0e;
}

.chart-title {
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

/* Chart bars */
.chart-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.bar-label {
    min-width: 40px;
    color: #ffd79a;
    font-weight: bold;
}

.bar-fill {
    flex: 1;
    height: 20px;
    background: linear-gradient(to right, #3e2a0e, #ffd700);
    border-radius: 4px;
    margin: 0 10px;
    position: relative;
    overflow: hidden;
}

.bar-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #201505;
    font-weight: bold;
    font-size: 12px;
}

/* Summary statistics */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.summary-card {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border: 1px solid #3e2a0e;
}

.summary-title {
    color: #ffd700;
    font-size: 14px;
    margin-bottom: 5px;
}

.summary-value {
    color: #ffd79a;
    font-size: 24px;
    font-weight: bold;
}

/* Mobile Responsive untuk Statistik */
@media (max-width: 768px) {
    .statistik-container {
        padding: 0 10px 10px;
    }
    
    .filter-container {
        padding: 10px;
    }
    
    .tab-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        margin: 10px 0 15px;
    }
    
    .tab-item {
        min-width: 70px;
        padding: 10px 5px;
        font-size: 12px;
    }
    
    /* Mobile Prize Filter */
    .prize-filter {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .prize-item {
        flex-direction: row;
        justify-content: center;
        min-width: auto;
        width: 100%;
        padding: 12px 15px;
    }
    
    .prize-item i {
        font-size: 18px;
        margin-bottom: 0;
        margin-right: 8px;
    }
    
    .stats-table th,
    .stats-table td {
        padding: 8px 3px;
        font-size: 11px;
    }
    
    .stats-charts {
        grid-template-columns: 1fr;
    }
    
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .summary-value {
        font-size: 20px;
    }
}

/* Layar sangat kecil */
@media (max-width: 414px) {
    .stats-table {
        font-size: 9px;
    }
    
    .stats-table th {
        padding: 8px 2px;
        font-size: 9px;
    }
    
    .stats-table td {
        padding: 6px 2px;
    }
    
    .prize-item {
        padding: 10px 12px;
    }
    
    .prize-item i {
        font-size: 16px;
    }
    
    .prize-item span {
        font-size: 12px;
    }
    
    .stats-summary {
        grid-template-columns: 1fr;
    }
    
    .summary-value {
        font-size: 18px;
    }
    
    .chart-container {
        padding: 10px;
    }
    
    .bar-value {
        font-size: 10px;
    }
}