/* ==========================================================
   DBBL Teamdata Extension – VIMODROM Baskets Jena Design
   ========================================================== */

:root {
    --brand-primary: #d4af37;     /* Gold */
    --brand-primary-hover: #bda030;
    --brand-secondary: #0d2137;   /* Dunkelblau / Navy */
    --brand-secondary-light: #1a3a5c;
    --bg-light: #f8f9fa;
    --bg-card: #ffffff;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    
    /* Zonen & Badges */
    --playoff-color: #10b981;     /* Grün */
    --relegation-color: #ef4444;  /* Rot */
    --planned-color: #9ca3af;     /* Grau */
    --live-color: #f59e0b;        /* Orange */
}

/* ── Allgemein & Typografie ──────────────────────────────── */
.dbbl-plugin {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

.dbbl-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--brand-primary);
    padding-left: 0.75rem;
    color: var(--brand-secondary);
}

.dbbl-no-data {
    padding: 1.25rem;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    color: #92400e;
    font-weight: 500;
}

/* ── Hero Banner ─────────────────────────────────────────── */
.dbbl-hero-banner {
    position: relative;
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-end;
}

.dbbl-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 33, 55, 0.95) 0%, rgba(13, 33, 55, 0.4) 60%, rgba(13, 33, 55, 0) 100%);
    z-index: 1;
}

.dbbl-hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    color: #fff;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.dbbl-hero-team-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.dbbl-hero-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
}

.dbbl-hero-title {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.dbbl-hero-subtitle {
    margin: 0.25rem 0 0;
    font-size: 1rem;
    color: var(--brand-primary);
    font-weight: 600;
}

/* ── Tab Filter / Navigation ──────────────────────────────── */
.dbbl-tabs-container {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.25rem;
    overflow-x: auto;
}

.dbbl-tab-btn {
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.dbbl-tab-btn:hover {
    color: var(--brand-secondary);
}

.dbbl-tab-btn.active {
    color: var(--brand-secondary);
    border-bottom-color: var(--brand-primary);
}

/* ── Roster (Kader) ──────────────────────────────────────── */
.dbbl-roster-section {
    margin-bottom: 2.5rem;
}

.dbbl-position-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--brand-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.dbbl-roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.dbbl-player-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.dbbl-player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--brand-primary);
}

.dbbl-player-photo-wrapper {
    position: relative;
    background: linear-gradient(180deg, var(--bg-light) 0%, #e5e7eb 100%);
    aspect-ratio: 3/4;
    overflow: hidden;
}

.dbbl-player-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.dbbl-player-number-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(13, 33, 55, 0.85);
    color: var(--brand-primary);
    font-weight: 800;
    font-size: 1.2rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid var(--brand-primary);
    backdrop-filter: blur(4px);
}

.dbbl-player-info {
    padding: 1.25rem;
}

.dbbl-player-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--brand-secondary);
    margin: 0;
    line-height: 1.2;
}

.dbbl-player-position {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* ── Spieler-Detailseite ─────────────────────────────────── */
.dbbl-player-detail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.dbbl-player-sticky-col {
    flex: 1 1 300px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.dbbl-player-content-col {
    flex: 2 2 500px;
}

.dbbl-detail-profile {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.dbbl-detail-photo-wrapper {
    background: linear-gradient(180deg, var(--bg-light) 0%, #dee2e6 100%);
    position: relative;
    aspect-ratio: 3/4;
}

.dbbl-detail-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.dbbl-detail-header-overlay {
    padding: 1.5rem;
    background: var(--brand-secondary);
    color: #fff;
}

.dbbl-detail-name {
    font-size: 2.2rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 0;
}

.dbbl-detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand-primary);
}

/* Key Facts Grid */
.dbbl-grid-3col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dbbl-fact-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    border-radius: 8px;
}

.dbbl-fact-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.dbbl-fact-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-secondary);
    margin-top: 0.25rem;
}

/* Statistiken-Kacheln */
.dbbl-stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dbbl-stat-highlight-card {
    background: var(--brand-secondary);
    color: #fff;
    padding: 1.25rem 1rem;
    border-radius: 12px;
    text-align: center;
    border-bottom: 4px solid var(--brand-primary);
}

.dbbl-stat-highlight-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-primary);
}

.dbbl-stat-highlight-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 0.5rem;
    opacity: 0.8;
    letter-spacing: 0.05em;
}

/* ── Spielplan & Spielkarten ───────────────────────────────── */
.dbbl-month-divider {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--brand-secondary);
    margin: 2rem 0 1rem;
    border-bottom: 2px solid var(--brand-primary);
    padding-bottom: 0.35rem;
}

.dbbl-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dbbl-game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.dbbl-game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
    border-color: var(--brand-primary);
}

.dbbl-game-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.dbbl-game-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.dbbl-game-team {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.dbbl-game-team.home {
    justify-content: flex-end;
    text-align: right;
}

.dbbl-game-team.guest {
    justify-content: flex-start;
    text-align: left;
}

.dbbl-game-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.dbbl-game-team-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-secondary);
}

.dbbl-game-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.dbbl-game-score {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--brand-secondary);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.dbbl-game-vs {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.dbbl-game-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    font-size: 0.85rem;
}

.dbbl-game-venue {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dbbl-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
}

.dbbl-badge.status-finished { background: var(--playoff-color); }
.dbbl-badge.status-live { background: var(--live-color); }
.dbbl-badge.status-scheduled { background: var(--planned-color); }

/* ── Tabelle (Standings) ─────────────────────────────────── */
.dbbl-table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.dbbl-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.dbbl-standings-table th {
    background: #f3f4f6;
    color: #4b5563;
    padding: 0.8rem 1rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.dbbl-standings-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.dbbl-standings-table tbody tr:last-child td {
    border-bottom: none;
}

.dbbl-standings-table tbody tr:hover {
    background: var(--bg-light);
}

.dbbl-rank-col {
    font-weight: 800;
    text-align: center;
    width: 50px;
}

.dbbl-team-col {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dbbl-table-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.dbbl-team-name-text {
    font-weight: 700;
    color: var(--brand-secondary);
}

/* Eigene Mannschaft hervorheben */
.dbbl-own-team {
    background: rgba(212, 175, 55, 0.08) !important;
}

.dbbl-own-team td {
    border-top: 1.5px solid var(--brand-primary);
    border-bottom: 1.5px solid var(--brand-primary);
}

.dbbl-own-team td:first-child {
    border-left: 4px solid var(--brand-primary);
}

.dbbl-own-team .dbbl-team-name-text {
    color: var(--brand-primary-hover);
}

/* Playoff & Abstiegszonen */
.dbbl-playoff-spot .dbbl-rank-col {
    border-left: 4px solid var(--playoff-color);
    color: var(--playoff-color);
}

.dbbl-relegation-spot .dbbl-rank-col {
    border-left: 4px solid var(--relegation-color);
    color: var(--relegation-color);
}

/* Last 10 Matches */
.dbbl-last10-container {
    display: flex;
    gap: 4px;
}

.dbbl-outcome-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
}

.dbbl-outcome-dot.win { background: var(--playoff-color); }
.dbbl-outcome-dot.loss { background: var(--relegation-color); }

/* ── Split-Bar Visualisierung (Team-Vergleich) ───────────── */
.dbbl-splitbar-wrapper {
    margin: 2rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.dbbl-splitbar-row {
    margin-bottom: 1.25rem;
}

.dbbl-splitbar-row:last-child {
    margin-bottom: 0;
}

.dbbl-splitbar-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--brand-secondary);
}

.dbbl-splitbar-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dbbl-splitbar-track {
    display: flex;
    height: 10px;
    background: var(--border-color);
    border-radius: 9999px;
    overflow: hidden;
}

.dbbl-splitbar-fill-left {
    height: 100%;
    background: var(--brand-primary);
    transition: width 0.5s ease-out;
}

.dbbl-splitbar-fill-right {
    height: 100%;
    background: var(--brand-secondary-light);
    transition: width 0.5s ease-out;
}

/* ── Responsive Media Queries ────────────────────────────── */
@media (max-width: 768px) {
    .dbbl-hero-banner {
        height: 180px;
    }
    
    .dbbl-hero-content {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dbbl-hero-title {
        font-size: 1.5rem;
    }
    
    .dbbl-hero-logo {
        width: 50px;
        height: 50px;
    }
    
    .dbbl-game-body {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .dbbl-game-team.home {
        text-align: center;
        justify-content: center;
    }
    
    .dbbl-game-team.guest {
        text-align: center;
        justify-content: center;
        flex-direction: row-reverse;
    }
    
    .dbbl-game-center {
        min-width: unset;
    }
    
    .dbbl-player-detail-container {
        flex-direction: column;
    }
    
    .dbbl-player-sticky-col {
        position: static;
        width: 100%;
    }
}

/* ==========================================================
   Player Profile Page Layout matching BBL Screenshot
   ========================================================== */
.dbbl-player-profile-hero {
    position: relative;
    width: 100%;
    background: radial-gradient(circle at right, #4b5563, #1f2937); /* Textured/grey look */
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    min-height: 300px;
    padding: 0 2rem;
}

.dbbl-player-hero-photo-container {
    width: 200px;
    height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0;
    margin-right: 2rem;
}

.dbbl-player-hero-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 12px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    position: static;
}

.dbbl-player-hero-info {
    width: 65%;
    padding: 2rem;
    color: #fff;
    text-align: left;
}

.dbbl-player-hero-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-primary);
    margin-bottom: -0.5rem;
}

.dbbl-player-hero-name {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 0.5rem 0;
    letter-spacing: -0.02em;
}

.dbbl-player-hero-position {
    font-size: 1.2rem;
    font-weight: 600;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dbbl-player-two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    margin-top: 2rem;
}

.dbbl-player-col-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 2px solid var(--text-dark);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

/* Tabs */
.dbbl-personal-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.dbbl-personal-tab {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: #fff;
    cursor: pointer;
}

.dbbl-personal-tab.active {
    background: var(--text-dark);
    color: #fff;
    border-color: var(--text-dark);
}

/* Personal Data Table */
.dbbl-personal-table {
    width: 100%;
    border-collapse: collapse;
}

.dbbl-personal-table tr {
    border-bottom: 1px solid var(--border-color);
}

.dbbl-personal-table td {
    padding: 0.75rem 0;
    font-size: 0.95rem;
}

.dbbl-personal-table td.label-cell {
    font-weight: 700;
    color: var(--text-dark);
    width: 50%;
}

.dbbl-personal-table td.value-cell {
    text-align: right;
    color: var(--text-muted);
}

/* Stats 3x3 Grid */
.dbbl-stats-3x3-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.dbbl-stat-box-3x3 {
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dbbl-stat-box-3x3:nth-child(3n) {
    border-right: none;
}

.dbbl-stat-box-3x3:nth-last-child(-n+3) {
    border-bottom: none;
}

.dbbl-stat-box-3x3-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.dbbl-stat-box-3x3-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--brand-primary); /* Use brand primary (gold) */
    line-height: 1.2;
}

.dbbl-stat-box-3x3-subvalue {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .dbbl-player-profile-hero {
        flex-direction: column;
        padding: 2rem 1rem 0;
        text-align: center;
    }
    .dbbl-player-hero-photo-container {
        width: 100%;
        height: 200px;
    }
    .dbbl-player-hero-photo-container img {
        position: static;
        max-height: 200px;
    }
    .dbbl-player-hero-info {
        width: 100%;
        padding: 1rem 0 2rem;
        text-align: center;
    }
    .dbbl-player-hero-name {
        font-size: 2rem;
    }
    .dbbl-player-two-col-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ── Spielerinnen-Statistiken (PlayerStats) ───────────────── */
.dbbl-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: center;
}

.dbbl-stats-table th {
    background: #f3f4f6;
    color: #4b5563;
    padding: 0.75rem 0.5rem;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.dbbl-stats-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
    color: var(--text-dark);
}

.dbbl-stats-table th:first-child,
.dbbl-stats-table td:first-child {
    text-align: left;
    padding-left: 1rem;
    font-weight: 700;
    color: var(--brand-secondary);
    min-width: 160px;
    position: sticky;
    left: 0;
    background: inherit;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}

.dbbl-stats-table th:first-child {
    background: #f3f4f6;
    z-index: 2;
}

.dbbl-stats-table tbody tr:last-child td {
    border-bottom: none;
}

.dbbl-stats-table tbody tr:hover {
    background: var(--bg-light);
}

.dbbl-stats-table th, 
.dbbl-stats-table td {
    border-right: 1px solid rgba(0, 0, 0, 0.03);
}

.dbbl-stats-table th:last-child, 
.dbbl-stats-table td:last-child {
    border-right: none;
}


