/*
BackDoor League Visual Polish v1
Safe front-end styling add-on.
*/

:root {
    --bdlvp-dark: #080b12;
    --bdlvp-navy: #111827;
    --bdlvp-blue: #1f2a44;
    --bdlvp-gold: #f7c600;
    --bdlvp-white: #ffffff;
    --bdlvp-soft: #f5f7fb;
    --bdlvp-line: #e4e7ec;
    --bdlvp-muted: #667085;
    --bdlvp-radius: 18px;
    --bdlvp-shadow: 0 16px 35px rgba(16, 24, 40, .10);
}

/* Page background and smoother rendering */
body.bdl-visual-polish-active {
    background:
        radial-gradient(circle at top left, rgba(247, 198, 0, .08), transparent 34rem),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 48%);
}

.bdl-visual-polish-active .entry-content > .bdlhd-wrap,
.bdl-visual-polish-active .entry-content > .bdltp-wrap,
.bdl-visual-polish-active .entry-content > .bdlrr-wrap,
.bdl-visual-polish-active .entry-content > .bdlps-wrap,
.bdl-visual-polish-active .bdl-wrap {
    margin-top: 18px;
    margin-bottom: 42px;
}

/* Universal BackDoor League headings */
.bdlhd-wrap h1,
.bdltp-wrap h1,
.bdlrr-wrap h1,
.bdlps-wrap h1,
.bdl-wrap h1,
.bdlhd-wrap h2,
.bdltp-wrap h2,
.bdlrr-wrap h2,
.bdlps-wrap h2,
.bdl-wrap h2 {
    letter-spacing: -0.03em;
}

/* Premium hero treatment */
.bdlhd-hero,
.bdltp-hero,
.bdltp-profile-hero,
.bdlrr-hero,
.bdlps-head,
.bdl-hero,
.bdl-page-hero {
    position: relative;
    overflow: hidden;
    box-shadow: var(--bdlvp-shadow);
    isolation: isolate;
}

.bdlhd-hero::before,
.bdltp-hero::before,
.bdltp-profile-hero::before,
.bdlrr-hero::before,
.bdlps-head::before,
.bdl-hero::before,
.bdl-page-hero::before {
    content: "";
    position: absolute;
    inset: -35% -20% auto auto;
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, rgba(247, 198, 0, .32), rgba(247, 198, 0, 0) 62%);
    pointer-events: none;
    z-index: -1;
}

.bdlhd-hero::after,
.bdltp-hero::after,
.bdltp-profile-hero::after,
.bdlrr-hero::after,
.bdlps-head::after,
.bdl-hero::after,
.bdl-page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255,255,255,.08), transparent 32%),
        repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0, rgba(255,255,255,.035) 2px, transparent 2px, transparent 12px);
    pointer-events: none;
    z-index: -1;
}

/* Cards */
.bdlhd-card,
.bdltp-card,
.bdltp-section,
.bdltp-player-card,
.bdlrr-section,
.bdlrr-team-block,
.bdlrr-player-card,
.bdlps-section,
.bdlps-card,
.bdlps-profile,
.bdlhd-panel,
.bdlhd-section,
.bdlhd-mini-table,
.bdlhd-mvp-card,
.bdl-card {
    border-color: rgba(228, 231, 236, .9) !important;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .055);
}

.bdlhd-card,
.bdltp-card,
.bdlrr-player-card,
.bdltp-player-card,
.bdlps-card,
.bdl-card {
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.bdlhd-card:hover,
.bdltp-card:hover,
.bdlrr-player-card:hover,
.bdltp-player-card:hover,
.bdlps-card:hover,
.bdl-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--bdlvp-shadow);
    border-color: rgba(247, 198, 0, .55) !important;
}

/* Buttons and links */
.bdlhd-section-head a,
.bdltp-button,
.bdlrr .button,
.bdlps-button,
.bdl-button,
.bdlhd-card,
.bdltp-tabs a {
    -webkit-tap-highlight-color: transparent;
}

.bdltp-button,
.bdlps-button,
.bdlhd-section-head a,
.bdltp-tabs a,
.bdl-button,
a.bdl-button {
    border: 0 !important;
    box-shadow: 0 8px 18px rgba(17, 24, 39, .16);
}

.bdltp-button:hover,
.bdlps-button:hover,
.bdlhd-section-head a:hover,
.bdltp-tabs a:hover,
.bdl-button:hover,
a.bdl-button:hover {
    transform: translateY(-1px);
}

/* Tables */
.bdlhd-wrap table,
.bdltp-wrap table,
.bdlrr-wrap table,
.bdlps-wrap table,
.bdl-wrap table,
.bdl-table {
    border-radius: 14px;
    overflow: hidden;
    border-collapse: separate !important;
    border-spacing: 0;
}

.bdlhd-wrap th,
.bdltp-wrap th,
.bdlrr-wrap th,
.bdlps-wrap th,
.bdl-wrap th,
.bdl-table th {
    background: linear-gradient(180deg, #f8fafc, #eef2f7) !important;
    color: #111827 !important;
    font-weight: 900 !important;
}

.bdlhd-wrap td,
.bdltp-wrap td,
.bdlrr-wrap td,
.bdlps-wrap td,
.bdl-wrap td,
.bdl-table td {
    vertical-align: middle;
}

.bdlvp-table-wrap {
    position: relative;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
}

.bdlvp-table-wrap table {
    min-width: 760px;
}

.bdlvp-scroll-hint {
    display: none;
    margin: 8px 0 0;
    color: var(--bdlvp-muted);
    font-size: 12px;
    font-weight: 700;
}

/* Images */
.bdltp-player-img,
.bdlrr-player-img,
.bdlps-card-img,
.bdltp-no-photo,
.bdlrr-no-photo,
.bdlps-card-placeholder {
    border-bottom: 1px solid #eef0f3;
}

.bdltp-player-img,
.bdlrr-player-img,
.bdlps-card-img {
    filter: saturate(1.05) contrast(1.03);
}

/* MVP / stat blocks */
.bdlhd-mvp-stats span,
.bdltp-stat-grid div,
.bdlps-stat-box,
.bdlhd-mini-stats span,
.bdlhd-hero-badge,
.bdltp-record-box {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.bdlps-stat-box {
    background: linear-gradient(135deg, #111827, #243653) !important;
}

/* Generic schedule / standings support */
.bdl-schedule,
.bdl-standings,
.bdl-results,
.bdl-rosters,
.bdl-tournaments,
.bdl-teams,
.bdl-sponsors {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

.bdl-schedule table,
.bdl-standings table,
.bdl-results table {
    width: 100%;
}

/* Mobile cleanup */
@media (max-width: 900px) {
    .bdlhd-hero,
    .bdltp-profile-hero {
        display: block !important;
    }

    .bdlhd-hero-badge,
    .bdltp-record-box {
        margin-top: 18px;
        width: fit-content;
    }

    .bdlhd-two-col {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 760px) {
    .bdlhd-wrap,
    .bdltp-wrap,
    .bdlrr-wrap,
    .bdlps-wrap,
    .bdl-wrap {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .bdlhd-hero,
    .bdltp-hero,
    .bdltp-profile-hero,
    .bdlrr-hero,
    .bdlps-head,
    .bdl-hero,
    .bdl-page-hero {
        border-radius: 18px !important;
        padding: 24px !important;
    }

    .bdlhd-hero h1,
    .bdltp-profile-hero h1,
    .bdltp-hero h2,
    .bdlrr-hero h2,
    .bdlps-head h2 {
        font-size: 30px !important;
        line-height: 1.05 !important;
    }

    .bdlhd-card-grid,
    .bdltp-grid,
    .bdlrr-roster-grid,
    .bdltp-roster-grid,
    .bdlps-grid,
    .bdlhd-standings-grid,
    .bdlhd-mvp-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .bdlhd-section-head {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .bdlhd-section-head a {
        width: 100%;
        text-align: center;
    }

    .bdltp-team-head,
    .bdlrr-team-head {
        display: block !important;
    }

    .bdltp-team-head span,
    .bdlrr-team-head span {
        display: inline-block;
        margin-top: 8px;
    }

    .bdlvp-scroll-hint {
        display: block;
    }

    .bdltp-player-img,
    .bdlrr-player-img,
    .bdlps-card-img,
    .bdltp-no-photo,
    .bdlrr-no-photo,
    .bdlps-card-placeholder {
        height: 190px !important;
    }
}

/* Very small phones */
@media (max-width: 420px) {
    .bdlhd-hero h1 {
        font-size: 27px !important;
    }

    .bdlhd-card,
    .bdltp-card-body,
    .bdlrr-section,
    .bdltp-section,
    .bdlps-section,
    .bdlhd-panel,
    .bdlhd-section {
        padding: 15px !important;
    }
}

/* Print cleanup */
@media print {
    .bdlhd-card-grid,
    .bdlhd-hero,
    .bdlvp-scroll-hint,
    .bdltp-button,
    .bdlps-button,
    .bdl-button {
        display: none !important;
    }

    body.bdl-visual-polish-active {
        background: #fff !important;
    }

    .bdlhd-panel,
    .bdlhd-section,
    .bdltp-section,
    .bdlrr-section,
    .bdlps-section {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
