/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Basic Body Reset */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: #f3f4f6; /* A light grey background for content */
}

/* The Main Flexbox Container */
.page-container {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar Styles --- */
.sidebar {
    width: 260px;
    background: #141414;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    flex-shrink: 0; /* Prevents the sidebar from shrinking unexpectedly */
    transition: width 0.3s ease;
    height: 100vh;
    position: sticky; /* Sticks to the top as you scroll */
    top: 0;
}

.sidebar .logo {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: white;
    border-radius: 12px;
}
.sidebar .logo img {
    width: 100%;
    max-width: 120px;
}

.username-display {
    padding: 10px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    text-align: center;
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.1); /* Restored background */
    border-radius: 8px; /* Restored rounded corners */
}

.role-badge {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    color: white;
    background-color: #10b981; /* Default/Player */
}
.role-badge.role-Coach {
    background-color: #2563eb;
}

.sidebar h3 {
    font-size: 12px;
    text-transform: uppercase;
    color: #9CA3AF;
    margin: 15px 0 10px 0;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar a {
    display: flex;
    align-items: center;
    color: #f3f4f6;
    text-decoration: none;
    font-size: 16px;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar a:hover, .sidebar a.active {
    background: #d32f2f;
}
.sidebar a i {
    font-size: 18px;
    width: 24px;
    margin-right: 15px;
    flex-shrink: 0;
    text-align: center;
}
.sidebar .link-text {
    transition: opacity 0.2s;
}

.logout-form {
    margin-top: auto; /* Pushes to the bottom */
}
.logout-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background: #b23b3b; /* Softer red */
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    transition: background 0.3s ease-in-out;
}

/* --- Main Content Area --- */
.content-wrapper {
    flex-grow: 1; /* Allows content to take up the remaining space */
    padding: 2rem;
    min-width: 0; /* A flexbox fix to prevent content from overflowing */
}
.content-wrapper .background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://saiva003.mycafe24.com/wp-content/uploads/2025/03/coach-instructing-junior-football-team-scaled-1.jpg') no-repeat center/cover;
    opacity: 0.15;
    z-index: -1;
    filter: brightness(50%);
}


/* --- Responsive State 1: Laptop/Tablet --- */
@media (max-width: 992px) {
    .sidebar {
        width: 80px;
        padding: 15px;
    }
    .sidebar .link-text,
    .sidebar .username-display,
    .sidebar h3 {
        display: none; /* Hide text */
    }
    .sidebar a {
        justify-content: center; /* Center the icon */
    }
    .sidebar a i {
        margin-right: 0;
    }
    .sidebar .logo img {
        max-width: 40px;
    }
}

/* --- Responsive State 2: Mobile --- */
@media (max-width: 768px) {
    .page-container {
        flex-direction: column-reverse; /* Put sidebar at the bottom */
    }
    .sidebar {
        width: 100%;
        height: 65px;
        position: fixed; /* Fix it to the bottom */
        bottom: 0;
        left: 0;
        z-index: 1000;

        flex-direction: row; /* Layout links horizontally */
        align-items: center;
        justify-content: space-around; /* Evenly space the icons */
        padding: 0;
        border-top: 1px solid #374151;
    }
    .sidebar .logo, .sidebar .username-display, .sidebar h3 {
        display: none; /* Hide elements that don't fit */
    }
    .sidebar a {
        flex-direction: column;
        justify-content: center;
        height: 100%;
        margin-bottom: 0;
        padding: 8px 12px;
        font-size: 12px; /* Smaller font for icon labels if you add them */
    }
    .sidebar a i {
        margin-right: 0;
        font-size: 20px;
        margin-bottom: 4px;
    }
    /* This class is for the text on the mobile bottom bar */
    .sidebar .link-text {
        display: block; /* Show the text again on mobile */
        font-size: 11px;
    }
    
    .logout-form {
        margin-top: 0;
        height: 100%;
    }
    .logout-btn {
        height: 100%;
    }

    .content-wrapper {
        padding-bottom: 80px; /* Add padding to prevent content being hidden by the bottom bar */
    }
}

