
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* background-color: #f8f9fa; */
    background-color: #132440;
    /* color: #333; */
    color: #F5EFE6;
    line-height: 1.6;
    transition: padding-left 0.3s ease;
}

body.sidebar-open {
    padding-left: 250px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    transition: margin-left 0.3s ease;
}

body.sidebar-open .container {
    margin-left: 0;
}

/* Header */
header {
    /* background: linear-gradient(135deg, #007bff, #0056b3); */
    background: #3C467B;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-section a {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s;
}

.auth-section a:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Navigation */
nav {
    /* background-color: white; */
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1001;
}

.nav-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-tabs a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #007bff;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.nav-tabs a:hover, .nav-tabs a.active {
    border-bottom-color: #007bff;
}

/* Filter Toggle Button - Always Visible */
#filter-toggle {
    /* background-color: #007bff; */
    background-color: #132440;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1002;
    transition: left 0.3s ease;
}

body.sidebar-open #filter-toggle {
    left: 251px;
}

/* Sidebar for Filters - All Screen Sizes - Higher Z-Index */
.filter-sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100vh;
    /* background-color: white; */
    background-color: #132440;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    z-index: 1005;
    overflow-y: auto;
    padding: 1rem;
}

.filter-sidebar.open {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1004;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    float: right;
    color: #999;
    margin-bottom: 1rem;
}

/* Sidebar Auth Section */
.sidebar-auth {
    margin-bottom: 2rem;
    padding: 1rem;
    /* background: #f8f9fa; */
    border-radius: 8px;
    text-align: center;
}

.sidebar-auth span {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.sidebar-logout {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: white;
    background-color: #dc3545;
    transition: background-color 0.3s;
    width: 100%;
}

.sidebar-logout:hover {
    background-color: #c82333;
}

/* Filters Inside Sidebar - Dropdown Style */
.mobile-filters .filter-section {
    margin-bottom: 1.5rem;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.mobile-filters .filter-header {
    /* background: #f8f9fa; */
    background: #132440;
    padding: 1rem;
    cursor: pointer;
    font-weight: bold;
    color: #007bff;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.mobile-filters .filter-header:hover {
    background: #e9ecef;
}

.mobile-filters .filter-header::after {
    content: '▼';
    transition: transform 0.3s;
}

.mobile-filters .filter-section.expanded .filter-header::after {
    transform: rotate(180deg);
}

.mobile-filters .filter-links {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    /* background: white; */
    background-color: #132440;
    max-height: 200px;
    overflow-y: auto;
}

.mobile-filters .filter-section.expanded .filter-links {
    display: flex;
}

.mobile-filters .filter-links a {
    text-align: center;
    padding: 0.75rem;
    text-decoration: none;
    /* color: #333; */
    color: blue;
    border: 1px solid #ddd;
    border-radius: 20px;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.mobile-filters .filter-links a:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Matches Section */
.matches-section {
    margin-bottom: 2rem;
}

.matches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.match-card {
    /* background: white; */
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}

.match-card:hover {
    transform: translateY(-5px);
}

.match-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    /* color: #007bff; */
    color: white;
}

.match-time {
    /* color: #666; */
    color: white;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.predictions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Like Button - Fixed Size Across Screens */
.like-button {
    padding: 0.5rem 1rem;
    cursor: pointer;
    /* border: 1px solid #ddd; */
    border: 1px solid white;
    /* background-color: #f8f9fa; */
    background-color: #132440;
    /* color: #333; */
    color: blue;
    border-radius: 20px;
    transition: all 0.3s;
    font-size: 0.85rem;
    min-width: 120px;
    white-space: nowrap;
    flex-shrink: 0;
}

.like-button.liked {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.like-button:hover:not(:disabled) {
    background-color: #e9ecef;
}

.like-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.like-button.loading::after {
    content: ' ⏳';
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 2rem 0;
}

.step-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.step-links a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #007bff;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s;
}

.step-links a:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.step-links .current {
    padding: 0.5rem 1rem;
    /* background: #f8f9fa; */
    border: 1px solid #ddd;
    border-radius: 5px;
    /* color: #333; */
    color: blue;
}

/* Analytics Page */
.analytics-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.chart-placeholder {
    background: #f8f9fa;
    height: 200px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    margin-top: 1rem;
}

.top-lists {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.top-list {
    margin-bottom: 1.5rem;
}

.top-list h5 {
    color: #007bff;
    margin-bottom: 1rem;
}

.top-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-sidebar {
        width: 80%;
        max-width: 300px;
        left: -100%;
    }

    body.sidebar-open {
        padding-left: 0;
    }

    body.sidebar-open #filter-toggle {
        left: 1rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .nav-tabs {
        flex-direction: column;
        align-items: center;
    }

    .matches {
        grid-template-columns: 1fr;
    }

    .analytics-section {
        grid-template-columns: 1fr;
    }

    .predictions {
        justify-content: flex-start;
    }

    .filter-sidebar.open {
        z-index: 1006;
    }

    .sidebar-overlay.open {
        z-index: 1005;
    }

    /* Pagination on Mobile */
    .step-links {
        flex-wrap: wrap;
    }

    .step-links a, .step-links .current {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .filter-sidebar {
        width: 100%;
    }

    .match-card, .stat-card, .top-lists {
        padding: 1rem;
    }

    .like-button {
        min-width: 100px;
    }

    .step-links a, .step-links .current {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}
