/* Public CSS — Håndball-database */
:root {
    --primary: #1e3a5f;
    --primary-light: #2563eb;
    --accent: #10b981;
    --home-color: #2563eb;
    --away-color: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.main-nav { background: var(--primary); color: #fff; }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; height: 56px; gap: 2rem; }
.nav-brand { font-weight: 700; font-size: 1.1rem; color: #fff; text-decoration: none; }
.nav-links { display: flex; gap: 0.25rem; }
.nav-links a { color: rgba(255,255,255,0.7); padding: 0.4rem 0.8rem; border-radius: 4px; font-size: 0.9rem; text-decoration: none; transition: background 0.15s; }
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,0.15); color: #fff; }

/* Content */
.content { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
h1 { margin-bottom: 1rem; }
h2 { margin: 1.5rem 0 0.75rem; }
.section { margin-bottom: 2rem; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 0.85rem; }
.data-table th { background: var(--gray-100); text-align: left; padding: 0.6rem 0.75rem; font-weight: 600; border-bottom: 2px solid var(--gray-200); cursor: pointer; white-space: nowrap; }
.data-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--gray-100); }
.data-table tr:hover { background: var(--gray-50); }
.data-table tr.match-upcoming { opacity: 0.45; }
.data-table tr.match-pending { opacity: 0.65; }
.data-table tr.match-played td:nth-child(3) a { font-weight: 700; }
.match-not-played { color: var(--gray-500); font-style: italic; font-size: 0.8rem; }

/* Cards */
.card { background: #fff; padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }

/* Buttons */
.btn { display: inline-block; padding: 0.5rem 1rem; border: none; border-radius: 4px; font-size: 0.9rem; cursor: pointer; text-decoration: none; font-weight: 500; }
.btn-primary { background: var(--primary-light); color: #fff; }
.btn:hover { opacity: 0.85; }

/* Search */
.search-form { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.search-form input { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid var(--gray-300); border-radius: 4px; font-size: 0.9rem; }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem; justify-content: center; }
.pagination a { color: var(--primary-light); }
.text-center { text-align: center; }
.text-muted, .sub { color: var(--gray-500); font-size: 0.8rem; }

/* ==================== SCOREBOARD ==================== */
.scoreboard {
    display: flex; align-items: center; justify-content: center; gap: 2rem;
    background: linear-gradient(135deg, var(--primary), #1e40af);
    color: #fff; padding: 2rem; border-radius: var(--radius); margin-bottom: 0.5rem;
}
.sb-team { flex: 1; text-align: center; }
.sb-team-name { color: #fff; font-size: 1.3rem; font-weight: 700; text-decoration: none; }
.sb-team-name:hover { text-decoration: underline; }
.sb-score { text-align: center; }
.sb-score-main { font-size: 3rem; font-weight: 800; letter-spacing: 2px; }
.sb-score-half { font-size: 0.9rem; opacity: 0.7; }

.match-info-bar {
    text-align: center; font-size: 0.85rem; color: var(--gray-500);
    padding: 0.5rem; margin-bottom: 1.5rem;
}

/* ==================== H2H STATS ==================== */
.h2h-stats { max-width: 600px; margin: 0 auto; }
.h2h-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.h2h-val { min-width: 30px; text-align: center; font-weight: 700; font-size: 0.9rem; }
.h2h-bar-container { flex: 1; height: 24px; display: flex; border-radius: 4px; overflow: hidden; position: relative; }
.h2h-bar { height: 100%; transition: width 0.3s; }
.h2h-bar-home { background: var(--home-color); }
.h2h-bar-away { background: var(--away-color); }
.h2h-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font-size: 0.75rem; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }

/* ==================== TOP SCORERS ==================== */
.top-scorers { max-width: 500px; }
.scorer-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.scorer-name { min-width: 180px; font-size: 0.85rem; }
.scorer-bar { height: 16px; border-radius: 3px; transition: width 0.3s; }
.bar-home { background: var(--home-color); }
.bar-away { background: var(--away-color); }
.scorer-count { font-weight: 700; font-size: 0.85rem; min-width: 24px; }

/* ==================== LINEUP ==================== */
.lineup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.lineup-header { padding: 0.5rem 0.75rem; border-radius: 4px 4px 0 0; font-weight: 700; color: #fff; }
.lineup-header.home { background: var(--home-color); }
.lineup-header.away { background: var(--away-color); }
.lineup-table { width: 100%; background: #fff; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); }
.lineup-table tr:hover { background: var(--gray-50); }
.lineup-table td { padding: 0.4rem 0.75rem; border-bottom: 1px solid var(--gray-100); font-size: 0.85rem; }
.lineup-nr { width: 40px; text-align: center; font-weight: 600; color: var(--gray-500); }
.lineup-time { width: 55px; text-align: right; font-size: 0.75rem; color: var(--gray-500); white-space: nowrap; }
.sub-badge { display: inline-block; background: var(--gray-200); color: var(--gray-500); font-size: 0.6rem; font-weight: 600; padding: 0 3px; border-radius: 2px; margin-left: 2px; }
.badge-boc { display: inline-block; background: #fbbf24; color: #92400e; font-size: 0.65rem; font-weight: 700; padding: 0.1rem 0.35rem; border-radius: 3px; margin-left: 0.3rem; }
.lineup-leaders { padding: 0.5rem 0.75rem; font-size: 0.8rem; color: var(--gray-500); }
.leader-tag { display: block; }
.officials { padding: 0.75rem 0; font-size: 0.8rem; color: var(--gray-500); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

/* ==================== TIMELINE ==================== */
.timeline { position: relative; padding: 1rem 0; max-width: 800px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--gray-200); transform: translateX(-50%); }

.tl-period-pill { text-align: center; position: relative; z-index: 1; margin: 1rem 0; }
.tl-period-pill::after { content: attr(data-text); }
.tl-period-pill { background: var(--gray-100); color: var(--gray-700); display: inline-block; padding: 0.25rem 1rem; border-radius: 99px; font-size: 0.8rem; font-weight: 600; margin-left: calc(50% - 60px); }

.tl-row { display: flex; align-items: flex-start; margin-bottom: 0.4rem; position: relative; }
.tl-time { width: 50px; text-align: center; font-size: 0.75rem; color: var(--gray-500); font-weight: 600; flex-shrink: 0; padding-top: 0.2rem; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gray-300); flex-shrink: 0; margin-top: 0.35rem; position: relative; z-index: 1; }
.tl-content { flex: 1; padding: 0.2rem 0.75rem; border-radius: 4px; font-size: 0.85rem; margin: 0 0.5rem; }
.tl-main { font-weight: 500; }
.tl-detail { font-size: 0.75rem; color: var(--gray-500); }

/* Home = left, away = right */
.tl-home { flex-direction: row; }
.tl-home .tl-content { margin-right: calc(50% - 5px); text-align: right; }
.tl-home .tl-time { order: -1; }
.tl-away { flex-direction: row-reverse; }
.tl-away .tl-content { margin-left: calc(50% - 5px); text-align: left; }
.tl-away .tl-time { order: 1; }

/* Event styling */
.tl-goal .tl-dot { background: var(--accent); width: 14px; height: 14px; margin-top: 0.2rem; }
.tl-goal .tl-content { background: #ecfdf5; }
.tl-home.tl-goal .tl-content { background: #eff6ff; }
.tl-away.tl-goal .tl-content { background: #fef2f2; }

.tl-save .tl-dot { background: #3b82f6; }
.tl-save .tl-content { background: #f0f9ff; }

.tl-miss .tl-content { opacity: 0.5; }
.tl-miss .tl-dot { background: var(--gray-300); width: 6px; height: 6px; margin-top: 0.45rem; }

.tl-sub .tl-content { opacity: 0.4; font-size: 0.75rem; }
.tl-sub .tl-dot { background: var(--gray-200); width: 6px; height: 6px; margin-top: 0.45rem; }
.tl-sub:hover .tl-content { opacity: 1; }

.tl-sanction-yellow .tl-dot { background: #eab308; }
.tl-sanction-yellow .tl-content { background: #fefce8; }
.tl-sanction-red .tl-dot { background: var(--danger); }
.tl-sanction-red .tl-content { background: #fef2f2; font-weight: 600; }

.tl-7m .tl-dot { background: #8b5cf6; }
.tl-7m .tl-content { background: #f5f3ff; }

/* Score badge — erstatter prikken på mål */
.tl-score {
    background: var(--primary); color: #fff; font-size: 0.7rem; font-weight: 700;
    padding: 0.15rem 0.45rem; border-radius: 4px; white-space: nowrap; z-index: 3;
    letter-spacing: 0.5px; flex-shrink: 0; line-height: 1.3; margin-top: 0.15rem;
}

.tl-timeout .tl-dot { background: var(--gray-500); }
.tl-error .tl-dot { background: var(--warning); }
.tl-referee .tl-dot { background: var(--gray-400, #9ca3af); }

/* ==================== MATCH LIST ==================== */
.match-list { display: grid; gap: 0.5rem; }
.match-card {
    display: block; background: #fff; padding: 0.75rem 1.25rem; border-radius: var(--radius);
    box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: box-shadow 0.15s;
}
.match-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.12); text-decoration: none; }
.match-teams { display: flex; align-items: center; justify-content: center; }
.match-teams .home-name { flex: 1; text-align: right; font-weight: 600; font-size: 0.95rem; padding-right: 0.75rem; }
.match-teams .away-name { flex: 1; text-align: left; font-weight: 600; font-size: 0.95rem; padding-left: 0.75rem; }
.match-result {
    font-size: 1.1rem; font-weight: 800; color: var(--primary);
    background: var(--gray-50); padding: 0.25rem 0.75rem; border-radius: 4px;
    white-space: nowrap; flex-shrink: 0; min-width: 60px; text-align: center;
}
.match-meta { text-align: center; font-size: 0.75rem; color: var(--gray-500); margin-top: 0.3rem; }

/* ==================== PLAYER PROFILE ==================== */
.player-hero {
    display: flex; align-items: stretch;
    background: linear-gradient(to right, var(--primary) 0%, #3b6cb8 40%, #a8c4e0 70%, var(--gray-50) 100%); color: #fff;
    border-radius: var(--radius); margin-bottom: 1.5rem;
    position: relative; overflow: hidden; min-height: 280px;
}
.player-hero-left { flex: 1; padding: 2rem 2.5rem; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.6rem; }
.player-hero-left .player-avatar { margin-bottom: 0.5rem; }
.player-avatar { width: 70px; height: 70px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; }
.player-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials { font-size: 1.8rem; font-weight: 700; color: rgba(255,255,255,0.8); }

/* Hero identity block */
.hero-identity h1 { margin: 0; font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; text-shadow: 0 1px 4px rgba(0,0,0,0.2); line-height: 1.1; }
.hero-meta { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.3rem; font-size: 0.85rem; opacity: 0.8; }
.hero-meta span + span::before { content: '·'; margin-right: 0.5rem; opacity: 0.5; }

/* Hero stat grid — 3 columns, fills left side */
.hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.1rem; margin-top: 0.25rem; padding-top: 0.6rem; border-top: 1px solid rgba(255,255,255,0.15); }
.hero-grid-item { padding: 0.25rem 0; }
.hero-grid-num { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1; text-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.hero-grid-label { display: block; font-size: 0.7rem; opacity: 0.55; margin-top: 0.15rem; text-transform: uppercase; letter-spacing: 0.04em; }
.hero-grid-sanc { opacity: 0.8; }
.hero-grid-sanc .hero-grid-num { color: #fca5a5; }

/* Hero photo — right side, 40% width, fills height */
.player-hero-photo { width: 40%; flex-shrink: 0; position: relative; }
/* PNG: zoom in, anchor to top-center, crop via overflow:hidden */
.player-hero-photo.photo-png { overflow: hidden; display: flex; justify-content: center; }
.player-hero-photo.photo-png img { height: 350px; width: auto; max-width: none; transform: scale(1.3) translateY(-10px); transform-origin: top center; filter: drop-shadow(0 4px 20px rgba(0,0,0,0.25)); }

/* Non-PNG: rounded corners on all sides, slight inset */
.player-hero-photo.photo-framed { padding: 1rem 1rem 1rem 0; display: flex; align-items: center; }
.player-hero-photo.photo-framed img { width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

/* Two-col grid for player widgets */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.two-col .widget-card { background: #fff; padding: 1.25rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.two-col .widget-card h3 { font-size: 0.9rem; margin: 0 0 0.75rem; color: var(--gray-700); font-weight: 700; }

/* Widget card stat items */
.wc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.wc-stat { display: flex; flex-direction: column; }
.wc-stat-num { font-size: 1.3rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.wc-stat-label { font-size: 0.7rem; color: var(--gray-500); }

/* Percentage circle (conic-gradient) */
.pct-circle {
    width: 100px; height: 100px; border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--gray-200) calc(var(--pct) * 1%));
    display: flex; align-items: center; justify-content: center; margin: 0.75rem auto; position: relative;
}
.pct-circle::before { content: ''; width: 74px; height: 74px; border-radius: 50%; background: #fff; position: absolute; }
.pct-circle span { position: relative; z-index: 1; font-size: 1.1rem; font-weight: 700; }

/* Sanctions */
.sanction-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sanc-badge { padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.sanc-yellow { background: #fef3c7; color: #92400e; }
.sanc-orange { background: #ffedd5; color: #9a3412; }
.sanc-red { background: #fee2e2; color: #991b1b; }
.sanc-darkred { background: #991b1b; color: #fff; }

/* Bar chart */
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 0.5rem; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-fill { width: 100%; background: var(--primary-light); border-radius: 4px 4px 0 0; min-height: 2px; display: flex; align-items: flex-start; justify-content: center; font-size: 0.8rem; font-weight: 700; color: #fff; padding-top: 2px; }
.bar-label { font-size: 0.55rem; color: var(--gray-500); margin-top: 0.2rem; white-space: nowrap; }

/* Section headings on player page */
.player-section-title { font-size: 1rem; font-weight: 700; color: var(--gray-900); margin: 1.5rem 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--primary-light); }

/* Stacked bars (shot type distribution) */
.stacked-bar-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.stacked-label { min-width: 180px; font-size: 0.75rem; text-align: right; color: var(--gray-700); }
.stacked-bar { display: flex; flex: 1; height: 14px; border-radius: 3px; overflow: hidden; background: var(--gray-100); }
.stacked-goals { background: var(--accent); height: 100%; border-radius: 3px 0 0 3px; }
.stacked-miss { background: var(--gray-200); height: 100%; }
.stacked-count { font-size: 0.7rem; font-weight: 600; min-width: 40px; color: var(--gray-700); }

/* Assist rows */
.assist-row { display: flex; justify-content: space-between; padding: 0.3rem 0; border-bottom: 1px solid var(--gray-100); font-size: 0.8rem; }

/* Inline badges */
.inline-badge { display: inline-block; padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.7rem; font-weight: 600; }
.badge-goal { background: #dcfce7; color: #166534; }
.badge-assist { background: #dbeafe; color: #1e40af; }
.badge-sanction-2-minutter { background: #ffedd5; color: #9a3412; }
.badge-sanction-advarsel { background: #fef3c7; color: #92400e; }
.badge-sanction-diskvalifikasjon { background: #fee2e2; color: #991b1b; }
.badge-sanction-diskvalifikasjon-med-rapport { background: #991b1b; color: #fff; }
.badge-disq { background: #dc2626; color: #fff; font-weight: 800; }

/* Result badges */
.result-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-weight: 700; font-size: 0.8rem; }
.result-win { background: #dcfce7; color: #166534; }
.result-loss { background: #fee2e2; color: #991b1b; }
.result-draw { background: #fef3c7; color: #92400e; }

/* Footer */
.site-footer { text-align: center; padding: 2rem; color: var(--gray-500); font-size: 0.8rem; border-top: 1px solid var(--gray-200); margin-top: 3rem; }
.site-footer a { color: var(--gray-500); }

/* Responsive */
@media (max-width: 768px) {
    .nav-inner { flex-wrap: wrap; height: auto; padding: 0.5rem 1rem; }
    .nav-links { flex-wrap: wrap; }
    .scoreboard { flex-direction: column; gap: 1rem; padding: 1.5rem; }
    .sb-team-name { font-size: 1rem; }
    .sb-score-main { font-size: 2rem; }
    .lineup-grid { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .player-hero { min-height: 260px; }
    .player-hero-photo { width: 35%; }
    .player-hero-photo.photo-png img { max-height: 280px; }
    .player-hero-left { padding: 1.5rem; }
    .player-hero-left h1 { font-size: 1.3rem; }
    .hero-stats { gap: 0.75rem; }
    .hero-stat-num { font-size: 1rem; }
    .hero-detail-row { gap: 0.5rem; }
    .hero-detail-item { font-size: 0.65rem; }
    .timeline::before { left: 30px; }
    .tl-home .tl-content, .tl-away .tl-content { margin: 0 0.5rem; text-align: left; }
    .tl-away { flex-direction: row; }
    .tl-period-pill { margin-left: 0; }
    .match-teams { flex-direction: column; gap: 0.25rem; }
    .match-team { justify-content: center !important; flex-direction: row !important; }
    .squad-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Squad grid */
.squad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.squad-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}
.squad-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.squad-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.squad-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}
.squad-initials {
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
}
.squad-number {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}
.squad-info {
    padding: 0.6rem 0.75rem;
}
.squad-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}
.squad-age {
    font-size: 0.8rem;
    color: var(--gray-500);
}
.squad-stats {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.15rem;
}

/* ==================== TEAM PAGE ==================== */
.team-hero {
    background: linear-gradient(135deg, var(--primary), #1e40af);
    color: #fff; padding: 1.5rem 2rem; border-radius: var(--radius); margin-bottom: 1.5rem;
}
.team-hero h1 { margin: 0 0 0.5rem; }
.team-hero-stats {
    display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: 0.9rem; opacity: 0.85;
}
.team-hero-stats strong { font-size: 1.1rem; }

/* Card headings */
.card h3 { margin: 0 0 0.75rem; font-size: 1rem; }

/* Mini tables (compact) */
.mini-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.mini-table th { text-align: left; padding: 0.35rem 0.5rem; font-weight: 600; color: var(--gray-500); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; border-bottom: 2px solid var(--gray-200); }
.mini-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--gray-100); }
.mini-table tr:last-child td { border-bottom: none; }
.mini-table tr:hover { background: var(--gray-50); }
.mini-date { white-space: nowrap; color: var(--gray-500); font-size: 0.8rem; }
.mini-time { white-space: nowrap; color: var(--gray-500); font-size: 0.8rem; text-align: right; }
.mini-opponent { font-weight: 500; }
.mini-teams { font-size: 0.85rem; }
.mini-score { font-weight: 700; white-space: nowrap; }
.mini-nr { color: var(--gray-500); font-weight: 600; width: 35px; }

/* Squad table compact */
.squad-table { margin-top: 0.25rem; }
.squad-table th:first-child, .squad-table td:first-child { width: 35px; }
.squad-table th:nth-child(4), .squad-table td:nth-child(4),
.squad-table th:nth-child(5), .squad-table td:nth-child(5) { width: 60px; }

/* Stat bar rows (scorers/assists) */
.stat-bar-row {
    display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem;
}
.stat-rank { color: var(--gray-500); font-size: 0.8rem; min-width: 1.5rem; text-align: right; }
.stat-name { font-size: 0.85rem; min-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; max-width: 45%; }
.stat-bar-wrap { flex: 1; height: 14px; background: var(--gray-100); border-radius: 3px; overflow: hidden; }
.stat-bar { height: 100%; border-radius: 3px; transition: width 0.3s; }
.bar-goals { background: var(--accent); }
.bar-assists { background: var(--primary-light); }
.stat-val { font-weight: 700; font-size: 0.85rem; min-width: 28px; text-align: right; }

/* Match history details */
.match-history-details { margin-top: 0; }
.match-history-details summary { cursor: pointer; padding: 0; list-style: none; }
.match-history-details summary::-webkit-details-marker { display: none; }
.match-history-details summary h3::after { content: ' +'; font-weight: 400; color: var(--gray-500); }
.match-history-details[open] summary h3::after { content: ' -'; }

/* Player position in hero */
.player-position { opacity: 0.85; font-size: 0.95rem; font-weight: 500; }

/* Position badge */
.pos-badge {
    display: inline-block; background: rgba(37, 99, 235, 0.1); color: var(--primary-light);
    padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600;
}

/* Age distribution chart */
.age-distribution {
    display: flex; align-items: flex-end; gap: 1rem; height: 180px; padding-top: 1rem;
    justify-content: center;
}
.age-bar-col {
    flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center;
    justify-content: flex-end; height: 100%;
}
.age-bar-val { font-weight: 700; font-size: 1.1rem; color: var(--primary); margin-bottom: 0.25rem; }
.age-bar-fill {
    width: 100%; background: linear-gradient(180deg, var(--primary-light), var(--primary));
    border-radius: 4px 4px 0 0; min-height: 4px;
}
.age-bar-label { font-size: 0.85rem; font-weight: 600; margin-top: 0.4rem; }

/* Fill variants */
.fill-age { background: #8b5cf6; }

@media (max-width: 768px) {
    .team-hero { padding: 1.25rem; }
    .team-hero-stats { gap: 1rem; font-size: 0.8rem; }
    .stat-name { max-width: 35%; min-width: 80px; }
    .age-distribution { height: 140px; gap: 0.5rem; }
}
