/* Team Page Specific Styles */
.team-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: var(--bg-card);
    margin-bottom: 32px;
}

.team-header .team-logo-large {
    width: 80px;
    height: 80px;
}

.team-info h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.team-position {
    font-size: 1rem;
    color: var(--text-secondary);
}

.team-position span {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--accent-light);
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 32px;
}

.match-item {
    display: grid;
    grid-template-columns: 80px 1fr auto 1fr 80px;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
}

.match-item .match-team {
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: color 0.15s ease;
}

a.match-team:hover {
    color: var(--accent-light);
}

.match-matchday {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
}

/* Team page news list */
.news-list {
    margin-bottom: 32px;
}

/* Lineup Prediction Styles */
.lineup-container {
    background: var(--bg-card);
    padding: 20px;
    margin-bottom: 32px;
}

.lineup-match-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-darker);
}

.lineup-opponent {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.lineup-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Horizontal pitch layout */
.lineup-pitch.horizontal {
    background: linear-gradient(90deg, #1a472a 0%, #2d5a3d 50%, #1a472a 100%);
    border-radius: 4px;
    padding: 24px 16px;
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    min-height: 320px;
    overflow: hidden;
}

/* Center line (vertical for horizontal pitch) */
.lineup-pitch.horizontal::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* Center circle */
.lineup-pitch.horizontal::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Position columns */
.position-column {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    flex: 1;
    gap: 8px;
    z-index: 1;
}

.gk-column {
    flex: 0.6;
}

.def-column {
    flex: 1.2;
}

.mid-column {
    flex: 1.2;
}

.fw-column {
    flex: 0.8;
}

/* Player card */
.lineup-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.player-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-darker);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.player-image-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-image-placeholder span {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    color: var(--text-secondary);
}

.lineup-player .player-name {
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lineup-player .player-probability {
    font-size: 0.7rem;
    color: var(--accent-light);
    font-family: 'Bebas Neue', sans-serif;
}

/* Lineup Player Link */
.lineup-player-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease;
}

.lineup-player-link:hover {
    transform: scale(1.05);
}

.lineup-player-link:hover .player-image,
.lineup-player-link:hover .player-image-placeholder {
    border-color: var(--accent-light);
}

.lineup-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--bg-darker);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.lineup-source {
    opacity: 0.7;
}

.lineup-updated {
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .team-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .team-meta {
        justify-content: center;
    }
    
    .header-links {
        justify-content: center;
    }
    
    .lineup-pitch.horizontal {
        min-height: 280px;
        padding: 16px 8px;
    }
    
    .player-image,
    .player-image-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .lineup-player .player-name {
        font-size: 0.65rem;
        padding: 3px 6px;
        max-width: 70px;
    }
    
    .lineup-player .player-probability {
        font-size: 0.6rem;
    }
}

@media (max-width: 500px) {
    .team-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-link {
        width: 36px;
        height: 36px;
    }
    
    .header-link svg {
        width: 18px;
        height: 18px;
    }
    
    .lineup-match-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .lineup-pitch.horizontal {
        min-height: 240px;
        padding: 12px 4px;
    }
    
    .player-image,
    .player-image-placeholder {
        width: 32px;
        height: 32px;
    }
    
    .player-image-placeholder span {
        font-size: 0.75rem;
    }
    
    .lineup-player .player-name {
        font-size: 0.55rem;
        padding: 2px 4px;
        max-width: 55px;
    }
}

/* Form Guide */
.form-card .stat-value {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 2rem;
    line-height: 2rem;
}

.form-guide {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.form-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.form-dot.w {
    background: #22c55e;  /* Win - green */
}

.form-dot.d {
    background: #eab308;  /* Draw - yellow */
}

.form-dot.l {
    background: #ef4444;  /* Loss - red */
}

/* Stadium Info */
.team-stadium {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stadium-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.stadium-name {
    color: var(--text-primary);
}

.stadium-city {
    opacity: 0.7;
}

/* H2H Stats Container */
.h2h-container {
    background: var(--bg-card);
    padding: 20px;
    margin-bottom: 32px;
}

.h2h-match-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-darker);
}

.h2h-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    text-align: center;
}

.h2h-stat {
    padding: 12px 8px;
    background: var(--bg-darker);
    border-radius: 4px;
}

.h2h-stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.h2h-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.h2h-stat.h2h-wins .h2h-stat-value {
    color: var(--accent-light);
}

.h2h-stat.h2h-draws .h2h-stat-value {
    color: #eab308;
}

.h2h-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--bg-darker);
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Transfers Container */
.transfers-container {
    background: var(--bg-card);
    padding: 20px;
    margin-bottom: 32px;
}

.transfers-section {
    margin-bottom: 20px;
}

.transfers-section:last-of-type {
    margin-bottom: 0;
}

.transfers-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bg-darker);
}

.transfers-header.transfers-in {
    color: #22c55e;
}

.transfers-header.transfers-out {
    color: #ef4444;
}

.transfer-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.transfers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transfer-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-darker);
    border-radius: 4px;
}

.transfer-player {
    font-weight: 600;
    color: var(--text-primary);
}

.transfer-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    grid-column: 1;
}

.transfer-from,
.transfer-to {
    color: var(--text-secondary);
}

.transfer-type {
    color: var(--accent-light);
}

.transfer-amount {
    color: #22c55e;
}

.transfer-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
    align-self: center;
}

.transfers-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--bg-darker);
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Responsive H2H */
@media (max-width: 768px) {
    .h2h-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .h2h-stat-value {
        font-size: 1.5rem;
    }
    
    .h2h-stat-label {
        font-size: 0.65rem;
    }
}

@media (max-width: 500px) {
    .h2h-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .h2h-stats-grid .h2h-stat:last-child {
        grid-column: span 2;
    }
    
    .transfer-item {
        grid-template-columns: 1fr;
    }
    
    .transfer-date {
        text-align: left;
        grid-column: 1;
    }
}

/* ==========================================
   Bundesliga API Enrichment Styles
   ========================================== */

/* Club Colors Header */
.team-header.has-club-colors {
    background: linear-gradient(135deg, var(--club-primary) 0%, color-mix(in srgb, var(--club-primary) 70%, black) 100%);
    color: var(--club-primary-text);
    border-left: 4px solid var(--club-secondary);
}

.team-header.has-club-colors .team-position {
    color: var(--club-primary-text);
    opacity: 0.9;
}

.team-header.has-club-colors .team-position span {
    color: var(--club-primary-text);
    opacity: 1;
}

.team-header.has-club-colors .team-stadium,
.team-header.has-club-colors .team-founded {
    color: var(--club-primary-text);
    opacity: 0.85;
}

.team-header.has-club-colors .stadium-name {
    color: var(--club-primary-text);
}

.team-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.team-founded {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.team-header.has-club-colors .team-founded {
    color: var(--club-primary-text);
    opacity: 0.8;
}

/* Header Links */
.header-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.header-link svg {
    width: 16px;
    height: 16px;
}

.header-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.team-header.has-club-colors .header-link {
    color: var(--club-primary-text);
}

.team-header:not(.has-club-colors) .header-link {
    background: var(--bg-darker);
}

.team-header:not(.has-club-colors) .header-link:hover {
    background: var(--accent);
}

.stadium-capacity {
    opacity: 0.7;
}

/* Stadium Card */
.stadium-card {
    background: var(--bg-card);
    overflow: hidden;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
}

.stadium-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.stadium-card.no-image .stadium-image {
    display: none;
}

.stadium-info {
    padding: 16px 20px;
}

.stadium-info .stadium-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stadium-capacity-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--text-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.stadium-maps-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s ease;
}

.stadium-maps-link .link-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.stadium-maps-link:hover {
    color: var(--text-primary);
}

/* Coach Section */
.coach-section {
    margin-bottom: 32px;
}

.coach-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    padding: 16px 20px;
}

.coach-image {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-darker);
    border: 2px solid var(--accent);
}

.coach-image-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-darker);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.coach-image-placeholder span {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.coach-info {
    flex: 1;
}

.coach-role {
    font-size: 0.8rem;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.coach-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.coach-nationality {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Squad Container */
.squad-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.squad-position-group {
    background: var(--bg-card);
    padding: 16px 20px;
}

.position-header {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: var(--accent-light);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bg-darker);
}

.squad-players {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
}

.squad-player-link {
    text-decoration: none;
    color: inherit;
}

.squad-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.squad-player-link:hover .squad-player {
    background: var(--bg-darker);
}

.player-circle-image {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-darker);
    border: 2px solid var(--bg-darker);
    transition: border-color 0.15s ease;
}

.squad-player-link:hover .player-circle-image {
    border-color: var(--accent-light);
}

.player-circle-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-darker);
    border: 2px solid var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease;
}

.squad-player-link:hover .player-circle-placeholder {
    border-color: var(--accent-light);
}

.player-circle-placeholder span {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.squad-player .player-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.squad-player .player-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.squad-player .player-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    color: var(--accent-light);
}

/* Club Links */
.club-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.club-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.club-link:hover {
    background: var(--bg-darker);
    transform: translateY(-2px);
}

.club-link .link-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.club-link.twitter:hover {
    background: #1da1f2;
    color: white;
}

.club-link.facebook:hover {
    background: #1877f2;
    color: white;
}

.club-link.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.club-link.website:hover {
    background: var(--accent);
}

.club-link.tickets:hover {
    background: #22c55e;
    color: white;
}

/* Responsive Squad */
@media (max-width: 768px) {
    .squad-players {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 12px;
    }
    
    .player-circle-image,
    .player-circle-placeholder {
        width: 48px;
        height: 48px;
    }
    
    .squad-player .player-name {
        font-size: 0.75rem;
        max-width: 70px;
    }
    
    .squad-player .player-number {
        font-size: 0.8rem;
    }
    
    .stadium-image {
        height: 150px;
    }
}

@media (max-width: 500px) {
    .squad-players {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .player-circle-image,
    .player-circle-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .player-circle-placeholder span {
        font-size: 0.75rem;
    }
    
    .squad-player .player-name {
        font-size: 0.65rem;
        max-width: 60px;
    }
    
    .club-links {
        gap: 8px;
    }
    
    .club-link {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .coach-card {
        padding: 12px 16px;
    }
    
    .coach-image,
    .coach-image-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .coach-name {
        font-size: 1.1rem;
    }
}
