.team-detail {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.team-detail-header {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

.team-detail-banner {
    min-height: 280px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.team-detail-banner-content {
    padding: 2rem;
    color: #ffffff;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0));
    width: 100%;
}

.team-detail-banner h1 {
    margin: 0.25rem 0 0.35rem;
    font-size: clamp(2rem, 2vw + 1.5rem, 3rem);
}

.team-detail-category {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    margin: 0;
}

.team-detail-meta {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

.team-detail-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.team-detail-section h2 {
    font-size: clamp(1.5rem, 1vw + 1.1rem, 2.1rem);
    margin: 0;
}

.team-stats-section {
    background: linear-gradient(180deg, #fff9f7 0%, #ffffff 100%);
    border-radius: 22px;
    padding: 1.4rem;
    border: 1px solid rgba(103, 8, 29, 0.08);
}

.team-stat-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.team-stat-card-body {
    padding: 1rem 1.1rem;
}

.team-stat-title {
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #6b7280;
}

.team-stat-list {
    display: grid;
    gap: 0.45rem;
}

.team-stat-list p {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: #1f2937;
}

.team-stat-list p span {
    color: #4b5563;
    font-weight: 500;
}

.team-stat-list p strong {
    font-size: 1.05rem;
    color: #111827;
}

.team-stat-list .team-stat-total {
    margin-top: 0.3rem;
    padding-top: 0.45rem;
    border-top: 1px dashed rgba(15, 23, 42, 0.15);
}

.team-stat-highlight {
    background: linear-gradient(150deg, #67081d 0%, #8f1635 100%);
    border: none;
}

.team-stat-highlight .team-stat-title,
.team-stat-highlight .team-stat-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

.team-stat-big-number {
    margin: 0;
    font-size: clamp(2.2rem, 3vw, 2.8rem);
    line-height: 1;
    font-weight: 700;
    color: #ffffff;
}

.team-stat-big-number-sm {
    font-size: clamp(1.9rem, 2.5vw, 2.3rem);
}

.team-stat-subtitle {
    color: #475569;
}

.team-profile {
    border-radius: 18px;
    overflow: hidden;
}

.team-profile-media {
    min-height: 220px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-profile-gallery {
    width: 100%;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.team-profile-photo {
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.team-profile-label {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.team-profile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-profile-photo img {
    height: 140px;
}

.team-profile-placeholder {
    color: #475569;
    font-weight: 600;
    text-align: center;
    padding: 1.5rem;
}

.match-highlight {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.match-clubs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.match-team {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.match-team img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.match-versus {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.match-details {
    text-align: center;
    font-size: 1.1rem;
}

.match-upcoming {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.match-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.match-card-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.match-card-logos img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.match-card-opponent {
    font-weight: 600;
    margin: 0;
}

.match-card-date {
    margin: 0;
    color: #64748b;
}

.staff-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.staff-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.staff-card h3 {
    margin-top: 0;
}

.staff-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.4rem;
}

.staff-extra ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.35rem;
}

.players-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.player-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    text-align: center;
}

.player-card h3 {
    margin: 0 0 0.35rem;
}

.player-photo {
    margin: 0.75rem 0;
    background: #f1f5f9;
    border-radius: 14px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.player-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-photo-placeholder {
    color: #64748b;
    font-weight: 600;
    padding: 0 1rem;
}

.chart-section .chart-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.75rem;
    border: 1px solid rgba(28, 28, 28, 0.08);
    box-shadow: 0 18px 36px rgba(28, 28, 28, 0.08);
}

.chart-header {
    margin-bottom: 1.25rem;
}

.chart-header h3 {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
}

.line-chart {
    display: grid;
    gap: 0.85rem;
}

.line-chart-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: stretch;
}

.line-chart-y {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #4b2b2b;
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 2.5rem;
}

.line-chart-frame {
    background: #f8f4ef;
    border-radius: 20px;
    padding: 1rem;
    border: 1px solid rgba(28, 28, 28, 0.08);
}

.line-chart-svg {
    width: 100%;
    height: 220px;
    display: block;
}

.line-area {
    fill: rgba(103, 8, 29, 0.14);
}

.line-area-against {
    fill: rgba(28, 28, 28, 0.1);
}

.line-stroke {
    fill: none;
    stroke: var(--bec-accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.line-stroke-against {
    stroke: var(--bec-dark);
}

.line-chart-axis {
    position: relative;
    height: 24px;
    color: #4b2b2b;
    font-weight: 600;
}

.line-axis-label {
    position: absolute;
    left: var(--pos, 0%);
    transform: translateX(-50%);
    font-size: 0.85rem;
}

.line-chart-empty {
    display: none;
}

.line-chart.is-empty .line-chart-frame,
.line-chart.is-empty .line-chart-axis,
.line-chart.is-empty .line-chart-y {
    display: none;
}

.line-chart.is-empty .line-chart-empty {
    display: block;
}

.line-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-weight: 600;
    color: var(--bec-dark);
}

.donut {
    --win-angle: 0deg;
    width: min(240px, 100%);
    aspect-ratio: 1;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: conic-gradient(
        var(--bec-accent) 0 var(--win-angle),
        var(--bec-dark) var(--win-angle) 360deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-center {
    width: 62%;
    height: 62%;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(28, 28, 28, 0.08);
}

.donut-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5a3a3a;
}

.donut-value {
    font-size: 1.5rem;
    color: var(--bec-accent);
}

.donut-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-weight: 600;
    color: var(--bec-dark);
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.4rem;
}

.legend-for {
    background: var(--bec-accent);
}

.legend-against {
    background: var(--bec-dark);
}

.legend-wins {
    background: var(--bec-accent);
}

.legend-losses {
    background: var(--bec-dark);
}

@media (max-width: 600px) {
    .team-detail-banner-content {
        padding: 1.5rem;
    }

    .team-stats-section {
        padding: 1.1rem;
    }

    .match-highlight {
        padding: 1.5rem;
    }
}
