﻿.team-data-container {
    padding: 0;
}

.team-data-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px 24px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.team-data-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.team-data-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 최고의 선수 섹션 */
.top-players-section {
    margin-bottom: 32px;
    padding: 20px 60px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.top-players-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 8px;
}

.top-players-section h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.guide-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-accent-light);
    color: var(--text-accent);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-normal);
}

.guide-btn:hover {
    background: var(--bg-accent);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.top-players-subtitle {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
}

.top-players-slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.top-players-slider-container .slider-nav-btn {
    position: absolute;
    z-index: 10;
}

.top-players-slider-container .slider-prev-btn {
    left: -50px;
}

.top-players-slider-container .slider-next-btn {
    right: -50px;
}

.top-players-slider {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.top-players-track {
    display: flex;
    transition: transform var(--transition-normal);
    will-change: transform;
}

.top-players-slide {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    flex: 0 0 100%;
    min-width: 0;
}

.top-player-category {
    text-align: center;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    min-width: 200px;
}

.top-player-category:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-accent);
}

.top-player-category h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-accent);
}

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

.top-player-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    min-height: 50px;
    position: relative;
}

.top-player-item:hover {
    background: var(--bg-primary);
    border-color: var(--border-accent);
}

.top-player-item.first-place {
    background: var(--bg-secondary);
    border: 1px solid #d4af37;
    box-shadow: 0 1px 4px rgba(212, 175, 55, 0.15);
}

.top-player-item.first-place:hover {
    background: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.player-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

.player-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.player-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.player-stats {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-accent);
}

.team-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: auto;
    min-height: 600px;
}

/* 클럽 카드 슬라이더 컨테이너 */
.team-cards-slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* 슬라이더 네비게이션 버튼 */
.slider-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.slider-nav-btn:hover:not(:disabled) {
    background: var(--bg-accent);
    color: var(--text-inverse);
    border-color: var(--bg-accent);
    transform: scale(1.05);
}

.slider-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.slider-prev-btn {
    order: 1;
}

.slider-next-btn {
    order: 3;
}

/* 슬라이더 메인 컨테이너 */
.team-cards-slider {
    flex: 1;
    overflow: hidden;
    position: relative;
    order: 2;
}

/* 클럽 카드 트랙 (슬라이더용) */
.team-cards-track {
    display: flex;
    gap: 16px;
    transition: transform var(--transition-normal);
    will-change: transform;
    width: 100%;
}

/* 슬라이드 컨테이너 (각 슬라이드마다 2개 카드) */
.team-slide {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    flex: 0 0 100%;
    min-width: 0;
}

/* 개별 클럽 카드 */
.team-formation-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.team-detail-panel {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.team-detail-panel::-webkit-scrollbar {
    width: 6px;
}

.team-detail-panel::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.team-detail-panel::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.team-detail-panel::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

.team-detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.team-detail-placeholder h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
}

.team-detail-placeholder p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.team-detail-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.team-detail-title h3 {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.team-detail-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.team-detail-meta .meta-item {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.team-detail-meta .meta-item:hover {
    border-color: #00d4aa;
    background: linear-gradient(135deg, #333 0%, #2a2a2a 100%);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .team-detail-title h3 {
        font-size: 20px;
    }
    
    .team-detail-meta {
        gap: 12px;
    }
    
    .team-detail-meta .meta-item {
        font-size: 12px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .team-detail-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .team-detail-meta .meta-item {
        text-align: center;
    }
}

.team-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.team-detail-matches {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 선수별 성과 섹션 */
.player-stats-section {
    margin-bottom: 32px;
}

.player-stats-section h4 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-accent);
}

.player-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* 선수 통계 테이블 */
.player-stats-table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.player-stats-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.player-stats-table thead {
    background: var(--bg-secondary);
}

.player-stats-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.player-info-header {
    text-align: left !important;
    min-width: 200px;
}

.stats-header {
    min-width: 80px;
}

.player-stats-row {
    transition: background-color 0.2s ease;
}

.player-stats-row:hover {
    background: var(--bg-hover);
}

.player-stats-row:nth-child(even) {
    background: var(--bg-secondary);
}

.player-stats-row:nth-child(even):hover {
    background: var(--bg-hover);
}

.player-info-cell {
    padding: 12px 8px;
    text-align: left;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: row;
}

.player-position-badge {
    background: var(--bg-secondary);
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    min-width: 35px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-season-badge {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.season-image {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.season-placeholder {
    width: 24px;
    height: 24px;
    display: block;
}

.player-grade-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    min-width: 35px;
    text-align: center;
}

.player-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.stats-cell {
    padding: 12px 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    border-left: 1px solid var(--border-color);
}

.stats-cell.rating-excellent {
    color: #22c55e;
    font-weight: 700;
}

.stats-cell.rating-good {
    color: #3b82f6;
    font-weight: 700;
}

.stats-cell.rating-average {
    color: #f59e0b;
    font-weight: 700;
}

.stats-cell.rating-poor {
    color: #ef4444;
    font-weight: 700;
}

/* 경기 기록 섹션 */
.match-history-section h4 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-accent);
}

/* 기존 team-formation-card 스타일은 위에서 정의했으므로 중복 제거 */

.team-formation-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
}

.team-formation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, var(--bg-accent), #00b894);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.team-formation-card:hover::before {
    opacity: 1;
}

.team-formation-card.selected {
    border-color: var(--border-accent);
    background: var(--bg-accent-light);
    box-shadow: var(--shadow-md);
}

.team-formation-card.selected::before {
    opacity: 1;
}

/* 선택된 카드 강조 효과 */
.team-formation-card.selected {
    border: 2px solid var(--bg-accent);
    background: linear-gradient(135deg, var(--bg-accent-light), var(--bg-card));
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.2);
}

.team-formation-card.selected .team-formation-club {
    color: var(--text-accent);
    font-weight: 800;
}

.team-formation-card.selected .team-stat-value {
    color: var(--text-accent);
}

.team-formation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
    flex-direction: row;
}

.team-formation-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.team-formation-name-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    flex-direction: row;
}

.team-formation-club {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
    flex-shrink: 0;
}

.team-formation-players {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
    text-align: right;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.team-formation-info {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.team-formation-stats {
    margin-bottom: 12px;
}

.team-stat-single-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    gap: 12px;
}

.team-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.team-stat-item {
    text-align: center;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    min-width: 60px;
}

.team-formation-card:hover .team-stat-item {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

.team-stat-label {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.team-stat-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.team-stat-value.win-rate {
    color: var(--text-accent);
}

.team-stat-value.avg-goals {
    color: #ff6b6b;
}

.team-stat-value.avg-conceded {
    color: #4ecdc4;
}

.team-formation-players {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.team-player-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    position: relative;
}

.team-formation-card:hover .team-player-item {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.team-player-image {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.team-formation-card:hover .team-player-image {
    border-color: var(--border-accent);
    transform: scale(1.05);
}

.team-player-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.team-player-position {
    font-size: 9px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-player-rating {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-accent);
    background: var(--bg-accent-light);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-accent);
}

.team-player-more {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    text-align: center;
}

.team-formation-footer {
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    margin-top: 12px;
}

.team-match-period {
    color: var(--text-muted);
    font-size: 12px;
    padding: 4px 8px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    display: inline-block;
    margin: 0;
}

.team-match-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.team-match-count {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.team-match-period {
    font-size: 12px;
    color: var(--text-secondary);
}

.team-view-details {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
}

.team-formation-card:hover .team-view-details {
    color: var(--text-primary);
    transform: translateX(4px);
}

.team-view-details::after {
    content: '→';
    font-size: 14px;
    transition: transform var(--transition-fast);
}

.team-formation-card:hover .team-view-details::after {
    transform: translateX(4px);
}

.no-team-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-data-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-team-data h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 700;
}

.no-team-data p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* 선수 상세 모달 스타일 */
.team-formation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-formation-modal-overlay.show {
    opacity: 1;
}

.team-formation-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 1000px;
    max-height: 85vh;
    width: 95%;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.team-formation-modal-overlay.show .team-formation-modal {
    transform: scale(1);
}

.team-formation-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.team-formation-modal-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-formation-modal-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.team-formation-modal-title p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.team-formation-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
}

.team-formation-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.team-formation-modal-content {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.team-formation-matches {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.team-formation-match-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all var(--transition-fast);
}

.team-formation-match-item:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.team-formation-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.team-formation-match-date {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.team-formation-match-result {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-formation-match-result.win {
    background: var(--bg-accent-light);
    color: var(--text-success);
    border: 1px solid var(--bg-accent);
}

.team-formation-match-result.lose {
    background: rgba(255, 71, 87, 0.1);
    color: var(--text-error);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.team-formation-match-result.draw {
    background: rgba(255, 165, 2, 0.1);
    color: var(--text-warning);
    border: 1px solid rgba(255, 165, 2, 0.3);
}

.team-formation-match-details {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 16px;
}

.team-formation-match-opponent {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.team-formation-match-score {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-card);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
    min-width: 100px;
}

.team-formation-match-players {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.team-formation-match-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.team-formation-match-player:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

.team-formation-match-player-image {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.team-formation-match-player-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.team-formation-match-player-stats {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}

.team-formation-match-player-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.team-formation-match-player-stat-label {
    font-size: 9px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-formation-match-player-stat-value {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

.team-formation-match-player-stat-value.rating {
    color: var(--text-accent);
}

.team-formation-match-player-stat-value.goals {
    color: #ff6b6b;
}

.team-formation-match-player-stat-value.assists {
    color: #4ecdc4;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .team-cards-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .team-formation-card {
        padding: 16px;
    }
    
    .team-formation-players {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .team-formation-match-details {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: center;
    }
    
    .team-formation-match-players {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .team-formation-modal {
        width: 98%;
        max-height: 90vh;
    }
    
    .team-formation-modal-header {
        padding: 16px;
    }
    
    .team-formation-modal-content {
        padding: 16px;
    }
}

    @media (max-width: 768px) {
        .team-layout {
            flex-direction: column;
            height: auto;
        }
        
        .team-cards-slider-container {
            padding: 16px;
            gap: 12px;
        }
        
        .slider-nav-btn {
            width: 40px;
            height: 40px;
        }
        
        .team-slide {
            grid-template-columns: 1fr;
            gap: 12px;
        }
        
        .team-formation-card {
            min-height: 120px;
            padding: 12px;
        }
        
        .team-detail-panel {
            min-height: 400px;
        }
    }
    
    @media (max-width: 480px) {
        .team-cards-slider-container {
            padding: 12px;
            gap: 8px;
        }
        
        .slider-nav-btn {
            width: 36px;
            height: 36px;
        }
        
        .team-formation-card {
            min-height: 100px;
            padding: 10px;
        }
        
        .team-formation-club {
            font-size: 16px;
        }
        
        .team-formation-players {
            font-size: 14px;
        }
        
        .top-players-slide {
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
        }
        
        .top-player-category {
            padding: 12px;
            min-width: 180px;
        }
        
        .player-name {
            font-size: 11px;
            max-width: 80px;
        }
        
        .player-stats {
            font-size: 9px;
        }
        
        .player-image {
            width: 35px;
            height: 35px;
        }
        
        .top-players-slider-container {
            gap: 12px;
        }
        
        .top-players-section {
            padding: 20px 50px;
        }
        
        .top-players-slider-container .slider-prev-btn {
            left: -40px;
        }
        
        .top-players-slider-container .slider-next-btn {
            right: -40px;
        }
        
        .slider-nav-btn {
            width: 36px;
            height: 36px;
        }
    }

    @media (max-width: 480px) {
        .team-formation-players {
            grid-template-columns: repeat(2, 1fr);
        }
        
        .team-formation-match-players {
            grid-template-columns: repeat(3, 1fr);
        }
        
        .top-players-slide {
            grid-template-columns: repeat(2, 1fr); /* 2x2 on mobile */
        }
        
        .top-player-category {
            min-width: 150px;
            padding: 10px;
        }
        
        .player-name {
            font-size: 10px;
            max-width: 70px;
        }
        
        .player-image {
            width: 30px;
            height: 30px;
        }
        
        .top-players-section {
            padding: 20px 40px;
        }
        
        .top-players-slider-container .slider-prev-btn {
            left: -35px;
        }
        
        .top-players-slider-container .slider-next-btn {
            right: -35px;
        }
        
        .team-cards-sidebar {
            max-height: 250px;
        }
    }

    /* 구단 카드 선택 가이드 스타일 */
    .team-card-guide {
        background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
        border: 1px solid #404040;
        border-radius: 12px;
        padding: 24px;
        margin: 16px 0;
        text-align: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
    }

    .team-card-guide:hover {
        border-color: #555;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    }

    .guide-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .guide-icon {
        font-size: 32px;
        animation: bounce 2s infinite;
    }

    .guide-content h4 {
        color: #ffffff;
        font-size: 18px;
        font-weight: 600;
        margin: 0;
    }

    .guide-content p {
        color: #b0b0b0;
        font-size: 14px;
        margin: 0;
        line-height: 1.5;
    }

    @keyframes bounce {
        0%, 20%, 50%, 80%, 100% {
            transform: translateY(0);
        }
        40% {
            transform: translateY(-8px);
        }
        60% {
            transform: translateY(-4px);
        }
    }

    /* 모바일 반응형 */
    @media (max-width: 768px) {
        .team-card-guide {
            padding: 20px 16px;
            margin: 12px 0;
        }

        .guide-icon {
            font-size: 28px;
        }

        .guide-content h4 {
            font-size: 16px;
        }

        .guide-content p {
            font-size: 13px;
        }
    }

    /* 구단 통계 영역 스타일 (오른쪽 패널 내) - 개별 카드 형식 */
    .team-detail-panel .team-stats-section {
        margin: 1.5rem 0;
        animation: fadeInUp 0.5s ease-out;
    }

    .team-detail-panel .team-stats-title {
        color: #ffffff;
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 16px;
        margin-left: 0;
        padding-bottom: 8px;
        border-bottom: 2px solid var(--border-accent);
    }

    .team-detail-panel .team-stats-cards {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 20px;
    }

    .team-detail-panel .stat-card {
        background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
        border: 1px solid #333;
        border-radius: 8px;
        padding: 12px 16px;
        text-align: center;
        min-width: 80px;
        flex: 1;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .team-detail-panel .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, #00d4aa 0%, #00b894 100%);
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }

    .team-detail-panel .stat-card:hover {
        border-color: #00d4aa;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 212, 170, 0.2);
    }

    .team-detail-panel .stat-card:hover::before {
        transform: scaleX(1);
    }

    .team-detail-panel .stat-card .stat-label {
        color: #b3b3b3;
        font-size: 12px;
        font-weight: 500;
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .team-detail-panel .stat-card .stat-value {
        color: #ffffff;
        font-size: 16px;
        font-weight: 700;
        line-height: 1;
    }

    .stat-value.high {
        color: #00d4aa;
    }

    .stat-value.medium {
        color: #ffa502;
    }

    .stat-value.low {
        color: #ff4757;
    }

    /* 대시보드 승률 색상 */
    .summary-value.high {
        color: #00d4aa;
    }

    .summary-value.medium {
        color: #ffa502;
    }

    .summary-value.low {
        color: #ff4757;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* 반응형 디자인 */
    @media (max-width: 768px) {
        .team-detail-panel .team-stats-cards {
            gap: 8px;
        }

        .team-detail-panel .stat-card {
            min-width: 70px;
            padding: 10px 12px;
        }

        .team-detail-panel .stat-card .stat-value {
            font-size: 14px;
        }

        .team-detail-panel .stat-card .stat-label {
            font-size: 11px;
        }

        .team-detail-panel .team-stats-title {
            font-size: 16px;
        }
    }

    @media (max-width: 480px) {
        .team-detail-panel .team-stats-cards {
            flex-direction: column;
            gap: 8px;
        }

        .team-detail-panel .stat-card {
            min-width: auto;
            width: 100%;
        }
    }

/* 포메이션 분석 탭 스타일 */

/* ========== 무지개 등급 시스템 (구단별 데이터용) ========== */

/* 백금색 계열 (11-13) - 부드러운 황금-무지개-사파이어 그라디언트 */
.player-grade-badge.grade-11 { 
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.8), rgba(255, 165, 0, 0.7), rgba(230, 230, 250, 0.6), rgba(176, 196, 222, 0.7));
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.player-grade-badge.grade-12 { 
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.7), rgba(255, 140, 0, 0.6), rgba(240, 230, 140, 0.5), rgba(135, 206, 235, 0.6), rgba(70, 130, 180, 0.7));
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.player-grade-badge.grade-13 { 
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.6), rgba(255, 127, 80, 0.5), rgba(221, 160, 221, 0.4), rgba(135, 206, 235, 0.5), rgba(65, 105, 225, 0.6), rgba(25, 25, 112, 0.7));
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 무지개 등급 특별 효과 */
.player-grade-badge.grade-11, 
.player-grade-badge.grade-12, 
.player-grade-badge.grade-13 {
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3), 0 0 4px rgba(135, 206, 235, 0.2);
    border: 1px solid rgba(255, 165, 0, 0.3);
    animation: team-iridescent-glow 4s ease-in-out infinite alternate;
}

/* 구단별 데이터용 무지개 글로우 애니메이션 */
@keyframes team-iridescent-glow {
    0% {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.3), 0 0 4px rgba(135, 206, 235, 0.2);
        filter: hue-rotate(0deg) brightness(1.1);
    }
    25% {
        box-shadow: 0 0 10px rgba(255, 165, 0, 0.4), 0 0 6px rgba(221, 160, 221, 0.3);
        filter: hue-rotate(90deg) brightness(1.05);
    }
    50% {
        box-shadow: 0 0 12px rgba(135, 206, 235, 0.5), 0 0 8px rgba(65, 105, 225, 0.4);
        filter: hue-rotate(180deg) brightness(1.0);
    }
    75% {
        box-shadow: 0 0 10px rgba(65, 105, 225, 0.4), 0 0 6px rgba(25, 25, 112, 0.3);
        filter: hue-rotate(270deg) brightness(1.05);
    }
    100% {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.3), 0 0 4px rgba(135, 206, 235, 0.2);
        filter: hue-rotate(360deg) brightness(1.1);
    }
}