/* ============================================
   Game Card - 컴팩트 디자인
   ============================================ */
.game-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: var(--spacing-md);
    transition: all 0.2s;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.game-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 6px rgba(66, 153, 225, 0.1);
}

/* 카드 상단: 날짜/맵 + 상세 보기 버튼 */
.game-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border);
}

.game-meta-info {
    display: flex;
    gap: var(--spacing-sm);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    align-items: baseline;
}

.game-date,
.game-map {
    color: var(--text-secondary);
}

.btn-view-detail-compact {
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 4px;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1.2;
}

.btn-view-detail-compact::after {
    content: '→';
    font-size: 0.875rem;
    line-height: 1;
}

.btn-view-detail-compact:hover {
    background: var(--accent-primary-hover);
    border-color: var(--accent-primary-hover);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.2);
}

.btn-view-detail-compact:hover {
    background: var(--accent-primary-hover);
    border-color: var(--accent-primary-hover);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.2);
}

/* ============================================
   Teams Layout - 컴팩트
   ============================================ */
.game-teams {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 0 var(--spacing-sm);
}

.team-section {
    border-left: 3px solid;
    padding-left: var(--spacing-sm);
    min-width: 0;
}

.team-blue {
    border-left-color: var(--team-blue, #4299E1);
}

.team-red {
    border-left-color: var(--team-red, #F56565);
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border);
}

.team-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex: 1;
    min-width: 0;
}

.team-name {
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
    color: white;
}

.team-blue .team-name {
    background-color: var(--team-blue, #4299E1);
    color: white;
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.2);
}

.team-red .team-name {
    background-color: var(--team-red, #F56565);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 101, 101, 0.2);
}

.result-text {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.125rem 0.375rem;
    border-radius: 2px;
}

.result-승리 {
    color: var(--accent-secondary);
    background: rgba(72, 187, 120, 0.1);
}

.result-패배 {
    color: var(--color-danger, #D97706);
    background: rgba(217, 119, 6, 0.1);
}

/* 평균 점수 - 같은 줄에 배치 */
.team-score-compact {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    text-align: right;
}

.team-avg-score {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.team-score-unit {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.team-score-label-inline {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* ============================================
   Players List - 챔피언 2단 레이아웃
   ============================================ */
.players-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.player-row {
    display: flex;
    text-decoration: none;
    color: inherit;
    border-radius: 2px;
    transition: all 0.2s;
    min-width: 0;
    padding: 0.375rem 0.5rem;
}

.player-row:hover {
    background: var(--bg-hover);
    text-decoration: none;
    color: inherit;
}

/* 챔피언 행: 챔피언 아이콘(2단) + 오른쪽 정보 */
.player-champion-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    align-items: flex-start;
}

/* 챔피언 아이콘 - 2단(2줄) 차지 */
.player-champion-icon {
    flex-shrink: 0;
}

.champion-icon {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 1px solid var(--border);
    object-fit: cover;
    display: block;
}


.player-champion-row > .player-info {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
}

/* 오른쪽 정보 영역 */
.player-info > .player-first-line,
.player-info > .player-second-line {
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* 첫 번째 줄: 포지션 | 점수 */
.player-first-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-xs);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.player-champion-role {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
}

.player-role {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    padding: 0.125rem 0.375rem;
    background: var(--bg-surface);
    border-radius: 2px;
    white-space: nowrap;
    font-weight: 500;
    line-height: 1.2;
}


.player-score {
    font-weight: 600;
    color: #0d47a1;
    background: #e8f0fe;
    border-radius: 12px;
    padding: 0.25rem 0.55rem;
    font-size: 0.78rem;
    border: 1px solid #d2defb;
}

.score-unit {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 0.125rem;
}

/* 두 번째 줄: 닉네임 + KDA */
.player-second-line {
    line-height: 1.3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-xs);
}

.player-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    word-break: break-word;
    white-space: normal;
    transition: text-decoration 0.2s;
    flex: 1;
    min-width: 0;
}

.player-row:hover .player-name {
    text-decoration: underline;
}

.player-kda {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.player-empty {
    padding: var(--spacing-sm);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .game-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .game-teams {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
        border-left: none;
        border-right: none;
        padding: 0;
    }
    
    .team-section {
        border-left: 3px solid;
        border-top: none;
        padding-left: var(--spacing-sm);
        padding-top: 0;
    }
    
    .champion-icon {
        width: 40px;
        height: 40px;
    }
}
