/* ===== Player Card Display Styling ===== */
/* Ensures pre-generated HTML cards display correctly in the webapp */

/* Card Container */
.player-card-container .card-html {
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius);
}

/* Override any conflicting styles from the card HTML */
.player-card-container .card-html * {
    box-sizing: border-box;
}

/* Ensure card images are responsive */
.player-card-container .card-html img {
    max-width: 100%;
    height: auto;
}

/* Card wrapper for centering */
.card-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Responsive card sizing */
@media (max-width: 768px) {
    .player-card-container .card-html {
        transform: scale(0.9);
        transform-origin: top center;
    }
}

@media (max-width: 480px) {
    .player-card-container .card-html {
        transform: scale(0.75);
        transform-origin: top center;
    }
}

/* ===== Card Skeleton Loading ===== */
.card-skeleton {
    background: var(--bg-glass);
    border-radius: var(--border-radius);
    padding: 20px;
    animation: skeleton-pulse 1.5s infinite;
}

.card-skeleton-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.card-skeleton-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.card-skeleton-info {
    flex: 1;
}

.card-skeleton-line {
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-bottom: 8px;
}

.card-skeleton-line.short { width: 60%; }
.card-skeleton-line.medium { width: 80%; }

.card-skeleton-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.card-skeleton-stat {
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Inline Card Styling (for dynamically generated cards) ===== */
.inline-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 20px;
    color: white;
    font-family: 'Inter', sans-serif;
}

.inline-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.inline-card-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.inline-card-player-info h2 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.inline-card-player-info .meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.inline-card-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin-left: auto;
}

.inline-card-rating.elite {
    background: linear-gradient(135deg, #10b981, #059669);
}

.inline-card-rating.good {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.inline-card-rating.average {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.inline-card-rating.below {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.inline-card-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.inline-card-stat {
    text-align: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.inline-card-stat .value {
    font-size: 1.25rem;
    font-weight: 700;
}

.inline-card-stat .label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    margin-top: 4px;
}

/* Trend Chart Placeholder */
.inline-card-chart {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    min-height: 100px;
}

/* Line Usage Badges */
.inline-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.line-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.line-badge.line1 { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.line-badge.line2 { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.line-badge.pp1 { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.line-badge.pp2 { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }
.line-badge.pk1 { background: rgba(236, 72, 153, 0.2); color: #ec4899; }

/* Refresh Timestamp Badge */
.refresh-timestamp {
    font-size: 0.7rem;
    font-weight: 500;
    color: #888;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
    margin-left: auto;
    white-space: nowrap;
}


/* Refresh Badge */
.refresh-badge {
    font-size: 0.7rem;
    font-weight: 500;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
    margin-left: auto;
    white-space: nowrap;
}

