/* =========================================
   =Base and Theme Tokens
   ======================================= */
:root {
    --color-primary: #032d5f;
    --color-primary-2: #0b2e57;
    --color-primary-hover: #1c4b87;
    --color-accent: #2196F3;
    --color-positive: #2ecc71;
    --color-danger: #dc3545;
    --color-text: #333333;
    --color-muted: #888888;
    --color-border: #ddd;
    --color-border-strong: #dce1e7;
    --color-bg: #ffffff;
    --color-bg-alt: #f7f7f7;
    --color-border-light: #e5e7eb;
    --color-border-muted: #cbd5e1;
    --color-bg-soft: #f8fafc;
    --color-hover-soft: #eef2ff;
    --color-scrollbar: #c7d2fe;
    --shadow-card: 0 2px 8px rgba(3, 45, 95, 0.08);
}

/* Base styles */
html, body {
    margin: 0; /* Remove default margin */
    font-family: 'Roboto', sans-serif; /* Use Roboto font */
    width: 100%;
    height: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.app-container {
    min-height: calc(100vh - 60px); /* Adjust the value as needed, considering navbar height */
    display: flex; /* Use Flexbox to fill the available height */
    flex-direction: column; /* Stack children vertically */
    justify-content: space-between; /* Add space between header and footer */
    padding-bottom: 32px;
    margin: 50px;
}

#main-container {
    flex: 1; /* Flex grow to take available space */
    display: flex;
    flex-direction: column; /* Stack children vertically */
    min-height: 0; /* Prevent flex children from growing past the parent's height */
}

#footer {
    background-color: var(--color-primary);
    color: #fff;
    padding: 10px;
    text-align: center; /* Center the text in the footer */
}

#footer a {
    color: #fff;
    text-decoration: none; /* Remove the underline from the hyperlink */
}

.footer-minimal {
    height: 30px !important;
}

/* =========================================
   =Header & Navigation
   ======================================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-primary);
    padding: 10px;
    height: 40px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: inherit;
    letter-spacing: 0.6px;
}

h1 {
    color: #333333;
    font-size: 1.5rem;
    font-weight: 500;
    font-family: "Sen", "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0px;
}

h2 {
    color: #333333;
    font-size: 1.25rem;
    font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
    letter-spacing: 0.6px;
    margin: 0px;
    line-height: 1.1rem;
    text-align: center;
}

h3 {
    color: #333333;
    font-size: 1.25rem;
    font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: normal;
    letter-spacing: 0.6px;
    margin: 0px;
}

p {
    color: #333333;
    font-size: 1rem;
    font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 8px 0px;
}

a {
    color: #333333;
    font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 16px 0px;
    text-decoration: none;
    cursor: pointer;
}

a:hover {
    background-color: var(--color-primary-hover);
}

nav {
    width: 100%;
}

.navbar {
    display: flex;
    justify-content: space-between; /* Add space between left and right sides */
    align-items: center;
    width: 100%; /* Ensure the navbar spans the full width */
}

.navbar-left ul {
    list-style: none;
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
    display: flex;
}

.navbar-left li {
    margin: 0 20px; /* Adjust horizontal spacing between elements */
}

.navbar-left li a {
    color: #fff;
    text-decoration: none;
    padding: 10px; /* Add padding to make links clickable */
}

.navbar-left li a:hover {
    background-color: var(--color-primary-hover);
}

.navbar-right {
    display: flex;
    align-items: center;
    flex-grow: 1; /* Allow the container to grow and take up remaining space */
    justify-content: flex-end; /* Distribute elements to the right */
}

.user-info-navbar {
    color: #fff;
    display: flex; /* Display user info options as a flex container */
    align-items: center; /* Center items vertically */
    text-align: center;
    width: 20%;
}

.user-info-navbar .account-name {
    margin-right: 20px; /* Add spacing between username and logout */
}

.user-info-navbar-option {
    margin-left: 20px; /* Add spacing between user info options */
}

/* =========================================
   =Buttons & Controls
   ======================================= */
/* Clear filters button styling */
.filter-clear {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.clear-filters-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.clear-filters-btn:hover {
    background-color: #c82333;
}

.clear-filters-btn:active {
    background-color: #bd2130;
}

/* Burger Menu Styles */
.burger-menu {
    display: none;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
}

.menu {
    display: flex;
}

/* Media moved to 'Responsive (grouped)' at end: max-width: 1024 */

.alert {
    font-family: "Sen", "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: red;
    line-height: 1.2;
    display: block;
    width: 100%;
    height: 45px;
    background: 0 0;
    padding: 0 5px;
    outline: none;
    border: none;
    overflow: visible;
    border: 2px solid red;
    margin-bottom: 37px;
    text-align: center;
}

.sign-in-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    min-height: 90vh;
}

.login-wrapper {
    width: 390px;
    background: var(--color-bg);
    border-radius: 10px;
    overflow: hidden;
    padding: 77px 55px 33px;
    -webkit-box-shadow: 0 5px 10px 0 rgba(0,0,0,.1);
    box-shadow: 0 5px 10px 0 rgba(0,0,0,.1);
}

.login-wrapper {
    display: block;
}

.login-form-title {
    display: block;
    font-family: "Sen", "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 30px;
    color: #333;
    line-height: 1.2;
    text-align: center;
    padding-bottom: 26px;
}

.login-form-icon {
    display: block;
    width: 100%;
    margin-bottom: 48px;
    display: flex;
}

.login-form-icon img {
    width: 120px;
    margin: 0 auto;
    padding: 12px;
    background-color: var(--color-primary);
    border-radius: 8px;
}

.login-input-form {
    font-family: "Sen", "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: #555;
    line-height: 1.2;
    display: block;
    width: 100%;
    height: 45px;
    background: 0 0;
    padding: 0 5px;
    outline: none;
    border: none;
    overflow: visible;
    border-bottom: 2px solid #adadad;
    margin-bottom: 37px;
}

.email-input-placeholder {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.login-button {
    width: 100%;
    display: block;
    position: relative;
    z-index: 1;
    border-radius: 25px;
    overflow: hidden;
    margin: 0 auto;
}

.remember-me-form {
    margin-bottom: 8px;
}

.btn {
    font-family: "Sen", "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #f2f2f2;
    font-size: 13px;
    line-height: 1.2;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    width: auto;
    height: 35px;
    background: var(--color-primary);
    margin: 5px;
}

.btn::before {
    content: "\00a0"; /* Add a non-breaking space to create space before the button */
}

.btn:hover {
    background: transparent;
    color: var(--color-primary);
}

img {
    max-width: 100%;
    max-height: 100%;
}



#home-title {
    text-align: center;
    width: 100%;
    display: flex;
}

.title-navbar {
    width: 100%;
}

.user-info-navbar-option {
    padding: 15px;
}

.navbar-logout {
    font-family: inherit;
}

.home-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    min-height: calc(100vh - 60px);
    flex-wrap: wrap; /* allow wrapping into multiple columns */
    gap: 16px; /* spacing between sections */
}

.home-page-item {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    padding: 16px;
    flex: 1 1 100%;
    flex-direction: column; /* Stack content vertically */
    justify-content: flex-start; /* Align content to the top */
    align-items: stretch; /* Let content fill width */
}

.data-page {
    width: 100%;
    margin-top: 16px;
}

.buttons-data-page > div {
    margin: 12px 0px;
    display: flex;
    flex-direction: column;
}

#second-page-section {
    display: block;
}

.apikey-section {
    display: flex;
    flex-direction: column;
}

.apikey-response {
    width: 100px;
    height: 30px;
    min-width: 100px;
    min-height: 5px;
    border-bottom: 2px black;
}

.database-section {
    width: 100%;
    background: var(--color-bg);
    border: 1px solid var(--color-border-strong);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(3, 45, 95, 0.08);
    padding: 16px;
}

/* mirror styling for the right column */
#first-page-section .data-page {
    background: var(--color-bg);
    border: 1px solid var(--color-border-strong);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(3, 45, 95, 0.08);
    padding: 16px;
}

/* Arrange the top area (#first-page-section) into two columns on wide screens */
#first-page-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px; /* more space between boxes */
}

/* Media moved to 'Responsive (grouped)' at end: min-width: 1200 (layout) */

/* Updated fixtures table: compact and scrollable with sticky header */
.updated-fixtures-section {
    width: 100%;
    overflow: auto; /* both axes */
    max-height: 70vh; /* keep table within viewport */
    scroll-padding-top: 72px; /* account for sticky title + controls */
    background: var(--color-bg);
    border: 1px solid var(--color-border-strong);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(3, 45, 95, 0.08);
}

#second-page-section .updated-fixtures-section h2.sticky-title {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--color-bg);
    margin: 0;
    padding: 8px 4px;
    height: 36px; /* explicit height for exact offset math */
    border-bottom: 1px solid #e5e7eb;
}

#second-page-section .updated-controls.sticky-controls {
    position: sticky;
    top: 36px; /* below the h2 */
    z-index: 3;
    background: var(--color-bg);
    border-bottom: 1px solid #e5e7eb;
    padding: 6px 4px;
    height: 36px; /* explicit height for exact offset math */
    margin: 0 !important; /* avoid offset mismatch due to inline margins */
}

/* =========================================
   =Generic Tables
   ======================================= */
#last-updates-table {
    font-size: 12px;
    border-collapse: separate; /* improve sticky header rendering */
    border-spacing: 0;
}

#last-updates-table th,
#last-updates-table td {
    padding: 6px 8px;
    white-space: nowrap;
}

#last-updates-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* When inside the right panel, offset header under sticky title and controls */
#second-page-section #last-updates-table thead th {
    top: var(--updates-sticky-offset, 72px); /* computed via JS for accuracy */
    background: var(--color-primary-2); /* keep header visible above rows */
    color: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.15);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

/* =========================================
   =Tables: Standings
   ======================================= */
.league-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-bg-soft);
    border-bottom: 1px solid var(--color-border-light);
}

.league-title { font-size: 1rem; font-weight: 600; }

.season-controls { display: flex; align-items: center; gap: 8px; }
.season-nav-btn {
    border: 1px solid var(--color-border-muted);
    background: var(--color-bg);
    color: var(--color-primary-2);
    width: 28px; height: 28px;
    border-radius: 4px;
    cursor: pointer;
}
.season-nav-btn:hover { background: var(--color-hover-soft); }
.season-pill { padding: 2px 8px; background: var(--color-primary); color: #fff; border-radius: 999px; font-size: 12px; }

.league-card-body { padding: 10px; position: relative; max-height: 60vh; overflow: auto; }
.league-card-body.loading::after {
    content: 'Loading…';
    position: absolute; inset: 0; display: grid; place-items: center;
    background: rgba(255,255,255,0.6);
    color: var(--color-primary-2); font-weight: 600;
}
.standings-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.standings-table th, .standings-table td { padding: 6px 8px; border-bottom: 1px solid var(--color-border-light); }
.standings-table th { background: var(--color-primary); color: #fff; position: sticky; top: 0; }
.standings-table tr:nth-child(odd) { background: var(--color-bg-soft); }
.standings-table tr:nth-child(even) { background: var(--color-bg); }
.standings-table td.align-left { text-align: left; }
.standings-table.dense th, .standings-table.dense td { padding: 4px 6px; font-size: 12px; }
.card-error { color: #b91c1c; padding: 8px; }

/* Helpers and grid container for multi-standings */
.hidden { display: none !important; }

/* 3-column sub-layout inside a single standings cell */
.standings-cell-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* force exactly three equal columns */
  align-items: center;
  justify-items: center; /* center each cell content */
  width: 100%;
  gap: 6px;
}
.standings-cell-3 > span,
.standings-cell-3 > div {
  display: block;
  text-align: center;
  white-space: nowrap; /* avoid wrapping that can look like fewer columns */
}
/* align digits nicely */
.standings-cell-3 .num { font-variant-numeric: tabular-nums; }
/* goal-diff coloring */
.standings-cell-3 .gd-pos { color: var(--color-positive); font-weight: 600; }
.standings-cell-3 .gd-neg { color: var(--color-danger); font-weight: 600; }
.standings-cell-3 .gd-zero { opacity: 0.85; }
/* optional thin dividers between the three columns */
.standings-cell-3.divided > span,
.standings-cell-3.divided > div {
  border-left: 1px solid var(--color-border-light);
  padding-left: 6px;
}
.standings-cell-3.divided > span:first-child,
.standings-cell-3.divided > div:first-child { border-left: none; padding-left: 0; }

/* dense variant pairs well with .standings-table.dense */
.standings-table.dense .standings-cell-3 { gap: 4px; }
.standings-table.dense .standings-cell-3.divided > * { padding-left: 4px; }

/* show subtle placeholder when a sub-value is empty so three slots are always visible */
.standings-cell-3 > *:empty::before {
  content: '—';
  opacity: 0.6;
}

.multi-standings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(320px, 1fr));
  gap: 24px; /* visual breathing room between cards */
  margin: 16px 0;
}

#progress-bar-section {
    display: flex;
    align-items: center;
}

#fixture-progress-full {
    height:24px;
    width: 100%;
    border: 2px solid black;
    margin: 30px;
    padding: 5px;
}

#fixture-progress-bar {
    height:24px;
    width: 0%;
    color: var(--color-primary);
    border: var(--color-primary);
    background-color: var(--color-primary);
}

.flex-between {
    display: flex;
    justify-content: space-between;
}

.process-btn button {
    width: 100%;
}

#processed-fixtures {
    margin-left: 50px;
    font-weight: bold;
}

#total-finished-fixtures {
    margin-left: 50px;
    font-weight: bold;
}

.fip-status-section {
    margin-top: 16px;
    padding: 16px 16px;
    background-color: #f3f3f3;
}

.fip-status-result-data {
    display: flex;
    padding: 5px;
    text-align: left; /* Align text to the left */
}

.fip-status-result {
    font-weight: bold;
    text-align: right; /* Align text to the right */
}

/* =========================================
   =Containers
   ======================================= */
.table-container {
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
    overscroll-behavior-x: contain;
    touch-action: pan-x; /* allow horizontal panning */
    padding-bottom: 60px; /* Adjust as needed */
    margin: 30px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    z-index: 1;
    position: relative;
}
.table-container::-webkit-scrollbar {
    height: 10px;
}
.table-container::-webkit-scrollbar-thumb {
    background: var(--color-scrollbar);
    border-radius: 6px;
}

/* Compact action buttons in tables */
.update-fixture-btn.btn {
    height: 28px;
    font-size: 12px;
    padding: 0 12px;
    border-radius: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    margin: 20px auto;
    table-layout: auto; /* Allow table to resize as needed */
    min-width: 1100px; /* force horizontal scroll on narrow screens */
}

th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

th {
    background-color: var(--color-primary); /* Blue theme color */
    color: #fff; /* Font color for table header text */
    cursor: pointer; /* Show pointer cursor on hover for sortable columns */
}

th:hover {
    background-color: var(--color-primary-hover); /* Darker blue on hover */
}

tr:nth-child(odd) {
    background-color: #f0f8ff; /* Light blue */
}

tr:nth-child(even) {
    background-color: var(--color-bg); /* White */
}

tr:hover {
    background-color: #e6e6e6; /* Light gray on hover */
}

#search-controls {
    margin-bottom: 10px;
}

/* =========================================
   =Filters & Search
   ======================================= */
#filter-bar {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap onto the next line */
    gap: 10px; /* Add space between filters */
    padding: 10px;
    background-color: #f1f1f1;
    align-items: center; /* Align items vertically */
    justify-content: flex-start; /* Align items to the start of the container */
    margin-bottom: 20px; /* Add some space below the filter bar */
}

.filter-column {
    display: flex;
    flex-direction: column; /* Stack label and input/select vertically */
    align-items: flex-start; /* Align items to the start */
    min-width: 150px; /* Minimum width for each filter */
    max-width: 100%; /* Ensure it doesn't grow beyond the container's width */
}

.filter-search {
    flex-grow: 1; /* Allow search filter to grow and fill the available space */
    display: flex;
    align-items: center;
    max-width: 400px; /* Maximum width for the search input */
}

#search-input {
    width: 100%;
    padding: 5px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: 14px;
    outline: none;
}

#pagination-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 10px;
}

#pagination-controls button,
#pagination-controls label {
    margin-left: 10px; /* Add spacing between pagination elements */
}

#results-per-page {
    padding: 5px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: 14px;
}

#spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5); /* Semi-transparent white background */
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden; /* Hide the spinner overlay by default */
    z-index: 9999; /* Make sure the spinner overlay is on top of other elements */
}

.spinner {
    width: 100px;
    height: 100px;
}

#main-section {
    padding-bottom: 0; /* Remove the padding-bottom to make room for the spinner overlay */
    flex: 1;
}

#leagues-list.league-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px;
}

.league-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Add shadow effect */
    margin: 10px;
    width: 200px;
    height: 150px;
}

.league-info {
    display: flex;
    flex-direction: column;
}

.league-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.league-competition {
    font-size: 14px;
    color: #888;
}

.league-toggle {
    display: flex;
    align-items: center;
}

#search-input input[type=checkbox] {
    height: 0;
    width: 0;
    visibility: hidden;
}

.label-toggle {
    cursor: pointer;
    text-indent: -9999px;
    width: 80px;
    height: 40px;
    background: grey;
    display: block;
    border-radius: 100px;
    position: relative;
}

.label-toggle:after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 30px;
    transition: 0.3s;
}

input:checked + .label-toggle {
    background: #2ecc71;
}

input:checked + .label-toggle:after {
    left: calc(100% - 5px);
    transform: translateX(-100%);
}

.label-toggle:active:after {
    width: 50px;
}

#league-table-flag {
    margin-top: 3px;
    margin-right: 8px;
    width: 12px;
    height: 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: var(--color-bg);
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-accent);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--color-accent);
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

#league-save-button {
    width: 200px;
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
    min-width: 250px;
}

.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
}

.custom-select.open .custom-options {
    display: block;
}

.custom-select__trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    height: 35px;
    line-height: 35px;
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    cursor: pointer;
}

.custom-select__trigger span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Keep filter controls compact and aligned */
#filter-bar .custom-select-wrapper {
    margin: 0 6px;
}

#filter-bar .custom-select {
    min-width: 180px;
}

.arrow {
    position: relative;
    height: 15px;
    width: 15px;
}

.arrow::before, .arrow::after {
    content: '';
    position: absolute;
    bottom: 0px;
    width: 0.15rem;
    height: 100%;
    transition: all 0.5s;
}

.arrow::before {
    left: -5px;
    transform: rotate(-45deg);
    background-color: #fff;
}

.arrow::after {
    left: 5px;
    transform: rotate(45deg);
    background-color: #fff;
}

.custom-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #b5b5b5;
    border-top: none;
    background: var(--color-bg);
    transition: all 0.5s;
    z-index: 2;
}

.custom-option {
    position: relative;
    display: block;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    line-height: 40px;
    cursor: pointer;
    transition: all 0.5s;
}

.custom-option:hover {
    cursor: pointer;
    background-color: #eeeeee;
}

.custom-select.open .arrow::before {
    transform: rotate(45deg);
}

.custom-select.open .arrow::after {
    transform: rotate(-45deg);
}

.dropdown-container {
    width: 100%;
    display: flex;
    justify-content: start; /* Align the dropdowns to the left */
    margin-bottom: 1rem; /* Add some space below the dropdowns */
}

#standingsContainer {
    width: 100%;
    overflow-x: auto; /* If your table is wide, this will allow scrolling */
}



.category-header {
    text-align: center;
    vertical-align: middle;
}

#standingsTable tbody td {
    text-align: center;
    vertical-align: middle;
}

.align-left {
    text-align: left !important;
}

/* =========================================
   =Predictor Page
   ======================================= */
#predictor-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

#predictor-container .sidebar {
    width: 300px;
    padding: 20px;
    background-color: var(--color-bg-alt);
    border-right: 1px solid var(--color-border);
    border-radius: 5px;
}

#predictor-container .sidebar-title {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

#predictor-container .content {
    flex-grow: 1;
    padding: 20px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 5px;
}

#predictor-container .dropdown-box, 
#predictor-container .team-box {
    margin-bottom: 20px;
}

#predictor-container .team-name-box {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    text-align: center;
}

#predictor-container .dropdown {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
}

#predictor-container .btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    margin-top: 10px;
}

#predictor-container .btn:hover {
    background-color: var(--color-primary-hover);
}

#predictor-container .results-container {
    display: none;
    margin-top: 20px;
}

#predictor-container .results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#predictor-container .results-table th, 
#predictor-container .results-table td {
    padding: 10px;
    border: 1px solid var(--color-border);
    text-align: center;
}

#predictor-container .results-table th {
    background-color: var(--color-primary);
    color: #fff;
}

/* Team Management */
.team-management {
    padding: 20px;
}

.transfer-controls {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.filter-bar {
    margin: 20px 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.league-dropdown {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    min-width: 200px;
}

/* SOCIAL MEDIA STYlES */
.flex {
    display: flex;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.social-media-container {
    max-width: 1080px;
    padding: 0px 80px;
    display: flex;
    gap: 20px;
    margin: 0 auto;
    background-image: linear-gradient(to top, #0D0620, #092C55);
}

.social-media-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 80px 0px 40px 0px;
}

.social-media-title h1 {
    font-size: 64px;
    font-weight: 600;
    font-family: "Sen", "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #FFF;
    text-align: left;
    line-height: initial;
    letter-spacing: 1px;
}

.social-media-title h2 {
    font-size: 44px;
    font-weight: 500;
    font-family: "Sen", "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #FFF;
    text-align: left;
    line-height: initial;
    letter-spacing: 1px;
}

.social-media-title h3 {
    font-size: 32px;
    font-weight: 300;
    font-family: "Sen", "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #FFF;
    text-align: left;
    line-height: initial;
    letter-spacing: 1px;
}

.social-media-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0px 80px 0px;
}
.social-media-logo img {
    width: 200px;
}

.double-table {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.social-media-table {
    background-color: #FFF;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

.table-50 {
    width: 450px;
}

.table-100 {
    width: 920px;
}

.table-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-bottom: 1px solid #E0E0E0;
}

.table-row:last-child {
    border-bottom: none;
}

.table-header {
    background-color: #F3F3F3;
    color: #333;
    font-weight: bold;
    padding: 12px 20px;
    border-bottom: 1px solid #E0E0E0;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.table-cell {
    display: flex;
    vertical-align: middle;
    padding: 12px 20px;
    align-items: center;
}


/* max-width: 1024 - Navigation collapse */
@media (max-width: 1024px) {
    .burger-menu { display: block; }

    .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--color-primary);
        z-index: 10;
    }

    .navbar-left ul { flex-direction: column; width: 100%; }
    .navbar-left ul li { width: 100%; }
    .navbar-left ul li a { padding: 10px; width: 100%; display: block; }
    .burger-menu.active + .menu { display: flex; }
}

/* max-width: 700 - Mobile stacking and spacing */
@media (max-width: 700px) {
    .filter-column { width: 100%; }
    .filter-search { order: 1; width: 100%; }
    #filter-bar { justify-content: center; }
    .home-section { flex-direction: column; padding: 10px; }
    .login-wrapper { width: 90%; padding: 40px 20px; }
    .login-form-title { font-size: 24px; }
    .navbar-left li { margin: 0 10px; }
    .navbar-left li a { padding: 5px; }
    .navbar-right { flex-grow: 0; justify-content: flex-start; }
    .user-info-navbar .account-name,
    .user-info-navbar-option { margin-left: 10px; margin-right: 10px; }
    .data-page { margin: 10px 0; }
    .table-container { overflow-x: auto; padding: 0 10px; margin: 0px; }
    table { width: 100%; }
    th, td { white-space: nowrap; }
    .league-item { width: 100%; height: auto; }
    #search-controls { flex-direction: column; align-items: flex-start; }
    #search-input { width: 100%; margin-bottom: 10px; }
    #pagination-controls { flex-direction: column; align-items: flex-start; }
    #pagination-controls button,
    #pagination-controls label { margin: 5px 0; }
    #predictor-container { flex-direction: column; align-items: center; }
    #predictor-container .sidebar { width: 100%; border: none; border-bottom: 1px solid var(--color-border); border-radius: 0; margin-bottom: 20px; }
    #predictor-container .content { width: 100%; border: none; border-radius: 0; }
}

@media (max-width: 500px) {
  .multi-standings-grid { grid-template-columns: 1fr; }
}

/* max-width: 480 - Typographic and button sizing */
@media (max-width: 480px) {
    h1 { font-size: 1.25rem; }
    h2 { font-size: 1rem; }
    h3 { font-size: 1rem; }
    .navbar-left li { margin: 0 5px; }
    .navbar-left li a { padding: 5px; font-size: 14px; }
    .burger-menu { font-size: 20px; }
    .btn { font-size: 12px; height: 30px; }
    .alert { font-size: 14px; height: 40px; }
    .login-wrapper { width: 100%; padding: 20px; }
    .login-form-title { font-size: 20px; }
    .login-form-icon img { width: 100px; }
    .custom-select-wrapper { min-width: 100%; }
    .login-input-form { padding: 0 5px; margin: 0px; }
    .data-page { margin: 5px 0; }
    .home-page-item { padding: 10px; }
}

/* max-width: 375 - Smallest phones */
@media (max-width: 375px) {
    h1 { font-size: 1rem; }
    h2 { font-size: 0.875rem; }
    h3 { font-size: 0.875rem; }
    .btn { font-size: 10px; height: 25px; padding: 0 10px; }
    .alert { font-size: 12px; height: 35px; }
}

/* min-width: 1200 - Desktop layout and multi-standings 3 cols */
@media (min-width: 1200px) {
    #first-page-section {
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: 32px;
    }
    #first-page-section .database-section,
    #first-page-section .data-page { width: 100%; margin: 0; }
    #first-page-section .database-section { margin-right: 10px; }
    #first-page-section .data-page { margin-left: 10px; }

    .multi-standings-grid { grid-template-columns: repeat(3, minmax(380px, 1fr)); }

    /* custom-select wider */
    .custom-select-wrapper { min-width: 400px; }
}

/* min-width: 800 - Multi-standings 2 cols */
@media (min-width: 800px) {
  .multi-standings-grid { grid-template-columns: repeat(2, minmax(360px, 1fr)); }
}

/* min-width: 700 - Tablet adjustments */
@media (min-width: 700px) {
    .home-section { flex-direction: row; align-items: flex-start; }
    .buttons-data-page > div { flex-direction: row; align-items: center; }
    .process-btn button { width: 50%; }
    .apikey-section { flex-direction: row; }
}