/* Sports Directory Design System */
:root {
    /* Primary Brand Colors - Modern Sports Palette */
    --primary-color: #0891b2;        /* Vibrant teal - energetic but professional */
    --primary-light: #22d3ee;        /* Lighter teal for accents */
    --primary-dark: #0e7490;         /* Darker teal for depth */
    --secondary-color: #475569;       /* Slate gray - sophisticated neutral */
    
    /* Accent Colors */
    --accent-color: #f97316;          /* Energetic orange - call-to-action */
    --accent-light: #fed7aa;          /* Light orange for backgrounds */
    
    /* Semantic Colors */
    --success-color: #16a34a;         /* Fresh green - positive actions */
    --danger-color: #dc2626;          /* Clear red - warnings/errors */
    --warning-color: #eab308;         /* Bright yellow - attention */
    --info-color: #0891b2;            /* Same as primary for consistency */
    
    /* Background Colors */
    --bg-primary: #ffffff;            /* Pure white - clean base */
    --bg-secondary: #f8fafc;          /* Very light gray - subtle sections */
    --bg-tertiary: #e2e8f0;           /* Light gray - borders/dividers */
    --bg-accent: #0891b2;             /* Primary color for headers */
    
    /* Text Colors */
    --text-primary: #0f172a;          /* Near black - high contrast */
    --text-secondary: #475569;        /* Medium gray - secondary text */
    --text-muted: #64748b;            /* Light gray - muted text */
    --text-inverse: #ffffff;          /* White text for dark backgrounds */
    
    /* Border & Shadow */
    --border-color: #e2e8f0;          /* Light gray borders */
    --border-color-dark: #cbd5e1;     /* Slightly darker borders */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Focus & Interaction */
    --focus-ring: 0 0 0 2px var(--primary-light);
    --focus-ring-offset: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--primary-color);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* Layout */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    background-color: var(--bg-secondary);
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(8, 145, 178, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(249, 115, 22, 0.02) 0%, transparent 50%);
    color: var(--text-primary);
    margin: 0;
    font-size: 1rem;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global Bootstrap Override - Ensure all bg-primary uses our theme */
.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 0.75rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
    padding: 1rem 0;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

h5 {
    font-size: 1.125rem;
    font-weight: 600;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Container for page content */
.container {
    max-width: 1200px; /* Set max width for larger screens */
    margin: 0 auto; /* Center the container */
    padding: 0 5px; /* Add side padding */
}

/* Divider Line */
.divider {
    border-top: 1px solid #cbcbcb;
    margin: 15px 0;
}

/* Filter Styles */
.day-filter, .sport-filter, .playLevel-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
}

.toggle-filters {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #b0b0b0;
    padding-bottom: 10px; /* Adds spacing before the line */
    margin-bottom: 10px;
}

/* Box Styles for Days, Sports, Play Levels, and Toggle Buttons */
.day-box, .sport-box, .playLevel-box, .toggle-button, .signuptype-box {
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    text-align: center;
    user-select: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.day-box:hover, .sport-box:hover, .playLevel-box:hover, .toggle-button:hover, .signuptype-box:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
}

.day-box.active, .sport-box.active, .playLevel-box.active, .signuptype-box.active, .toggle-button.active {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Navbar and Filter Button Styles */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    box-shadow: var(--shadow-md);
    border: none;
}

.navbar-brand {
    font-weight: 600;
    color: var(--text-inverse) !important;
    transition: opacity var(--transition-fast);
}

.navbar-brand:hover {
    opacity: 0.9;
    color: var(--text-inverse) !important;
}

.navbar-text {
    color: rgba(255, 255, 255, 0.7) !important;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-base);
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-inverse);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.filter-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    color: var(--text-inverse);
}

.filter-toggle i {
    font-size: 1rem;
}

.filter-toggle:focus {
    box-shadow: var(--focus-ring-offset);
    outline: none;
    color: var(--text-inverse);
}

.filter-count-badge {
    background: var(--accent-color);
    color: var(--text-inverse);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    margin-left: 0.5rem;
    min-width: 1.5rem;
    text-align: center;
    animation: pulse-in 0.3s ease;
}

@keyframes pulse-in {
    0% { 
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Filter Status Bar */
.filter-status-bar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-status-bar::after {
    content: attr(data-count) " results";
    font-size: 12px;
    color: #6c757d;
    display: none; /* Hide by default, shown by JavaScript */
}

.results-count {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.active-filters-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

/* Filter Section Styling */
.filter-section {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Filter Option Boxes */
.day-box, .sport-box, .playLevel-box, .signuptype-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.day-box:hover, .sport-box:hover, .playLevel-box:hover, .signuptype-box:hover {
    background-color: #e9ecef;
}

.day-box.active, .sport-box.active, .playLevel-box.active, .signuptype-box.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Filter Box Styles (common for all filter types) */
.filter-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    background-color: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base) ease;
    user-select: none;
    box-shadow: var(--shadow-sm);
    color: var(--text-secondary);
}

.filter-box:hover {
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
}

.filter-box.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-inverse);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
    position: relative;
}

.filter-box.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
    border-radius: calc(var(--radius-md) + 2px);
    z-index: -1;
    opacity: 0.3;
    animation: active-glow 2s ease-in-out infinite;
}

@keyframes active-glow {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.02);
    }
}

.filter-box.active .badge {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: var(--text-inverse);
}

/* Toggle Switch Styling */
.form-check-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}

.form-check-input {
    background-color: #6c757d;
    border-color: #6c757d;
}

.form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.form-check-input:focus {
    box-shadow: var(--focus-ring);
    border-color: var(--primary-light);
}

.form-check-input:checked:focus {
    box-shadow: 0 0 0 0.25rem rgba(8, 145, 178, 0.25);
    border-color: var(--primary-color);
}

/* Table Styles */
.table {
    font-size: 0.9rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
}

.table td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Enhanced league name styling */
.table td:nth-child(2) a {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.table td:nth-child(2) a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Enhanced sport column styling */
.table td:nth-child(1) {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Secondary text styling for less important columns */
.table td:nth-child(3), 
.table td:nth-child(4), 
.table td:nth-child(5),
.table td:nth-child(6),
.table td:nth-child(7) {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Table Header Styling */
.table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.table th {
    color: var(--text-inverse);
    background: transparent;
    font-weight: 600;
    border-bottom: none;
    white-space: nowrap;
    padding: 1.25rem 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.table th:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.table th.sorted-asc::after,
.table th.sorted-desc::after {
    margin-left: 0.5rem;
    color: white;
}

/* First row of the table (header row) rounded corners */
.table thead tr:first-child th:first-child {
    border-top-left-radius: 0.375rem;
}

.table thead tr:first-child th:last-child {
    border-top-right-radius: 0.375rem;
}

.table td {
    vertical-align: middle;
}

/* Optimized Column Width Settings - Fixed alignment */
th:nth-child(1), td:nth-child(1) {
    width: 12%; /* Sport column */
    min-width: 90px;
}

th:nth-child(2), td:nth-child(2) {
    width: 24%; /* League column */
    min-width: 180px;
}

th:nth-child(3), td:nth-child(3) {
    width: 10%; /* Level column */
    min-width: 80px;
}

th:nth-child(4), td:nth-child(4) {
    width: 8%; /* Day column */
    min-width: 60px;
}

th:nth-child(5), td:nth-child(5) {
    width: 10%; /* Type column */
    min-width: 80px;
}

th:nth-child(6), td:nth-child(6) {
    width: 16%; /* Location column */
    min-width: 120px;
}

th:nth-child(7), td:nth-child(7) {
    width: 10%; /* Start Date column */
    min-width: 90px;
}

th:nth-child(8), td:nth-child(8) {
    width: 10%; /* Game Times column */
    min-width: 90px;
}

th:nth-child(9), td:nth-child(9) {
    width: 12%; /* Signup Options column - wider to accommodate both options */
    min-width: 100px;
    text-align: center;
}

/* Responsive table improvements */
@media (max-width: 1200px) {
    th:nth-child(6), td:nth-child(6) {
        display: none; /* Hide location on smaller screens */
    }
    
    th:nth-child(2), td:nth-child(2) {
        width: 25%; /* Give more space to league name */
    }
}

@media (max-width: 992px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    th:nth-child(5), td:nth-child(5) {
        display: none; /* Hide signup type on tablet */
    }
    
    /* Optimize signup options for smaller screens */
    .signup-badge {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
        gap: 0.2rem;
    }
    
    .signup-options {
        gap: 0.3rem;
    }
}

tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

tr:hover {
    background-color: var(--primary-light) !important;
    background-color: rgba(8, 145, 178, 0.08) !important;
    transform: scale(1.005);
    transition: all var(--transition-base);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.green-check, .text-success {
    color: var(--success-color) !important;
}

.red-cross, .text-danger {
    color: var(--danger-color) !important;
}

.highlight-red {
    color: var(--danger-color);
    font-weight: 600;
    background-color: rgba(220, 38, 38, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: var(--radius-sm);
}

/* Keyword Search Styles */
.keyword-search .input-group {
    margin-bottom: 0.5rem;
}

.keyword-search input[type="text"] {
    border-radius: 0.375rem 0 0 0.375rem;
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.keyword-search input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: var(--focus-ring);
    outline: none;
}

.keyword-search .btn {
    border-radius: 0 0.375rem 0.375rem 0;
    border: 1px solid var(--border-color);
    border-left: none;
    padding: 0.375rem 0.75rem;
    background-color: white;
    color: var(--secondary-color);
    transition: all var(--transition-speed) ease;
}

.keyword-search .btn:hover {
    background-color: var(--light-color);
    color: var(--danger-color);
}

.keyword-search small {
    font-size: 0.75rem;
    line-height: 1.2;
}

/* Highlight matching text */
.search-highlight {
    background: linear-gradient(135deg, var(--accent-color), #fbbf24);
    color: var(--text-inverse);
    padding: 0.125rem 0.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Main Page Search Section */
.search-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: visible;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.search-section .input-group-lg .form-control {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    border-radius: 0;
    box-shadow: none;
    transition: all var(--transition-speed) ease;
}

.search-section .input-group-lg .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(8, 145, 178, 0.15);
}

.search-section .input-group-text {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem 0 0 0.5rem;
    border: 2px solid var(--primary-color);
}

.search-section .input-group-text.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

.search-section .form-control {
    border-left: none;
    border-right: none;
    border-top: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.search-section .btn {
    border-radius: 0 0.5rem 0.5rem 0;
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    transition: all var(--transition-speed) ease;
}

.search-section .btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.search-section small {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Advanced Search Autocomplete */
.search-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}

.autocomplete-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--bg-secondary);
    transition: background-color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: var(--bg-secondary);
}

.autocomplete-item.selected {
    background-color: var(--primary-color);
    color: var(--text-inverse);
}

.autocomplete-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.autocomplete-text {
    font-weight: 500;
}

.autocomplete-description {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.autocomplete-item.selected .autocomplete-description {
    color: rgba(255, 255, 255, 0.8);
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 1080px) and (min-resolution: 2dppx), 
       (max-width: 1080px) and (-webkit-min-device-pixel-ratio: 2), 
       (max-width: 700px) {
    body {
        font-size: calc(16px + 1vw); /* Dynamic scaling for a responsive font size */
        overflow-x: hidden; /* Prevent horizontal overflow on smaller screens */
    }

    .container {
        max-width: 100%; /* Set max width to full width */
        padding: 0 2px; /* Reduce padding for smaller screens */
        margin: 0; /* Remove margins */
        overflow-x: auto; /* Allow horizontal scrolling if necessary */
    }

    .day-box, .sport-box, .playLevel-box, .signuptype-box, .toggle-button {
        font-size: calc(16px + 1vw); /* Set a responsive size */
        padding: 30px 30px;
    }

    table {
        width: 100%; /* Ensure the table takes up the full width */
        table-layout: auto; /* Allow table to auto-adjust column widths */
        border-collapse: collapse; /* Make sure cells are not spaced out */
    }

    th, td {
        font-size: calc(16px + 1vw); /* Ensure table cells scale dynamically */
        padding-left: 3px; /* Adjust padding for a more compact layout */
        padding-right: 3px; /* Adjust padding for a more compact layout */
        padding-top: 5px;
        padding-bottom: 5px;
        word-break: break-word; /* Ensure content wraps properly within cells */
        overflow-wrap: break-word; /* Break long words to fit within cells */
    }

    /* Specific H1 style for high-density and smaller screens */
    h1 {
        font-size: calc(40px + 1vw); /* Adjust the header font size for small screens */
        background-color: transparent;
        color: var(--primary-color); /* Use theme color */
    }

    /* Prevent wrapping for specific columns */
    td.sport, td.day, td.start-date {
        white-space: nowrap; /* Keep content on a single line */
        overflow: hidden; /* Hide any overflow */
        text-overflow: ellipsis; /* Add ellipsis if content overflows */
        font-size: calc(16px + 1vw); /* Dynamically scale these columns */
    }

    td.game-times {
        white-space: normal; /* Allow wrapping */
        word-break: break-word; /* Break long words if needed */
        overflow-wrap: break-word; /* Ensure text wraps within words */
        max-width: 100%; /* Allow the cell to use the full width available */
    }
}

.hidden {
    display: none;
}

th.sorted-asc::after {
    content: " ↑";
    color: white;
}

th.sorted-desc::after {
    content: " ↓";
    color: white;
}

/* Card Styles */
.card {
    border: none;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    font-weight: 500;
}

/* Signup Options Styling */
.signup-options {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.signup-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.signup-badge.available {
    background-color: rgba(22, 163, 74, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.signup-badge.unavailable {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.signup-badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.signup-indicator {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .day-box, .sport-box, .playLevel-box, .signuptype-box, .toggle-button {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .day-box, .sport-box, .playLevel-box, .signuptype-box {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .filter-box {
        padding: 0.375rem 0.625rem;
        font-size: 0.8125rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    .offcanvas {
        max-width: 280px;
    }
    
    .filter-toggle {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .filter-toggle .filter-text {
        display: none;
    }
    
    /* Mobile floating filter hint */
    .mobile-filter-hint {
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        background: var(--primary-color);
        color: var(--text-inverse);
        padding: 0.75rem 1rem;
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-lg);
        font-size: 0.875rem;
        font-weight: 500;
        z-index: 1000;
        animation: bounce-hint 2s ease-in-out infinite;
        cursor: pointer;
        border: none;
        display: none;
    }
    
    .mobile-filter-hint.show {
        display: block;
    }
    
    .mobile-filter-hint:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
    }
    
    @keyframes bounce-hint {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-8px); }
    }
}

.signup-type-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 2px; /* Adjust gap as needed */
    justify-content: center; /* Center align the buttons */
    margin-bottom: 10px;
    border-bottom: 1px solid #b0b0b0;
    padding-bottom: 10px; /* Adds spacing before the line */
    
}

.playLevel-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 2px; /* Adjust gap as needed */
    justify-content: center; /* Center align the buttons */
}

.filter-content {
    display: none; /* Initially collapsed */
    transition: max-height 0.3s ease-out;
}

.filter-header {
    cursor: pointer;
    user-select: none;
}

/* Badge Styling */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    text-transform: none;
}

/* Offcanvas Styling */
.offcanvas {
    max-width: 350px;
    z-index: 1050;
    box-shadow: -0.25rem 0 1rem rgba(0, 0, 0, 0.15);
}

.offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.offcanvas-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

.filter-title {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.offcanvas-title {
    font-weight: 600;
    color: var(--text-inverse) !important;
}

/* Enhanced Animations */
@keyframes fadeIn {
    0% { 
        opacity: 0;
        transform: translateY(10px);
    }
    100% { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes countUp {
    0% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.league-card, tbody tr {
    animation: fadeIn 0.4s ease-out;
}

.filter-box.active {
    animation: scaleIn 0.2s ease-out;
}

.results-count {
    animation: countUp 0.3s ease-out;
}

/* Staggered animation for cards */
.league-card:nth-child(1) { animation-delay: 0ms; }
.league-card:nth-child(2) { animation-delay: 50ms; }
.league-card:nth-child(3) { animation-delay: 100ms; }
.league-card:nth-child(4) { animation-delay: 150ms; }
.league-card:nth-child(5) { animation-delay: 200ms; }

/* Table row staggered animation */
tbody tr:nth-child(1) { animation-delay: 0ms; }
tbody tr:nth-child(2) { animation-delay: 30ms; }
tbody tr:nth-child(3) { animation-delay: 60ms; }
tbody tr:nth-child(4) { animation-delay: 90ms; }
tbody tr:nth-child(5) { animation-delay: 120ms; }

/* Card Styling for Mobile */
.league-card .card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-slow);
    background-color: var(--bg-primary);
}

.league-card .card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.league-card .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-bottom: none;
    padding: 1rem 1.25rem;
    color: var(--text-inverse);
}

.league-card .card-header .badge {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-inverse);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.league-card .card-body {
    padding: 1.25rem;
    background-color: var(--bg-primary);
}

.league-card .card-title a {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
}

.league-card .card-title a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.signup-indicator {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Focus styles for accessibility */
button:focus, a:focus, input:focus, select:focus, textarea:focus, [tabindex]:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* Print styles */
@media print {
    .navbar, .filter-status-bar, .filter-toggle, #filterOffcanvas {
        display: none !important;
    }
    
    .d-none.d-lg-block {
        display: block !important;
    }
    
    .d-lg-none {
        display: none !important;
    }
    
    body {
        background-color: white;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .table {
        box-shadow: none;
    }
}

.table tbody tr[data-sport]:first-of-type {
    border-top: 3px solid var(--primary-color);
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.005);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
    height: 1.25rem;
}

.loading-skeleton.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.loading-skeleton.skeleton-text:last-child {
    width: 60%;
}

.loading-skeleton.skeleton-header {
    height: 2rem;
    margin-bottom: 1rem;
}

.loading-skeleton.skeleton-card {
    height: 8rem;
    margin-bottom: 1rem;
}

.loading-skeleton.skeleton-table-row {
    height: 3rem;
    margin-bottom: 0.25rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Loading overlay for initial page load */
.content-loading {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.content-loaded {
    opacity: 1;
    pointer-events: auto;
}

/* Filter loading state */
.filter-loading {
    position: relative;
}

.filter-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 10;
}

.filter-loading::before {
    content: '';
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.time-indicator {
    position: relative;
    padding-left: 1.5rem;
}

.time-indicator.early-morning::before {
    content: "🌅";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.time-indicator.late-night::before {
    content: "🌙";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Enhanced Button Styles */
.btn {
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    border-width: 2px;
    position: relative;
    overflow: hidden;
}

.btn:focus {
    box-shadow: var(--focus-ring-offset);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--text-inverse);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: var(--text-inverse);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary:focus {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: var(--text-inverse);
}

/* Quick Filter Buttons */
.quick-filters .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.quick-filters .btn i {
    margin-right: 0.375rem;
    transition: transform var(--transition-fast);
}

.quick-filters .btn:hover i {
    transform: scale(1.1);
}

.quick-filters .btn.active {
    background: linear-gradient(135deg, var(--accent-color), #fbbf24);
    border-color: var(--accent-color);
    color: var(--text-inverse);
    box-shadow: var(--shadow-md);
}

.quick-filters .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--transition-slow);
}

.quick-filters .btn:hover::before {
    left: 100%;
}

/* Popular League Indicators */
.popular-indicator {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--accent-color), #fbbf24);
    color: var(--text-inverse);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-xl);
    margin-left: 0.5rem;
    animation: pulse-glow 2s ease-in-out infinite;
}

.popular-indicator i {
    margin-right: 0.25rem;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(249, 115, 22, 0);
    }
}

/* Weekend highlight */
.weekend-league {
    position: relative;
}

.weekend-league::before {
    content: '🌟';
    position: absolute;
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
}

/* New league indicator */
.new-league-indicator {
    background: var(--success-color);
    color: var(--text-inverse);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}


