:root,
body,
[data-bs-theme="dark"] {
    /* Mapping Primary to Tabler's Teal (Energetic / Sports Field vibe) */
    --tblr-primary: #0ca678;
    --tblr-primary-rgb: 12, 166, 120;
    --tblr-btn-color-darker: #0ca678;
    --tblr-btn-bg: #0ca678;
    --tblr-btn-border-color: #0ca678;

    /* Fonts */
    --tblr-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif;
    --tblr-font-headings: 'Outfit', -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif;
}

body {
    font-feature-settings: "cv03", "cv04", "cv11";
    background-color: var(--tblr-body-bg, #0f172a);
    /* Default to dark if var missing */
    color: #e2e8f0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: var(--tblr-font-headings);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    /* Sports stats style */
}

/* Card Enhancement: Sporty Borders */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    /* Sharper corners for sports look */
    border-bottom: 3px solid transparent;
    /* Ready for colored borders */
    transition: all 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.1);
}

/* Navbar: Sports TV style (Dark) */
.navbar {
    background: #182433;
    /* Tabler Dark */
    border-bottom: 2px solid var(--tblr-primary);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
    color: #fff !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 600;
}

.nav-link.active,
.nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Buttons: High Contrast */
.btn {
    border-radius: 4px;
    /* Sporty square-ish */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--tblr-primary);
    border-color: var(--tblr-primary);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #099268;
    /* Darker teal */
    border-color: #099268;
}

/* Status Indicators */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    /* Square dots */
    display: inline-block;
    margin-right: 8px;
}

/* Custom Gradients for Headers */
.page-header {
    margin-bottom: 2rem;
}

body .page-title {
    font-family: var(--tblr-font-headings) !important;
    font-weight: 800 !important;
    font-size: 2rem !important;
    letter-spacing: -0.02em !important;
    color: #fff !important;
}

/* Match Score Input */
.score-input {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    background-color: var(--tblr-bg-surface);
    color: var(--tblr-body-color);
    border: 2px solid var(--tblr-border-color);
}

.score-input:focus {
    border-color: var(--tblr-primary);
    box-shadow: 0 0 0 2px rgba(12, 166, 120, 0.2);
}

/* Dark Mode Tables Fix - SOLID DARK BACKGROUND */
.card-table tr td,
.card-table tr th,
.table> :not(caption)>*>* {
    background-color: var(--tblr-bg-surface) !important;
    /* Solid dark color matching card */
    color: #ffffff !important;
    /* Force White Text */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* Subtle border */
}

/* Headers: Slightly distinct background */
.table thead th {
    background-color: rgba(0, 0, 0, 0.2) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: bold;
    text-transform: uppercase;
}

.table-vcenter td,
.table-vcenter th {
    vertical-align: middle;
}

/* Hover effects */
.table-hover>tbody>tr:hover>* {
    background-color: rgba(255, 255, 255, 0.05) !important;
    /* Lighten on hover */
    color: #ffffff !important;
}

/* Card Footer Fix */
.card-footer {
    background-color: var(--tblr-bg-surface) !important;
    color: #ffffff !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Form Inputs Fix - WHITE BACKGROUND */
.form-control,
.form-select {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0;
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-color: var(--tblr-primary);
    box-shadow: 0 0 0 2px rgba(12, 166, 120, 0.2);
}

.form-label {
    color: rgba(255, 255, 255, 0.9);
    /* Labels visible on dark bg */
}