* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 80%);
    color: #ffffff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(300px, 350px) 1fr minmax(250px, 300px);
    gap: 30px;
}

.panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.settings-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.settings-group label {
    font-weight: 600;
    color: #ffd700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rares-row {
    flex-direction: row;
    gap: 8px;
    align-items: flex-end;
}

.rares-row > div {
    flex: 1 1 0;
    min-width: 0;
}

.rares-row input[type="number"] {
    width: 140px;
    min-width: 0;
    padding: 12px;
    font-size: 16px;
    box-sizing: border-box;
    display: block;
    margin-top: 10px;
}

#event-details {
    background: rgba(0,0,0,0.3); 
    padding: 15px; 
    border-radius: 8px; 
    font-size: 14px;
}

select, input[type="number"] {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    padding: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

select:focus, input[type="number"]:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

select option {
    background: #1a1a2e;
    color: white;
}

.chart-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    padding: 20px;
    gap: 0px;

}

#ev-chart {
    flex: 1;
    width: 100% !important;
    height: 100% !important;
}

.chart-header {
    text-align: center;
}

.chart-header h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.chart-area {
    flex: 1;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    min-height: 400px;
}

.chart {
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.slider-label {
    text-align: center;
    font-weight: 600;
    color: #ffd700;
}

.slider-wrapper {
    position: relative;
}

.winrate-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #ff4444, #ffaa00, #44ff44);
    outline: none;
    cursor: pointer;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.winrate-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffd700;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.winrate-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffd700;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.winrate-display {
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffd700;
    margin-top: 10px;
}

.results-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ev-display {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border-radius: 12px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.ev-label {
    font-size: 1.2rem;
    color: #ffd700;
    margin-bottom: 10px;
}

.ev-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffffff;
}

.ev-positive { color: #44ff44; }
.ev-negative { color: #ff4444; }

.breakdown {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
}

.breakdown h3 {
    color: #ffd700;
    margin-bottom: 15px;
    text-align: center;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breakdown-item:last-child {
    border-bottom: none;
    font-weight: bold;
    color: #ffd700;
}

canvas {
    border-radius: 8px;
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        gap: 20px;
        height: auto;
    }
}

footer {
    color: #ffffff;
    font-size: 14px;
    text-align: center;
    padding: 20px;
    padding-top: 35px;
    position: relative;
    width: 100%;
    background: none;
}