/* General Layout */
body {
    background-color: #0f0f0f;
    color: #f1f1f1;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex-grow: 1;
}

/* Header & Footer */
header {
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header a {
    color: #aaa;
    text-decoration: none;
    margin-right: 16px;
    transition: color 0.2s;
}

header a:hover {
    color: #fff;
}

footer {
    color: #777;
    border-top: 1px solid #222;
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Headings */
h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #fff;
}

/* not sure */
.portrait {
   width: 250px;
}

/* Inputs & Buttons */
input {
    border: 1px solid #444;
    background-color: #1a1a1a;
    color: #eee;
    padding: 8px 10px;
    border-radius: 6px;
    outline: none;
}

input:focus {
    border-color: #555;
}

button {
    cursor: pointer;
    border: none;
    background: #3a3a3a;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.2s;
}

button:hover {
    background: #555;
}

/* Tables */
.fixture-table {
    width: max-content;
    border-collapse: collapse;
    overflow-x: auto;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.95rem;
}

/* All fixture matrix text black */
.fixture-table th,
.fixture-table td {
    border: 1px solid #333;
    padding: 10px;
    text-align: center;
    white-space: nowrap;
    color: #000;
}

/* Header cells */
.fixture-table th {
    background-color: #f0f0f0;
    font-weight: 600;
    overflow-x: auto;
    max-width: 100%;
}

/* Sticky first column */
.fixture-table thead th:first-child,
.fixture-table tbody td:first-child {
    position: sticky;
    left: 0;
    background: #f0f0f0;
    color: #000;
    z-index: 1;
}

/* Player Table */
#playerTable th,
#playerTable td {
    border: 1px solid #333;
    padding: 10px;
    text-align: center;
}

/* Header row */
#playerTable th {
    background-color: #1c1c1c;
    color: #f5f5dc;
    font-weight: 600;
}

/* Remove stripe effect */
#playerTable tr {
    background-color: transparent;
}

/* Row hover */
#playerTable tr:hover {
    background-color: #222;
}

/* Fix squad/player links */
#playerTable a,
.fixture-table a {
    color: #f5f5dc; /* cream/white tone */
    text-decoration: none;
}

#playerTable a:hover,
.fixture-table a:hover {
    color: #f5f5dc;
    text-decoration: underline;
}

#fixtureTable {
    overflow-x: auto;
    max-width: 100%;
    display: block;
}

.fixture-table {
    min-width: calc(7 * 150px); /* enough width for 7 columns */
    border-collapse: collapse;
    width: max-content;
}


/* Dropdown Menu */
nav {
    position: relative;
}

.dropdown {
    display: inline-block;
    position: relative;
}

.dropbtn {
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    background-color: #1a1a1a;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    width: 220px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    z-index: 10;
}

/* Scrollable content */
.dropdown-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
    /* max-height: 250px;   limit visible items */
    overflow-y: auto;    /* allow scrolling */
    scrollbar-width: thin; /* nicer scrollbar (Firefox) */
}

.dropdown-content li a {
    display: block;
    padding: 8px 14px;
    color: #ddd;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-content li a:hover {
    background-color: #333;
}

.dropdown-content input {
    width: 90%;
    background-color: #111;
    border: 1px solid #333;
    color: #f1f1f1;
    padding: 6px;
    margin: 5px auto;
    display: block;
    border-radius: 4px;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
    display: block;
}
.dropdown-content li {
    display: block !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    body {
        padding: 0 10px;
        max-width: 100%;
    }

    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    header a {
        margin-right: 0;
        display: block;
        padding: 6px 0;
    }

    h1 {
        font-size: 1rem;
        margin: 0;
    }

    .dropdown {
        display: inline-block;
    }

    nav {
        display: flex;
        flex-direction: row;
        gap: 8px; /* space between buttons */
    }

    p {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .fixture-table th,
    .fixture-table td {
        padding: 6px 8px;
        font-size: 0.85rem;
    }

    footer {
        font-size: 0.8rem;
        padding: 15px 0;
        margin-top: 20px;
    }

    .dropbtn {
        padding: 8px 12px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .dropdown-content {
        right: 0;
        left: auto;
        width: 200px;
    }
}
.pl-header {
            margin: 20px 0 30px 0;
        }

        .pl-header h1 {
            font-size: 2rem;
            margin-bottom: 5px;
            color: #fff;
        }

        .pl-header .season {
            font-size: 0.95rem;
            color: #aaa;
        }

        .sections-grid {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 30px;
            margin-bottom: 30px;
        }

        .section {
            background-color: #1a1a1a;
            border-radius: 8px;
            padding: 20px;
            border: 1px solid #333;
        }

        .section-title {
            font-size: 1.3rem;
            margin-bottom: 15px;
            color: #fff;
            border-bottom: 2px solid #444;
            padding-bottom: 8px;
        }

        /* Match Cards */
        .match-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .match-card {
            border: 1px solid #333;
            border-radius: 6px;
            padding: 12px;
            transition: all 0.2s;
            background-color: #0f0f0f;
        }

        .match-card:hover {
            background-color: #222;
            border-color: #555;
        }

        .match-date {
            font-size: 0.8rem;
            color: #777;
            margin-bottom: 8px;
        }

        .match-teams {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 15px;
        }

        .team {
            flex: 1;
            font-weight: 500;
            font-size: 0.95rem;
            color: #f1f1f1;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .team.home {
            text-align: left;
            justify-content: flex-start;
        }

        .team.away {
            text-align: right;
            justify-content: flex-end;
            flex-direction: row-reverse;
        }

        .team-crest {
            width: 24px;
            height: 24px;
            object-fit: contain;
        }

        .score {
            font-size: 1.3rem;
            font-weight: bold;
            color: #fff;
            min-width: 60px;
            text-align: center;
        }

        .vs {
            font-size: 0.85rem;
            color: #777;
            min-width: 40px;
            text-align: center;
        }

        /* Standings Table */
        .standings-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.9rem;
        }

        .standings-table th {
            background-color: #222;
            color: #f1f1f1;
            padding: 10px 8px;
            font-size: 0.85rem;
            text-align: left;
            border: 1px solid #333;
            font-weight: 600;
        }

        .standings-table td {
            padding: 10px 8px;
            border: 1px solid #333;
            color: #f1f1f1;
        }

        .standings-table tbody tr:hover {
            background-color: #222;
        }

        .pos {
            font-weight: bold;
            color: #fff;
            width: 40px;
        }

        .team-name {
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .standings-crest {
            width: 20px;
            height: 20px;
            object-fit: contain;
        }

        .champions-league {
            border-left: 3px solid #1e90ff;
        }

        .europa-league {
            border-left: 3px solid #ff8c00;
        }

        .relegation {
            border-left: 3px solid #dc143c;
        }

        /* Top Scorers */
        .scorers-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .scorer-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px;
            border-radius: 6px;
            background-color: #0f0f0f;
            border: 1px solid #333;
            transition: all 0.2s;
        }

        .scorer-item:hover {
            background-color: #222;
            border-color: #555;
        }

        .scorer-info {
            flex: 1;
        }

        .scorer-name {
            font-weight: 500;
            font-size: 0.95rem;
            margin-bottom: 3px;
            color: #f1f1f1;
        }

        .scorer-team {
            font-size: 0.8rem;
            color: #777;
        }

        .scorer-goals {
            font-size: 1.3rem;
            font-weight: bold;
            color: #fff;
            margin-left: 15px;
        }

        .full-width {
            grid-column: 1 / -1;
        }

        .fpl-form {
            margin-top: 15px;
        }

        .fpl-form input {
            margin-right: 10px;
        }

        .no-data {
            text-align: center;
            color: #777;
            padding: 20px;
            font-size: 0.9rem;
        }

        @media (max-width: 1024px) {
            .sections-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 768px) {
            .pl-header h1 {
                font-size: 1.5rem;
            }

            .sections-grid {
                gap: 20px;
            }

            .section {
                padding: 15px;
            }

            .match-teams {
                flex-wrap: wrap;
            }

            .team {
                text-align: center !important;
                flex-basis: 100%;
            }

            .score, .vs {
                flex-basis: 100%;
            }

            .standings-table {
                font-size: 0.8rem;
            }

            .standings-table th,
            .standings-table td {
                padding: 6px 4px;
            }
        }