body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 20px; /* Keep your original padding */
    min-height: 100vh; /* Ensure body takes full viewport height */
    overflow-y: auto;
    position: relative; /* Keep for dropdowns and other absolute elements */
    box-sizing: border-box; /* Ensure padding doesn't add to height */
}

h1 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.promoted {
    border: 2px solid #4caf50; /* Green border for promoted teams */
    border-radius: 8px; /* Match table row border-radius */
}

table { 
    width: 100%; 
    border-collapse: separate; /* For rounded borders */
    border-spacing: 0 10px; /* Space between rows */
    margin: 30px 0; 
    background-color: transparent; /* Remove table background */
}

thead th {
    background-color: #6200ea; /* Twitch purple for headers */
    color: #ffffff; 
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

th, td { 
    padding: 15px; 
    text-align: left; 
    background-color: #1e1e1e; /* Dark card-like background for rows */
    border: none;
    border-radius: 8px; /* Rounded corners for rows */
    transition: transform 0.2s ease, background-color 0.3s ease;
}

th:hover { 
    background-color: #7c4dff; /* Lighter purple on hover */
}

tr { 
    margin-bottom: 10px;
}

tr:hover td { 
    background-color: #2a2a2a; /* Subtle hover effect */
    transform: translateY(-2px); /* Slight lift on hover */
}

.sort-asc::after { 
    content: " ↑"; /* Up arrow for ascending */
    color: #b0b0b0; /* Gray to match existing style */
    margin-left: 5px;
}

.sort-desc::after { 
    content: " ↓"; /* Down arrow for descending */
    color: #b0b0b0; /* Gray to match existing style */
    margin-left: 5px;
}

.pagination { 
    margin: 0 0 20px 0; /* Adjusted margin to avoid overlap */
    text-align: center; 
    font-size: 1.1rem;
    position: sticky; /* Stick to top */
    top: 0; /* Stick at top of viewport */
    z-index: 1000; /* Ensure visibility */
    background-color: #121212; /* Match body background */
    padding: 10px 0; /* Padding for appearance */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

.pagination .pagination-btn { 
    margin: 0 5px; /* Reduced spacing for compact layout */
    text-decoration: none; 
    color: #bb86fc; /* Twitch-inspired purple */
    padding: 8px 12px; /* Smaller padding for compact buttons */
    background-color: #1e1e1e; /* Matches table row background */
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
    cursor: pointer; /* Ensure cursor indicates interactivity */
    display: inline-block; /* Ensure consistent layout */
    font-family: inherit; /* Match body font */
    border: none; /* Remove default button border */
    font-size: 0.9rem; /* Smaller font for compact layout */
}

.pagination .pagination-btn:hover { 
    background-color: #3700b3; /* Darker purple on hover */
    color: #ffffff; /* White text on hover */
    transform: translateY(-2px); /* Slight lift */
}

.pagination .pagination-btn:disabled { 
    background-color: #2a2a2a; /* Disabled state matches hover background */
    color: #b0b0b0; /* Grayed out text */
    cursor: not-allowed; /* Indicate non-interactivity */
    transform: none; /* No lift on disabled */
}

.pagination .pagination-input { 
    padding: 8px; /* Matches button padding */
    background-color: #1e1e1e; /* Matches table row and button background */
    border: 1px solid #333; /* Subtle border */
    color: #e0e0e0; /* Matches body text */
    border-radius: 5px; /* Rounded corners */
    width: 60px; /* Reduced width for compact layout */
    transition: border-color 0.3s ease; /* Smooth border transition */
    font-family: inherit; /* Match body font */
    text-align: center; /* Center the number */
    font-size: 0.9rem; /* Match button font size */
}

.pagination .pagination-input:focus { 
    border-color: #bb86fc; /* Purple focus border */
    outline: none; /* Remove default focus outline */
}

.pagination-ellipsis {
    color: #b0b0b0; /* Gray to match sort indicators */
    margin: 0 5px; /* Match button spacing */
    font-size: 0.9rem; /* Match button font size */
}

.search-box, .add-box { 
    margin: 20px 0; 
    display: flex; 
    gap: 15px; 
    flex-wrap: wrap; 
    justify-content: center;
}

.search-box input, .add-box input { 
    padding: 10px; 
    background-color: #1e1e1e; 
    border: 1px solid #333; 
    color: #e0e0e0; 
    border-radius: 5px; 
    width: 200px; 
    transition: border-color 0.3s ease;
}

.search-box input:focus, .add-box input:focus { 
    border-color: #bb86fc; 
    outline: none;
}

.search-box button, .add-box button { 
    padding: 10px 20px; 
    background-color: #6200ea; 
    color: #ffffff; 
    border: none; 
    border-radius: 5px; 
    cursor: pointer; 
    transition: background-color 0.3s ease;
}

.search-box button:hover, .add-box button:hover { 
    background-color: #7c4dff; 
}

.error { 
    color: #ff6b6b; /* Softer red for errors */
    text-align: center;
    margin-top: 10px;
}

img { 
    max-width: 80px; 
    border-radius: 5px; 
    border: 2px solid #bb86fc; /* Purple border for thumbnails */
}

.members-cell { 
    position: relative; 
}

.members-list { 
    display: none; 
    position: absolute; 
    background: #1e1e1e; 
    border: 1px solid #333; 
    padding: 10px; 
    z-index: 1; 
    color: #e0e0e0; 
    border-radius: 5px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.expand-btn { 
    cursor: pointer; 
    color: #bb86fc; 
    text-decoration: underline; 
}

.expand-btn:hover { 
    color: #ffffff; 
}

a { 
    color: #bb86fc; 
    text-decoration: none; 
    transition: color 0.3s ease;
}

a:hover { 
    color: #ffffff; 
}

.top-nav {
    display: flex;
    justify-content: flex-end; /* Align items to the right */
    align-items: center;
    padding: 10px 20px;
    background-color: #121212; /* Match dark theme */
}

.user-info {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: #e0e0e0; /* Match body text */
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #bb86fc; /* Match image border style */
    cursor: pointer; /* Indicate clickable */
}

.dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 40px; /* Below profile picture */
    right: 0; /* Align to right edge of user-info */
    background-color: #1e1e1e; /* Match table row background */
    border: 1px solid #333; /* Match other borders */
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Match members-list shadow */
    z-index: 1200; /* Above other elements */
    min-width: 150px;
    padding: 10px;
}

.dropdown-menu.show {
    display: block; /* Show when toggled */
}

.dropdown-menu a {
    display: block; /* Stack links vertically */
    padding: 8px 10px;
    color: #bb86fc; /* Match link color */
    text-decoration: none;
    font-size: 0.9rem; /* Match pagination button font */
}

.dropdown-menu a:hover {
    background-color: #2a2a2a; /* Match table row hover */
    color: #ffffff; /* Match link hover */
}

.dropdown-menu span {
    display: block;
    padding: 8px 10px;
    color: #e0e0e0; /* Match body text */
    font-weight: bold;
}

/* Adjust table and other elements to fit below the header */
.search-box, .pagination, table {
    margin: 20px;
}

/* Responsive design */
@media (max-width: 600px) {
    .top-nav {
        flex-direction: column;
        align-items: flex-start;
    }
    .user-info {
        flex-direction: column;
        align-items: flex-start;
    }
    .dropdown-menu {
        position: static; /* Stack below in mobile */
        width: 100%;
    }
}

/* Additional styles for team_details.html */
.team-box {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.members-section {
    margin-top: 15px;
}

.members-toggle {
    display: none;
}

.members-label {
    cursor: pointer;
    color: #bb86fc;
    margin-left: 5px;
}

.members-box {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background-color: #2a2a2a;
    border-radius: 5px;
}

.members-toggle:checked ~ .members-box {
    display: block;
}

.no-members {
    margin-top: 10px;
    color: #b0b0b0;
}

.banner, .thumbnail {
    max-width: 100%;
    border-radius: 5px;
    margin: 10px 0;
}

select {
    padding: 10px;
    background-color: #1e1e1e;
    border: 1px solid #333;
    color: #e0e0e0;
    border-radius: 5px;
    width: 220px; /* Match input width */
    transition: border-color 0.3s ease;
}

select:focus {
    border-color: #bb86fc;
    outline: none;
}

.success {
    color: #4caf50;
    text-align: center;
    margin: 10px 0;
}

.progress-bar {
    width: 220px; /* Match input/select width */
    height: 10px;
    background-color: #2a2a2a; /* Dark background */
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%; /* Placeholder: no progress */
    height: 100%;
    background-color: #bb86fc; /* Twitch purple */
    transition: width 0.3s ease;
}
.dropdown-menu a.active {
    background-color: #3700b3; /* Darker purple for active link */
    color: #ffffff; /* White text */
    font-weight: bold; /* Emphasize active link */
}
/* Footer styling */
/* Footer: Fixed at bottom, styled to match theme */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1e1e1e; /* Match table row background */
    color: #e0e0e0; /* Match body text */
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    z-index: 1000; /* Ensure it’s above other elements */
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

.clear-filters {
    text-align: center;
    margin: 10px 0;
}
.clear-filters-btn {
    padding: 10px 20px;
    background-color: #6200ea;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}
.clear-filters-btn:hover {
    background-color: #7c4dff;
}
.analytics-box {
    background-color: #1e1e1e; /* Match table row background */
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Match team-box shadow */
}

.analytics-box h2 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analytics-box p {
    color: #e0e0e0;
    margin: 10px 0;
}

.analytics-box canvas {
    max-width: 100%;
    margin: 20px 0;
}

.analytics-box ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.analytics-box ul li {
    color: #e0e0e0;
    padding: 5px 0;
    font-size: 0.9rem;
}
.analytics-box ul.team-member-changes li.gained {
    color: #00bcd4;
}
.analytics-box ul.team-member-changes li.lost {
    color: #ff6b6b;
}
.highlight-number {
    color: #bb86fc; /* Twitch purple for prominence */
    font-weight: 700; /* Bold to stand out */
    font-size: 1.0rem; /* Slightly larger than surrounding text */
    background-color: #2a2a2a; /* Subtle background to match table row hover */
    padding: 2px 6px; /* Small padding for visual separation */
    border-radius: 4px; /* Rounded corners to match other elements */
    display: inline-block; /* Ensure padding applies correctly */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
}

.highlight-number:hover {
    background-color: #3700b3; /* Darker purple on hover, matches pagination button */
    transform: translateY(-1px); /* Subtle lift on hover, matches table rows */
}
/* styles.css (add at the end) */
.notification-info {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 20px; /* Space between notification icon and user dropdown */
}

.notification-icon {
    cursor: pointer;
    font-size: 1.5rem;
    color: #bb86fc; /* Twitch purple */
}


.notification-dropdown {
    display: none;
    position: absolute;
    top: 40px; /* Below notification icon */
    right: 0; /* Align to right edge of notification-info */
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1200;
    min-width: 250px;
    padding: 10px;
}


.notification-dropdown.show {
    display: block;
}

.notification-header {
    color: #e0e0e0;
    font-weight: bold;
    padding: 8px 10px;
    border-bottom: 1px solid #333;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 5px 0;
}

.notification-item {
    position: relative; /* For positioning the close button */
    padding: 10px;
    border-bottom: 1px solid #333;
    background-color: #1e1e1e; /* Default background */
    color: #e0e0e0;
}

.notification-item.unread {
    background-color: #2a2a2a; /* Slightly lighter for highlight */
}

.notification-close {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
    font-size: 16px;
    color: #e0e0e0;
}

.notification-close:hover {
    color: #ff5555; /* Red on hover for visibility */
}

.notification-item p {
    margin: 0;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.notification-link {
    color: #bb86fc;
    margin-right: 10px;
}

.notification-link:hover {
    color: #ffffff;
}

.notification-date {
    display: block;
    color: #b0b0b0;
    font-size: 0.8rem;
    margin-top: 5px;
}

.mark-read-btn {
    padding: 5px 10px;
    background-color: #6200ea;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

.mark-read-btn:hover {
    background-color: #7c4dff;
}

.load-more-notifications {
    display: block;
    padding: 8px 10px;
    color: #bb86fc;
    text-align: center;
    font-size: 0.9rem;
}

.load-more-notifications:hover {
    background-color: #2a2a2a;
    color: #ffffff;
}


.notification-badge {
    position: absolute;
    top: -8px; /* Adjust to position above and to the right of bell */
    right: -8px;
    background-color: #bb86fc; /* Twitch purple */
    color: #ffffff; /* White text */
    font-size: 0.7rem; /* Small font */
    font-weight: bold;
    border-radius: 50%; /* Circular badge */
    width: 18px; /* Fixed size */
    height: 18px;
    line-height: 18px; /* Center text vertically */
    text-align: center;
    border: 1px solid #1e1e1e; /* Subtle border to match theme */
    display: none; /* Hidden when count is 0 */
}