/* Player Profile Layout */
.player-profile {
    background: #fff;
    border-radius: 8px;
    padding: 2em;
    margin: 2em auto;
    max-width: 900px;
}

.player-top {
    display: flex;
    align-items: flex-start;
    gap: 2em;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 2em;
}

.player-header h1 {
	position: absolute;
	top: -19px;
	left: 50%;
	background-color: #fff;
	padding: 0 15px;
	transform: translateX(-50%);
	white-space: nowrap;
	font-weight: normal;
	z-index: 1;
}

.player-header .caps {
    font-size: 1em;
    color: #666;
}

.player-header .photo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: #fafafa;
    flex-shrink: 0;
    margin-top: 0.5em;
}

.player-details {
    flex: 2 1 0;
}

.player-details dl, .career-summary dl, .player-notes dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5em 1em;
    margin: 0 0 2em 0;
    font-size: 1.05em;
}

.player-details dt, .career-summary dt, .player-notes dt {
    font-weight: bold;
    color: #333;
    text-align: right;
    width:121px;
}

.player-details dd, .career-summary dd, .player-notes dd {
    margin: 0 0 0.5em 0;
    color: #444;
}

.player-notes .notes {
    font-style: normal;
    background: #f8fafd;
    border-radius: 6px;
    padding: 0.7em 1em;
    border-left: 4px solid #1a3a6b;
    border-right: 4px solid #1a3a6b;
    font-size: 1em;
    line-height: 1.6;
    word-break: break-word;
}

.player-details .notes a {
    color: #1a3a6b;
    text-decoration: underline;
    word-break: break-all;
}

.player-details .notes a:hover,
.player-details .notes a:focus {
    color: #b00;
}

.career-summary, .career-stats, .manager-stats, .teammates, .sources {
    margin-bottom: 2em;
}

.career-summary h2,
.career-stats h2,
.manager-stats h2,
.teammates h2,
.sources h2 {
    font-size: 1.2em;
    margin-bottom: 0.7em;
    color: #1a3a6b;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.3em;
}

.career-list, .table, .notes {
    list-style: none;
    padding: 0;
    margin: 0;
}

.career-list li,
.table li,
.notes li {
    padding: 0.3em 0;
    border-bottom: 1px solid #f0f0f0;
}

.career-list li:last-child,
.table li:last-child,
.notes li:last-child {
    border-bottom: none;
}

.table-header, .table-body {
    display: flex;
    flex-wrap: wrap;
    background: #f8f8f8;
    border-radius: 4px;
    margin-bottom: 0.5em;
}

.table-header li {
    flex: 1 1 0;
    padding: 0.5em 0.3em;
    text-align: center;
    font-size: 1em;
}

.table-header {
    font-weight: bold;
    background: #e9eef6;
    border-bottom: 2px solid #d7dadc;
}

.table-body {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

li.table-row {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    width: 100%;
}

li.table-row span {
    text-align: center;
    padding: 0.5em 0.3em;
    font-size: 1em;
    flex: 1 1 0;
}

ul.table-header li.forty, li.table-row .forty { flex-basis: 40%; }
ul.table-header li.ten, li.table-row .ten { flex-basis: 10%; }
.table-row .bottom-border { border-bottom: 1px solid #d7dadc; }
.table-row .top-border { border-top: 1px solid #d7dadc; }
.table-row .bold { font-weight: bold; }
ul.table-header .large, .table-row .large { font-size: 1.2em; }

@media (max-width: 700px) {
    .player-header h1 {
        font-size:1.5em;
        top:-13px;
    }
    .player-profile {
        padding: 1em;
    }
    .player-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1em;
    }
    .player-profile .photo {
        display:none;
    }
    .player-details dl {
        grid-template-columns: 1fr;
    }
    .table-header li, .table-body li {
        text-align: center;
    }
    ul.table-header li.forty, li.table-row .forty { flex-basis: 25%; }
    .player-details dl,
    .career-summary-list {
        display: block;
    }
    .player-details dt, .player-notes dt {
        text-align: left;
        margin-top: 1em;
        font-weight: bold;
        width:auto;
    }
    .player-details dd,
    .career-summary-list dd,
    .player-notes dd {
        margin-left: 0;
        margin-bottom: 0.5em;
    }
    .career-summary-list {
        display: block;
    }
    .career-summary-list dt {
        text-align: left;
        font-weight: bold;
    }
    .career-summary-list dd {
        margin-left: 0;
        margin-bottom: 0.5em;
        word-break: break-word;
    }
}

/* Player List Styles */
.player-row {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.player-row:last-child {
    border-bottom: none;
}

.player-row a {
    display: block;
    text-decoration: none;
    color: #333;
    line-height: 1.4;
}

.player-row a:hover {
    background-color: rgba(0, 123, 191, 0.05);
    border-radius: 4px;
    padding: 4px 8px;
    margin: -4px -8px;
}

.player-row .flag {
    margin-right: 8px;
    width: 25px;
    height: 18px;
}

.player-row strong {
    font-weight: 600;
}

.player-row .dates {
    color: #666;
    font-size: 0.9em;
}

.player-row .total {
    color: #555;
    font-weight: 500;
}