/* Player Page Styles */
.player-profile {
    max-width: 900px;
    margin: 0 auto;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px;
    background: var(--bg-card);
    margin-bottom: 24px;
}

.player-image-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-darker);
    border: 3px solid var(--accent-light);
}

.player-image-placeholder-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--bg-darker);
    border: 3px solid var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.player-alternate-name {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-style: italic;
}

.player-team {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.player-team .team-badge {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.player-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.player-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.player-status.retired {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

/* Sections */
.player-section {
    background: var(--bg-card);
    padding: 24px;
    margin-bottom: 24px;
}

.player-section .section-title {
    margin-bottom: 20px;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Social Media Links */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-darker);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s, transform 0.2s;
}

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

.social-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

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

.social-link.twitter:hover {
    background: #000;
    color: white;
}

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

.social-link.youtube:hover {
    background: #ff0000;
    color: white;
}

.social-link.website:hover {
    background: var(--accent-light);
    color: var(--bg-darker);
}

/* Biography */
.player-bio p {
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-line;
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.gallery-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bg-darker);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Not Found State */
.player-not-found {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
}

.player-not-found h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    margin-bottom: 16px;
}

.player-not-found p {
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 600px) {
    .player-header {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    
    .player-image-large,
    .player-image-placeholder-large {
        width: 120px;
        height: 120px;
    }
    
    .player-image-placeholder-large span {
        font-size: 2.5rem;
    }
    
    .player-info h1 {
        font-size: 2rem;
    }
    
    .player-team {
        justify-content: center;
    }
    
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .image-gallery {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Bundesliga API Player Image Styles
   ========================================== */

/* Official Bundesliga API half-body/action images */
.player-image-large.bapi-image {
    width: 180px;
    height: 220px;
    border-radius: 8px;
    object-fit: cover;
    object-position: top center;
}

.player-image-fallback {
    display: none;
}

/* Nationality flag styling */
.nationality-with-flag {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flag-icon {
    width: 28px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nationality-name {
    font-weight: 600;
}

/* Responsive adjustments for BAPI images */
@media (max-width: 600px) {
    .player-image-large.bapi-image {
        width: 140px;
        height: 170px;
    }
}
