/* FutChances — Stitch Skin
   Modern sports analytics aesthetic inspired by the Stitch design system.
   Dark header, light surfaces, Inter font, minimal shadows, data-forward. */

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

:root {
    --stitch-primary: #0c1014;
    --stitch-surface: #f8f9fa;
    --stitch-surface-low: #f3f4f5;
    --stitch-surface-card: #ffffff;
    --stitch-surface-high: #e7e8e9;
    --stitch-secondary: #595f65;
    --stitch-outline: #c5c6ca;
    --stitch-primary-fixed: #e0e3e8;
    --stitch-error: #ba1a1a;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--stitch-surface) !important;
    color: var(--stitch-primary);
    -webkit-font-smoothing: antialiased;
}

/* ── Navbar ── */
.navbar {
    background-color: var(--stitch-primary) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    border: none !important;
}

.navbar-brand {
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    font-style: italic;
}

.nav-link {
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem 1rem !important;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    border-radius: 0.5rem;
}

.dropdown-menu {
    background-color: var(--stitch-surface-card);
    border: 1px solid rgba(197,198,202,0.1);
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: background-color 0.15s;
}

.dropdown-item:hover {
    background-color: var(--stitch-surface-low);
}

/* ── Content wrapper ── */
.content-wrapper {
    padding-top: 80px;
    padding-bottom: 80px;
}

.container {
    max-width: 1280px;
}

/* ── Headings ── */
h1 {
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    font-style: italic;
    color: var(--stitch-primary);
}

h5 {
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    font-style: italic;
}

/* ── Cards ── */
.card {
    background-color: var(--stitch-surface-card) !important;
    border: 1px solid rgba(197,198,202,0.1) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    overflow: hidden;
}

.card-body {
    padding: 1.25rem;
}

.custom-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.custom-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08) !important;
}

.card-footer {
    background-color: var(--stitch-surface-low) !important;
    border-top: 1px solid rgba(197,198,202,0.1) !important;
}

/* ── Tables ── */
.table {
    font-size: 0.82rem;
    color: var(--stitch-primary);
}

.table-dark {
    background-color: var(--stitch-surface-low) !important;
    color: var(--stitch-secondary) !important;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    --bs-table-bg: var(--stitch-surface-low) !important;
    --bs-table-color: var(--stitch-secondary) !important;
    border-color: rgba(197,198,202,0.1) !important;
}

.table-dark th {
    border-color: rgba(197,198,202,0.1) !important;
    font-weight: 700;
}

.table > tbody > tr {
    border-color: rgba(197,198,202,0.1);
    transition: background-color 0.15s;
}

.table-hover > tbody > tr:hover {
    background-color: var(--stitch-surface-low) !important;
    --bs-table-hover-bg: var(--stitch-surface-low) !important;
}

.table-sm th, .table-sm td {
    font-weight: 500;
}

/* Classification colors — softer tones */
.table-success {
    --bs-table-bg: rgba(25, 135, 84, 0.08) !important;
    --bs-table-hover-bg: rgba(25, 135, 84, 0.12) !important;
    border-left: 3px solid #198754;
}

.table-primary {
    --bs-table-bg: rgba(13, 110, 253, 0.06) !important;
    --bs-table-hover-bg: rgba(13, 110, 253, 0.10) !important;
    border-left: 3px solid #0d6efd;
}

.table-info {
    --bs-table-bg: rgba(13, 202, 240, 0.06) !important;
    --bs-table-hover-bg: rgba(13, 202, 240, 0.10) !important;
    border-left: 3px solid #0dcaf0;
}

.table-warning {
    --bs-table-bg: rgba(255, 193, 7, 0.06) !important;
    --bs-table-hover-bg: rgba(255, 193, 7, 0.10) !important;
    border-left: 3px solid #ffc107;
}

.table-light {
    --bs-table-bg: transparent !important;
    --bs-table-hover-bg: var(--stitch-surface-low) !important;
}

.table-danger {
    --bs-table-bg: rgba(220, 53, 69, 0.06) !important;
    --bs-table-hover-bg: rgba(220, 53, 69, 0.10) !important;
    border-left: 3px solid #dc3545;
}

/* ── Buttons ── */
.btn-outline-dark {
    border-color: rgba(197,198,202,0.3);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-outline-dark:hover {
    background-color: var(--stitch-primary);
    border-color: var(--stitch-primary);
    transform: scale(0.97);
}

/* ── Badges ── */
.badge {
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 0.375rem;
}

/* ── Footer ── */
.footer {
    background-color: var(--stitch-surface-card) !important;
    border-top: 1px solid rgba(197,198,202,0.1) !important;
}

.footer small {
    color: var(--stitch-secondary);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}

/* ── Tooltips ── */
.tooltip-inner {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.5rem;
}

/* ── Sort arrows ── */
.seta {
    opacity: 0.3;
    font-size: 0.65rem;
}

/* ── Team icons ── */
.team-icon {
    vertical-align: middle;
}

/* ── SVG link overlay ── */
a.svg-link {
    position: relative;
    display: inline-block;
}

a.svg-link:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* ── Responsive ── */
@media (max-width: 575.98px) {
    .table-sm th, .table-sm td {
        font-size: 0.68rem;
        padding: 0.15rem 0.2rem;
        white-space: nowrap;
    }
    .table-sm .team-icon {
        display: none;
    }
    h1 { font-size: 1.2rem; }
    h5 { font-size: 0.9rem; }
    .card-body { padding: 0.75rem; }
    .container { padding-left: 6px; padding-right: 6px; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .table-sm th, .table-sm td {
        font-size: 0.76rem;
        padding: 0.2rem 0.25rem;
        white-space: nowrap;
    }
}

@media (max-width: 767.98px) {
    .table-sm .seta { display: none; }
}
