:root {
    --primary-color: #4d6336;
    --secondary-color: #ffffff;
    --bg-color: #e8f5e9;
    --card-bg: #ffffff;
    --text-color: #212529;
    --text-muted: #546e7a;
    --border-color: #c8e6c9;
    --success-color: #43a047;
    --danger-color: #e53935;
    --item-bg: rgba(0, 0, 0, 0.03);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.15) 75%, rgba(255, 255, 255, 0.15)),
        linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.15) 75%, rgba(255, 255, 255, 0.15));
    background-position: 0 0, 20px 20px;
    background-size: 40px 40px;
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #1b5e20;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

.auth-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(46, 125, 50, 0.1);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 1rem;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.25);
}

.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
    box-sizing: border-box;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    width: 100%;
}

.btn-primary:hover {
    background-color: #1b5e20;
    border-color: #1b5e20;
}

.btn-outline-light {
    color: #f8f9fa;
    border-color: #f8f9fa;
    background-color: transparent;
}

.btn-outline-light:hover {
    color: var(--primary-color);
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
    width: auto;
}

.alert {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    background-color: #ffebee;
    border-color: #ef9a9a;
    color: #c62828;
}

.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* ============================================
   NAVBAR STYLES - Bootstrap-like
   ============================================ */
.navbar {
    background-color: var(--primary-color);
    padding: 0.75rem 0;
    margin-bottom: 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-brand:hover {
    color: #fff !important;
}

.navbar-toggler {
    display: none;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.navbar-toggler-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-collapse {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav.me-auto {
    margin-left: 2rem;
}

.navbar-nav.ms-auto {
    margin-left: auto;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 4px;
}

.nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* User Avatar */
.user-avatar {
    width: 32px;
    height: 32px;
    background-color: #fff;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--card-bg);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    list-style: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-item {
    color: var(--text-color) !important;
    padding: 10px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: background-color 0.15s;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background-color: var(--item-bg);
    color: var(--primary-color) !important;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
}

.text-danger {
    color: var(--danger-color) !important;
}

/* Legacy dropdown-content support */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--card-bg);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.dropdown-content a {
    color: var(--text-color) !important;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.15s;
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background-color: var(--item-bg);
    color: var(--primary-color) !important;
}

/* ============================================
   UTILITY CLASSES - Bootstrap-like
   ============================================ */
.fw-bold {
    font-weight: 700;
}

.d-flex {
    display: flex;
}

.d-none {
    display: none !important;
}

.d-lg-inline {
    display: inline;
}

.align-items-center {
    align-items: center;
}

.me-1 {
    margin-right: 0.25rem;
}

.me-2 {
    margin-right: 0.5rem;
}

.ms-2 {
    margin-left: 0.5rem;
}

.shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.border-0 {
    border: 0 !important;
}

/* ============================================
   RESPONSIVE - Mobile First
   ============================================ */
@media (max-width: 991px) {
    .navbar-toggler {
        display: block;
    }

    .navbar-collapse {
        display: none;
        width: 100%;
        margin-top: 1rem;
    }

    .navbar-collapse.show {
        display: block;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
    }

    .navbar-nav.me-auto {
        margin-left: 0;
    }

    .navbar-nav.ms-auto {
        margin-left: 0;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        padding: 0.75rem 0;
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        margin-top: 0;
        padding-left: 1rem;
        background: rgba(0, 0, 0, 0.1);
    }

    .dropdown-item {
        color: rgba(255, 255, 255, 0.9) !important;
        padding: 0.75rem 1rem;
    }

    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff !important;
    }

    .dropdown-divider {
        border-color: rgba(255, 255, 255, 0.2);
    }

    .btn-outline-light {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }

    .d-lg-inline {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 0.75rem;
    }

    /* Filters mobile layout */
    .filters form {
        flex-direction: column !important;
    }

    .filters form>div {
        min-width: 100% !important;
        flex: 1 1 100% !important;
    }

    /* Cards grid mobile */
    .grid {
        grid-template-columns: 1fr !important;
    }

    /* Home intro text */
    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
    }
}

/* ============================================
   LEGACY HEADER SUPPORT (for backwards compat)
   ============================================ */
.header {
    background-color: var(--primary-color);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

/* Responsive Navigation - Legacy */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.header-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .header-logo-group {
        align-items: center;
    }

    .header-nav {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .dropdown-content {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        min-width: 90vw;
        border-radius: 8px;
    }
}

/* ============================================
   LIVE MATCH INDICATOR
   ============================================ */
@keyframes blink-live {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.live-indicator {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    animation: blink-live 1.5s infinite ease-in-out;
    white-space: nowrap;
}

/* ============================================
   CARDS AND COMPONENTS
   ============================================ */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 1rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   FILTERS SECTION
   ============================================ */
.filters {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.filters form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filters label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    background: transparent;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: #fff;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ============================================
   RESPONSIVE TABLES & ELEMENTS
   ============================================ */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
}

img {
    max-width: 100%;
    height: auto;
}

/* Brackets Responsive Fix */
.brackets-container {
    overflow-x: auto;
    padding-bottom: 1rem;
}