* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.controls {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: #555;
}

select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s;
}

select:hover, select:focus {
    border-color: #667eea;
    outline: none;
}

.file-label, .refresh-btn {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 600;
    border: none;
    font-size: 14px;
}

.file-label:hover, .refresh-btn:hover {
    background: #5a67d8;
}

.refresh-btn:active {
    transform: translateY(1px);
}

.data-info {
    color: #666;
    font-style: italic;
    margin-left: auto;
}

.data-info small {
    font-size: 0.85rem;
}

.winrate-explanation {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #3b82f6;
}

.explanation-content h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1rem;
}

.explanation-content p {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #555;
}

.explanation-content strong {
    color: #3b82f6;
}

#jsonFile {
    display: none;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card span {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
}

.explanation {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.explanation h3 {
    margin-bottom: 15px;
    color: #333;
}

.correlation-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.correlation-item {
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid;
}

.correlation-item.positive {
    background: #f0f9ff;
    border-left-color: #22c55e;
}

.correlation-item.negative {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.correlation-item strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.correlation-item.positive strong {
    color: #16a34a;
}

.correlation-item.negative strong {
    color: #dc2626;
}

.champion-list {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.loading-message {
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.champion-item {
    display: grid;
    grid-template-columns: 60px 1fr 120px 80px;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    cursor: pointer;
}

.champion-item:hover {
    background-color: #f8fafc;
}

.champion-item:last-child {
    border-bottom: none;
}

.champion-rank {
    font-weight: bold;
    font-size: 1.2rem;
    color: #667eea;
}

.champion-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.champion-correlation {
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 5px 10px;
    border-radius: 20px;
}

.champion-correlation.positive {
    background: #dcfce7;
    color: #16a34a;
}

.champion-correlation.negative {
    background: #fef2f2;
    color: #dc2626;
}

.champion-correlation.neutral {
    background: #f1f5f9;
    color: #64748b;
}

.champion-trend {
    text-align: center;
    font-size: 1.2rem;
}

.champion-details {
    grid-column: 1 / -1;
    padding: 15px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin-top: 10px;
    border-radius: 8px;
    display: none;
}

.champion-item.expanded .champion-details {
    display: block;
}

.winrate-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.tier-winrate {
    text-align: center;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.tier-winrate .tier-name {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 3px;
}

.tier-winrate .winrate {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.tier-winrate .games-count {
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
}

.tier-winrate .alt-winrate {
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
    margin-top: 2px;
}

/*@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: space-between;
    }
    
    .champion-item {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }
    
    .champion-item > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}*/
