* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh; /* Full height */
    width: 250px; /* Sidebar width */
    background-color: #212529;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    transition: all 0.3s ease-in-out;
    z-index: 1000; /* Ensures sidebar is always on top */
}

/* Sidebar Title */
.sidebar-title {
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

/* Sidebar Links */
.sidebar a {
    padding: 15px 20px;
    text-decoration: none;
    color: white;
    display: block;
    transition: background 0.3s ease-in-out;
    font-size: 18px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.sidebar a:hover {
    background-color: #495057; /* Slightly lighter gray on hover */
}

.content {
    margin-left: 250px; /* Matches sidebar width */
    padding: 20px;
    max-width: calc(100vw - 250px); /* Prevents content from going behind sidebar */
    overflow-x: hidden;
    transition: margin-left 0.3s ease-in-out;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Search Form */
.search-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Portfolio Header */
.portfolio-header {
    text-align: center;
    margin-bottom: 20px;
}

.roi-value {
    font-weight: bold;
    color: #28a745; /* Green for positive ROI */
}

/* Charts Section */
.charts-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
}

.chart-item {
    flex: 1 1 calc(50% - 10px);
    max-width: calc(50% - 10px);
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Full-Width ROI Chart */
.full-width-chart {
    margin-top: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
}

/* Ensure charts do not overflow */
canvas {
    max-width: 100%;
    height: auto;
}

/* Leagues Section */
.leagues-container {
    margin-top: 30px;
}

/* Leagues Container */
.leagues-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Grid Layout for Seasons */
.seasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Adjusts to screen size */
    gap: 20px;
    justify-content: center;
}

/* Season Card */
.season-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease-in-out;
}

.season-container:hover {
    transform: scale(1.03); /* Slight scale effect on hover */
}

.leagues-list {
    list-style-type: none;
    padding: 0;
    margin-top: 10px;
}

.leagues-list li {
    background: #e9ecef;
    margin-bottom: 5px;
    padding: 8px;
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
}

.leagues-list li:hover {
    background: #ced4da;
}

/* Responsive Design */
@media (max-width: 768px) {

    .sidebar {
        width: 200px; /* Slightly narrower sidebar */
    }

    .content {
        margin-left: 200px;
        max-width: calc(100vw - 200px);
    }

    .charts-container {
        flex-direction: column;
        align-items: center;
    }

    .chart-item {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .full-width-chart {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 60px; /* Collapsed Sidebar */
        align-items: flex-start;
    }

    .sidebar a {
        font-size: 14px;
        padding: 10px;
    }

    .content {
        margin-left: 60px; /* Adjust content width */
        max-width: calc(100vw - 60px);
    }
}
