/* Global Variables */
:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --header-height: 60px;
    --transition-speed: 0.3s;
    --primary-color: #007bff;
    --hover-color: #0056b3;
    --bg-dark: #1c1c1c;
    --bg-darker: #121212;
    --bg-lighter: #2a2a2a;
    --border-color: #3a3a3a;
    --text-light: #f8f9fa;
    --text-muted: #cccccc;
}

/* Body Styles */
body {
    font-family: sans-serif;
    /* Setting a slightly darker background for the body to help the dark table blend */
    background-color: var(--bg-darker); /* Slightly darker background */
    color: var(--text-light); /* Lighter default text color for better contrast */
    margin: 0; /* Remove default body margin */
    padding: 0; /* Remove default body padding */
}

/* Main Content Styles */
main {
    /* Slightly lighter dark grey for the main content area around the table */
    background-color: var(--bg-lighter); /* Darker grey for the main container */
    padding: 30px; /* Increase padding for better spacing around content */
    border-radius: 8px; /* Optional: add rounded corners */
    max-width: 1200px; /* Limit maximum width for better readability */
    margin: 20px auto; /* Center the main container and add vertical margin */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Add a subtle shadow */
}

/* Main Content Text Styles */
main h1, main p {
    color: var(--text-light); /* Light color for headings and paragraphs */
}

/* Header Styles */
header {
    position: sticky;
    top: 0;
    z-index: 1030; /* Ensure it's above most other content, matches Bootstrap's fixed-top z-index */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Subtle shadow below header */
}

.navbar {
    background-color: var(--bg-dark) !important; /* Slightly lighter dark than body, important to override Bootstrap bg-dark */
    padding-top: 10px;
    padding-bottom: 10px;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5em; /* Slightly larger brand text */
    color: var(--text-light) !important; /* Ensure brand text is light */
    display: flex; /* Use flexbox for logo and text alignment */
    align-items: center; /* Vertically center logo and text */
}

.navbar-brand img {
    width: 30px; /* Size for brand logo */
    height: 30px;
    margin-right: 10px; /* Space between logo and text */
    object-fit: contain;
}

.nav-link {
    color: var(--text-light);
    padding: 12px 15px;
    margin: 5px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease, 
                color 0.2s ease, 
                transform 0.2s ease;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-link i {
    min-width: 24px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.1em;
    transition: margin-right 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

.nav-link:active {
    transform: scale(0.98);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-link.active:hover {
    background-color: var(--hover-color);
    transform: translateX(3px);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1); /* Lighter border for toggler */
}

.navbar-toggler-icon {
    /* brighter white icon for better contrast */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba%28255,255,255,1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    filter: none;
}

.admin-sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px 5px;
}

.admin-sidebar.collapsed .nav-link i {
    margin-right: 0 !important;
}

.admin-sidebar.collapsed .nav-link span {
    display: none;
}

/* Admin Sidebar: standardize lateral menu item spacing */
.admin-sidebar .nav-link {
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease, 
                color 0.2s ease, 
                transform 0.2s ease;
}

/* Banner Styles */
.banner {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('/futsal_hero_background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255, 140, 0, 0.1) 0%, transparent 70%);
    z-index: 1;
}

.banner .container {
    position: relative;
    z-index: 2;
}

.banner .display-4 {
    color: #FF8C00;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -1px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .banner {
        padding: 60px 0;
        background-attachment: scroll;
    }
    
    .banner .display-4 {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .banner {
        padding: 40px 0;
    }
    
    .banner .display-4 {
        font-size: 2rem;
    }
}

/* Classification Title Styles */
.classification-title {
    color: var(--text-muted); /* Slightly less bright text color */
    margin-top: 0; /* Adjust top margin if needed */
    margin-bottom: 15px; /* Space below the title */
    text-align: left; /* Align title to the left */
    font-size: 1.4em; /* Make the title smaller */
    font-weight: bold; /* Keep the title bold */
}

/* Classification Divider Styles */
.classification-divider {
    border: none; /* Remove default border */
    height: 1px; /* Make the divider slightly thinner */
    background-color: var(--border-color); /* A darker grey color for the divider */
    margin-top: 0; /* Space above the divider */
    margin-bottom: 20px; /* Space below the divider before the table */
    width: 100%; /* Ensure it spans the container width */
}

/* Classification Table Styles */
.classification-table {
    margin-top: 0; /* Remove extra space above the table */
    border-collapse: separate; /* Needed for border-spacing */
    border-spacing: 0 8px; /* Vertical space between rows */
    width: 100%;
    color: var(--text-light); /* Light text color for the table */
    background-color: transparent !important;
}

.classification-table thead {
    display: table-header-group; /* Ensure header displays correctly */
}

.classification-table tbody {
    display: table-row-group; /* Ensure body displays correctly */
}

/* Classification Table Row Styles */
.classification-table tbody tr {
    background-color: var(--bg-lighter); /* Dark background for table rows */
    border-radius: 0px; /* Apply border radius to the row */
    overflow: hidden; /* Important to clip the background for the radius */
    transition: background-color 0.2s ease; /* Smooth transition for hover */
    border-bottom: 1px solid var(--bg-darker); /* Add a subtle bottom border for separation if needed */
}

.classification-table th,
.classification-table td {
    padding: 12px 8px; /* Adjust padding for a more compact look */
    vertical-align: middle;
    border: none; /* Remove default cell borders */
    font-size: 0.95em; /* Slightly smaller font size */
}

.classification-table thead th {
    background-color: #343a40; /* Darker background for header */
    color: var(--text-light); /* Light text color for header */
    border-bottom: none; /* Remove default border below header */
    font-weight: normal; /* Use normal font weight for header text */
    padding-top: 10px; /* Adjust padding */
    padding-bottom: 10px;
    border-radius: 0; /* Reset default */
}

/* Classification Table Header Corner Styles */
.classification-table thead th:first-child {
    border-top-left-radius: 0px; /* Changed to 0px */
    border-bottom-left-radius: 0px; /* Changed to 0px */
}

.classification-table thead th:last-child {
    border-top-right-radius: 0px; /* Changed to 0px */
    border-bottom-right-radius: 0px; /* Changed to 0px */
}

/* Classification Table Row Corner Styles */
.classification-table tbody tr th:first-child {
    border-top-left-radius: 0px; /* Apply radius to the Position cell - Changed to 0px */
    border-bottom-left-radius: 0px; /* Changed to 0px */
}

.classification-table tbody tr td:last-child {
    border-top-right-radius: 0px; /* Apply radius to the last cell - Changed to 0px */
    border-bottom-right-radius: 0px; /* Changed to 0px */
}

/* Classification Table Position Column Styles */
.classification-table thead th:first-child {
    width: 60px; /* Fixed width for position */
    text-align: center; /* Center position header */
}

/* Classification Table Numeric Column Styles */
.classification-table thead th:nth-child(n + 3) { /* Selects Pts and all columns after it */
    text-align: center;
    width: 50px; /* Give numeric columns a fixed width */
}

/* Classification Table Position Cell Styles */
.classification-table tbody tr th[scope="row"] { /* More specific selector */
    width: 60px; /* Fixed width for position */
    text-align: center;
    position: relative;
    overflow: hidden; /* Hide overflowing pseudo-element if needed */
    background-color: var(--bg-lighter); /* Ensure background matches rows */
    padding-left: 15px; /* Add padding to make space for the bar */
    color: var(--text-light); /* Ensure position number is visible */
    font-weight: bold; /* Make position number bold */
}

/* Vertical bar for position */
.classification-table tbody tr th[scope="row"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px; /* Width of the colored bar */
    background-color: transparent; /* Default transparent, will be overridden */
}

/* Classification Table Top 3 Positions Colors */
.classification-table tbody tr:nth-child(1) th[scope="row"]::before {
    background-color: #4CAF50; /* Green */
}

.classification-table tbody tr:nth-child(2) th[scope="row"]::before {
    background-color: #2196F3; /* Blue */
}

.classification-table tbody tr:nth-child(3) th[scope="row"]::before {
    background-color: #FFC107; /* Yellow */
}

/* Classification Table Text Alignment */
.classification-table td {
    text-align: right; /* Default right alignment for numeric columns */
}

/* Classification Table Team Name Column Styles */
.classification-table td:nth-child(2) {
    text-align: left; /* Left alignment for Team Name */
    display: flex; /* Use flexbox to align logo and text */
    align-items: center; /* Vertically center logo and text */
    gap: 10px; /* Space between logo and text */
    padding-right: 20px; /* Add some space before next column */
    flex-grow: 1; /* Allow this column to take up remaining space */
    min-width: 150px; /* Give the team name column a minimum width */
    font-weight: bold; /* Make team name bold */
}

/* Classification Table Numeric Column Text Alignment */
.classification-table td:nth-child(n + 3) { /* Selects Pts and all columns after it */
    text-align: center;
    width: 50px; /* Give numeric columns a fixed width to keep them compact */
    font-weight: normal; /* Ensure numeric stats are not bold */
}

/* Team Logo Styles */
.team-logo {
    width: 30px; /* Adjust size as needed */
    height: 30px;
    object-fit: contain; /* Ensure the image scales correctly */
}

/* Classification Table Hover Effect */
.classification-table tbody tr:hover {
    background-color: var(--border-color); /* Slightly lighter background on hover for better readability */
}

/* Remove Default Striped Styling Background */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: transparent; /* Remove default stripe background */
}

/* Table Container Overflow Handling */
.table-responsive {
    overflow-x: auto; /* Add horizontal scroll if needed on small screens */
}

/* Search Input Styles */
#teamSearch, #teamCardSearch, #playerCardSearch {
    background-color: var(--bg-lighter); /* Dark background */
    color: var(--text-light); /* Light text */
    border: 1px solid var(--border-color); /* Darker border */
    padding: 10px 15px; /* Adjust padding */
    border-radius: 6px; /* Rounded corners */
}

#teamSearch::placeholder, #teamCardSearch::placeholder, #playerCardSearch::placeholder {
    color: var(--text-muted); /* Lighter placeholder text */
    opacity: 0.7; /* Slightly transparent */
}

#teamSearch:focus, #teamCardSearch:focus, #playerCardSearch:focus {
    background-color: var(--border-color); /* Slightly lighter on focus */
    color: var(--text-light); /* Lighter text on focus */
    border-color: var(--primary-color); /* Highlight color */
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25); /* Bootstrap focus ring */
}

/* Admin Search Input Styles */
.input-group-text {
    background-color: var(--bg-lighter) !important;
    border-color: var(--border-color) !important;
    color: var(--text-light) !important;
}

.form-control.bg-dark {
    background-color: var(--bg-lighter) !important;
    border-color: var(--border-color) !important;
    color: var(--text-light) !important;
}

.form-control.bg-dark:focus {
    background-color: var(--border-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-light) !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25) !important;
}

.form-control.bg-dark::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7;
}

/* Jogos Page Styles */
.matches-title, .round-title {
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: 15px;
    text-align: left;
    font-size: 1.4em;
    font-weight: bold;
}

.matches-divider, .round-divider {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin-top: 0;
    margin-bottom: 20px;
    width: 100%;
}

.match-card {
    background-color: var(--bg-lighter); /* Darker background for match cards */
    color: var(--text-light); /* Light text color */
    border: none; /* Remove default border */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Enhanced shadow for better visibility */
}

.match-card .card-title {
    color: var(--text-light); /* Lighter color for card title */
    font-size: 1.1em;
    margin-bottom: 5px;
}

.match-card .card-text {
    font-size: 0.9em;
    color: var(--text-muted); /* Slightly muted text */
    margin-bottom: 15px;
}

.match-team-logo {
    width: 45px; /* Size for match logos */
    height: 45px;
    object-fit: contain;
    margin-bottom: 5px;
}

.team-name {
    font-size: 0.9em;
    font-weight: bold;
    color: var(--text-light);
    margin: 0;
}

.score h2 {
    font-size: 1.8em;
    font-weight: bold;
    color: #FF8C00; /* Orange color for scores */
    margin: 0 15px; /* Space around the score */
}

.vs {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-muted); /* Grey color for VS */
    margin: 0 10px; /* Space around VS */
}

.match-status {
    font-size: 0.8em;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block; /* Treat as block for padding/margin */
    margin-top: 10px;
}

.match-status.agendado {
    background-color: #ffc107; /* Yellow */
    color: #333; /* Dark text for contrast */
}

.match-status.em_andamento {
    background-color: #17a2b8; /* Blue */
    color: white;
}

.match-status.finalizado {
    background-color: #28a745; /* Green */
    color: white;
}

.match-status.finished {
    background-color: #28a745; /* Green */
    color: white;
}

.match-status.upcoming {
    background-color: #ffc107; /* Yellow */
    color: #333; /* Dark text for contrast */
}

/* Times Page Styles */
.teams-title {
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: 15px;
    text-align: left;
    font-size: 1.4em;
    font-weight: bold;
}

.teams-divider {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin-top: 0;
    margin-bottom: 20px;
    width: 100%;
}

.team-card {
    background-color: var(--bg-lighter); /* Darker background for team cards */
    color: var(--text-light); /* Light text color */
    border: none; /* Remove default border */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Enhanced shadow for better visibility */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Add box-shadow to transition */
}

.team-card:hover {
    transform: translateY(-5px); /* Lift card slightly on hover */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); /* Slightly more pronounced shadow on hover */
}

.team-card-logo {
    width: 40px; /* Adjust size for team card logos */
    height: 40px;
    object-fit: contain;
    border-radius: 50%; /* Make logo circular if desired */
    border: 2px solid #4a4a4a; /* Subtle border around logo */
    padding: 5px; /* Add some padding inside the border */
    background-color: var(--border-color); /* Background for the circular padding area */
}

.team-card .card-title {
    color: var(--text-light);
    font-size: 1.2em;
    margin-bottom: 5px;
}

.team-card .card-text {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.team-card .btn-primary {
    background-color: var(--primary-color); /* Bootstrap primary blue */
    border-color: var(--primary-color);
    font-size: 0.9em;
    padding: 8px 15px;
}

.team-card .btn-primary:hover {
    background-color: var(--hover-color);
    border-color: var(--hover-color);
}

/* Team Details Page Styles */
.team-details-title {
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center; /* Center the details title */
    font-size: 1.6em; /* Slightly larger title */
    font-weight: bold;
}

.team-details-divider {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin-top: 0;
    margin-bottom: 20px;
    width: 100%;
}

.team-details-logo {
    width: 100px; /* Larger logo for details page */
    height: 100px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid #4a4a4a;
    padding: 8px;
    background-color: var(--border-color);
}

/* Jogadores Page Styles */
.players-title {
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: 15px;
    text-align: left;
    font-size: 1.4em;
    font-weight: bold;
}

.players-divider {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin-top: 0;
    margin-bottom: 20px;
    width: 100%;
}

.player-card {
    background-color: var(--bg-lighter); /* Darker background for player cards */
    color: var(--text-light); /* Light text color */
    border: none; /* Remove default border */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Enhanced shadow for better visibility */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Add box-shadow to transition */
    height: 100%; /* Ensure consistent card heights */
}

.player-card:hover {
    transform: translateY(-5px); /* Lift card slightly on hover */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); /* Slightly more pronounced shadow on hover */
}

.player-card-photo {
    width: 60px; /* Adjusted size for player photos */
    height: 60px;
    object-fit: cover; /* Crop image to fill container */
    border-radius: 50%; /* Make the photo round */
    border: 2px solid #4a4a4a; /* Subtle border around photo */
    padding: 3px; /* Add some padding inside the border */
    background-color: var(--border-color); /* Background for the circular padding area */
}

.player-card .card-title {
    color: var(--text-light);
    font-size: 1.0em; /* Slightly smaller title for better fit */
    margin-bottom: 3px;
    line-height: 1.2;
}

.player-card .team-name-small {
    font-size: 0.8em; /* Smaller font for team name */
    color: var(--text-muted);
    margin-bottom: 8px;
}

.player-card .stats {
    font-size: 0.85em;
    color: var(--text-light); /* Highlight stats */
    font-weight: bold;
    margin-bottom: 4px; /* Reduced margin for multiple stats */
}

.player-card .stats:last-child {
    margin-bottom: 10px; /* Add the original bottom margin back for the last stat */
}

.player-card .card-body {
    padding: 15px; /* Reduced padding for more compact cards */
}

/* Responsive Grid for Player Cards */
@media (min-width: 1200px) {
    .player-cards-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .player-cards-grid .col {
        width: auto;
        max-width: none;
        flex: none;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .player-cards-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .player-cards-grid .col {
        width: auto;
        max-width: none;
        flex: none;
    }
}

/* Footer Styles */
footer {
    background-color: var(--bg-dark); /* Darker background for the footer */
    color: var(--text-muted); /* Light text color */
    padding: 40px 0; /* Add vertical padding */
    border-top: 1px solid var(--border-color); /* Add a subtle top border */
}

footer h5 {
    color: var(--text-light); /* Lighter color for footer headings */
    margin-bottom: 15px;
    font-size: 1.1em;
}

.footer-logo {
    width: 40px; /* Adjust logo size */
    height: 40px;
    object-fit: contain;
    vertical-align: middle; /* Align with text */
}

.site-name {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-light); /* Lighter color for site name */
    vertical-align: middle;
}

.footer-menu, .footer-contact {
    list-style: none; /* Remove default list bullets */
    padding: 0; /* Remove default padding */
    margin: 0; /* Remove default margin */
}

.footer-menu li, .footer-contact li {
    margin-bottom: 8px; /* Space between list items */
}

.footer-menu a, .footer-contact a {
    color: var(--text-muted); /* Link color */
    text-decoration: none; /* Remove underline */
    transition: color 0.2s ease; /* Smooth hover effect */
}

.footer-menu a:hover, .footer-contact a:hover {
    color: var(--primary-color); /* Highlight color on hover */
}

/* Social Icons Styling */
.social-icons a {
    color: var(--text-muted); /* Default icon color */
    font-size: 1.5em; /* Icon size */
    margin-right: 15px; /* Space between icons */
    transition: color 0.2s ease; /* Smooth hover effect */
    text-decoration: none; /* Ensure links have no underline */
}

.social-icons a:last-child {
    margin-right: 0; /* No margin for the last icon */
}

.social-icons a:hover {
    color: var(--primary-color); /* Highlight color on hover */
}

/* Copyright Section Styling */
.copyright-section {
    background-color: var(--bg-darker); /* Even darker background for copyright */
    color: #888888; /* Muted text color */
    padding: 15px 0; /* Vertical padding */
    font-size: 0.9em; /* Smaller font size */
}

.copyright-text {
    margin: 0; /* Remove default paragraph margin */
}

/* Admin Panel Responsive Enhancements */
.admin-header {
    background-color: var(--bg-dark);
    padding: 0 20px; /* Adjusted padding */
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0; /* Default for mobile-first */
    right: 0;
    z-index: 1030;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1), 
                padding var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    will-change: left, padding;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.admin-sidebar {
    background-color: var(--bg-lighter);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    z-index: 1020;
    transform: translateX(-100%); /* Hidden by default on mobile */
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1), 
                width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, width;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    padding-top: var(--header-height); /* Space for fixed header */
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-lighter);
}

.admin-sidebar::-webkit-scrollbar {
    width: 5px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: var(--bg-lighter);
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 5px;
}

.admin-content {
    padding: 15px;
    margin-top: var(--header-height);
    width: 100%;
    transition: margin-left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1),
                width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    will-change: margin-left, width;
    min-height: calc(100vh - var(--header-height));
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.3em; /* Slightly larger toggle icon */
    cursor: pointer;
    width: 44px; /* Ensure good tap size */
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 1031; /* Ensure it's above sidebar overlay */
}

.sidebar-toggle:hover, .sidebar-toggle:focus {
    background-color: rgba(255, 255, 255, 0.1);
    outline: none;
}

.sidebar-toggle:active {
    background-color: rgba(255, 255, 255, 0.2);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1015;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease, 
                visibility var(--transition-speed) ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.admin-sidebar.show {
    transform: translateX(0);
    padding-top: 0; /* Remove padding-top when shown as overlay */
}

/* Responsive Card Styles */
.dashboard-card, 
.admin-content .team-card, /* More specific for admin teams */
.admin-content .player-card, /* More specific for admin players */
.admin-content .match-card, /* More specific for admin matches */
.admin-content .user-card { /* More specific for admin users */
    background-color: var(--bg-lighter);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); 
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dashboard-card:hover, 
.admin-content .team-card:hover, 
.admin-content .player-card:hover, 
.admin-content .match-card:hover, 
.admin-content .user-card:hover {
    transform: translateY(-5px) scale(1.01); 
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25); 
}

/* Modal adjustments for small screens */
.modal-dialog {
    margin: 1.75rem auto; /* Reset to Bootstrap default with auto margins for horizontal centering */
    max-width: 500px; /* Standard Bootstrap modal width */
}

@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }
}

@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 1rem auto; /* Smaller margin but still centered */
        max-width: calc(100% - 20px); /* Prevent overflow on very small screens */
    }
}

/* Touch-Specific Improvements */
@media (hover: none) and (pointer: coarse) {
    .admin-sidebar .nav-link { /* Target admin sidebar links */
        padding: 15px;
        margin: 8px 10px;
    }
    
    .admin-content .btn-group .btn { /* Target admin content button groups */
        padding: 12px 18px; /* Increased padding for easier tapping */
    }
    
    .admin-content input, 
    .admin-content select, 
    .admin-content textarea, 
    .admin-content .form-control, 
    .admin-content .btn {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* Larger Breakpoint Adjustments */
@media (min-width: 769px) {
    .admin-header {
        left: var(--sidebar-width);
        padding-left: 20px; /* Original padding */
        padding-right: 20px;
    }
    
    .admin-header.expanded {
        left: var(--sidebar-collapsed-width);
    }
    
    .admin-sidebar {
        transform: translateX(0); /* Visible by default on larger screens */
        padding: 15px 10px;
        padding-top: 0; /* No need for header space when not overlay */
    }
    
    .admin-sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
    }
    
    .admin-sidebar.collapsed .nav-link {
        justify-content: center;
        padding: 12px 5px;
    }
    
    .admin-sidebar.collapsed .nav-link i {
        margin-right: 0;
        font-size: 1.3em;
    }
    
    .admin-sidebar.collapsed .nav-link span {
        display: none;
    }
    
    .admin-content {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
        padding: 25px; /* Increased padding for desktop */
    }
    
    .admin-content.expanded {
        margin-left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
    }
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .footer-menu, .footer-contact, .social-icons {
        text-align: center !important; /* Center align content on smaller screens */
    }
    .social-icons {
        margin-top: 10px; /* Add space above icons */
    }
    .social-icons a {
        margin: 0 8px; /* Adjust spacing for centered icons */
    }
    footer .row .col-md-3 {
        margin-bottom: 20px; /* Add bottom margin to columns on small screens */
    }
    footer .row .col-md-3:last-child {
        margin-bottom: 0; /* Remove margin for the last column */
    }
    .admin-content {
        padding: 15px; /* Standardized padding for mobile admin content */
        width: 100%; /* Ensure it takes full width */
        margin-left: 0;
    }
    
    .admin-header {
        left: 0;
        padding: 0 15px; /* Adjusted padding for mobile header */
    }
    
    .admin-content .match-card, /* Targeting admin specifically */
    .admin-content .team-card,
    .admin-content .player-card,
    .admin-content .dashboard-card,
    .admin-content .user-card {
        margin-bottom: 15px;
        padding: 15px; /* Slightly reduce padding inside cards on mobile */
    }
    
    /* Ensure admin card contents (logos, titles) are reasonably sized */
    .admin-content .team-logo, /* For admin teams list and matches */
    .admin-content .player-photo, /* For admin players list */
    .admin-content .dashboard-card-icon i {
        font-size: 2rem; /* Adjust icon sizes if they are too large */
    }
     .admin-content .team-card .team-logo,
     .admin-content .player-card .player-photo,
     .admin-content .match-card .team-logo { /* Specific for cards */
        width: 40px;
        height: 40px;
    }

    .admin-content .btn-group {
        display: flex;
        flex-direction: column;
        gap: 8px; /* Increased gap for better separation */
    }
    
    .admin-content .btn-group .btn,
    .admin-content .btn-group form { /* If forms are used for buttons */
        width: 100%;
        margin-bottom: 0; /* Remove individual margin if gap is used */
    }

    /* Modal adjustments for small screens */
    .modal-dialog {
        margin: 1rem auto; /* Smaller margin but still centered */
        max-width: calc(100% - 20px); /* Prevent overflow on very small screens */
    }
    .modal-content {
        border-radius: 8px; /* Softer corners */
    }
    .modal-body .row > [class*="col-"] {
        margin-bottom: 1rem; /* Spacing for stacked form elements in modals */
    }
    .modal-body .row > [class*="col-"]:last-child {
        margin-bottom: 0;
    }
    .admin-content h2 {
        font-size: 1.5rem; /* Adjust heading sizes */
    }
}

@media (max-width: 576px) {
  .classification-table,
  .standings-table {
    font-size: 0.75em; /* Slightly increased for readability from 0.7 */
  }
  
  .classification-table th,
  .classification-table td,
  .standings-table th,
  .standings-table td {
    padding: 8px 3px; /* Increased padding a bit */
  }
  
  .team-logo { /* General team logo for tables */
    width: 20px; /* Increased from 18px */
    height: 20px;
  }
  
  .admin-content .match-card .vs, /* Targeting admin specifically */
  .admin-content .match-card .score h2 { /* If h2 is used for score */
    font-size: 1.1em; /* Adjusted size */
  }
  
  /* Further adjustments for very small screens within admin context */
  .admin-content .card-title { /* General card title in admin */
    font-size: 1rem;
  }
  .admin-content .btn {
    font-size: 0.9rem; /* Smaller button text */
    padding: 8px 12px; /* Adjust button padding */
  }
  .admin-header {
    height: 50px; /* Slightly reduce header height */
  }
  .admin-content {
    margin-top: 50px; /* Adjust content margin for new header height */
    padding: 10px; /* Reduce padding further */
  }
   .admin-sidebar {
    width: 260px; /* Slightly reduce overlay sidebar width */
  }
  .admin-content h2 {
    font-size: 1.3rem; /* Adjust heading sizes */
  }
}

.cta-btn small.text-muted {
    color: #e0e0e0 !important; /* Lighter gray for better visibility */
}

.cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(28,28,28,0.95);
  color: #f8f9fa;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  z-index: 9999;
}
.cookie-banner .cookie-message {
  flex: 1 1 auto;
  margin-right: 1rem;
}
.cookie-banner .cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex: 0 0 auto;
}
.cookie-banner button {
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}
.cookie-banner button.accept {
  background-color: #28a745;
  color: #ffffff;
}
.cookie-banner button.decline {
  background-color: #dc3545;
  color: #ffffff;
}

@media (max-width: 576px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
  .cookie-banner .cookie-message {
    margin-bottom: 0.5rem;
  }
}

/* About Us Page Styles */
.about-us-content {
    padding: 2rem 0;
}

.about-us-content h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    font-weight: bold;
}

.about-us-content p {
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.about-us-content ul {
    list-style: none;
    padding-left: 0;
}

.about-us-content ul li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.about-us-content ul li::before {
    content: "\f058"; /* FontAwesome check-circle solid icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900; /* Ensure solid icon is used */
    position: absolute;
    left: 0;
    top: 4px; /* Adjust vertical alignment */
    color: var(--primary-color);
    font-size: 1.2em;
}