/**
 * Player Page Styles v2.11
 * Diseño WTA/ATP oficial
 */

/* Player Header */
.tst-player-header {
    margin-bottom: 30px;
}

.tst-player-hero {
    padding: 50px 30px;
    color: white;
}

.tst-player-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 40px;
}

.tst-player-avatar {
    flex-shrink: 0;
}

.tst-player-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.3);
}

.tst-player-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    border: 4px solid rgba(255,255,255,0.3);
}

.tst-player-info {
    flex: 1;
}

.tst-player-country {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.tst-country-flag {
    height: 20px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.tst-player-name {
    margin: 0 0 24px 0;
    font-size: 48px;
    line-height: 1.1;
}

.tst-first-name {
    display: block;
    font-weight: 300;
    color: rgba(255,255,255,0.9);
}

.tst-last-name {
    display: block;
    font-weight: 700;
}

.tst-player-rankings {
    display: flex;
    gap: 40px;
}

.tst-ranking-item {
    display: flex;
    flex-direction: column;
}

.tst-ranking-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.tst-ranking-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.tst-ranking-best .tst-ranking-value {
    color: #a3e635;
}

/* Tabs Navigation */
.tst-player-tabs {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tst-tabs-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 0;
}

.tst-tab-btn {
    background: none;
    border: none;
    padding: 18px 30px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tst-tab-btn:hover {
    color: #1e40af;
}

.tst-tab-btn.active {
    color: #1e40af;
    border-bottom-color: #1e40af;
}

/* Content Area */
.tst-player-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.tst-tab-pane {
    display: none;
}

.tst-tab-pane.active {
    display: block;
}

/* Cards */
.tst-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.tst-card h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a2840;
}

/* Player Stats */
.tst-player-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tst-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.tst-stat-row:last-child {
    border-bottom: none;
}

.tst-stat-label {
    color: #64748b;
    font-weight: 500;
}

.tst-stat-value {
    color: #1a2840;
    font-weight: 600;
}

/* Rankings Grid */
.tst-rankings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.tst-ranking-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 24px;
    border-radius: 8px;
    text-align: center;
}

.tst-ranking-box-best {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.tst-ranking-box-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tst-ranking-box-value {
    display: block;
    font-size: 42px;
    font-weight: 700;
    color: #1a2840;
}

.tst-ranking-box-best .tst-ranking-box-value {
    color: #16a34a;
}

/* Activity Section (WTA/ATP Style) */
.tst-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.tst-activity-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #1a2840;
}

.tst-activity-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.tst-filter-select {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    cursor: pointer;
}

.tst-refresh-btn {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #64748b;
}

.tst-refresh-btn:hover {
    background: #f8fafc;
}

/* Activity Summary */
.tst-activity-summary {
    display: flex;
    gap: 30px;
    padding: 24px;
    background: white;
    border-radius: 8px;
    margin-bottom: 24px;
}

.tst-summary-box {
    display: flex;
    flex-direction: column;
}

.tst-summary-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 4px;
}

.tst-summary-stats {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.tst-wl-record {
    font-size: 32px;
    font-weight: 700;
    color: #1a2840;
}

.tst-wl-label {
    font-size: 14px;
    color: #64748b;
}

.tst-summary-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a2840;
}

/* Tournament Blocks */
.tst-tournaments-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tst-tournament-block {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.tst-tournament-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tst-tournament-title h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.tst-tournament-meta {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    color: rgba(255,255,255,0.9);
}

.tst-tournament-badge {
    display: flex;
    gap: 12px;
}

.tst-points-badge,
.tst-surface-badge {
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Matches Table */
.tst-tournament-matches {
    padding: 0;
}

.tst-matches-table {
    width: 100%;
    border-collapse: collapse;
}

.tst-matches-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.tst-matches-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tst-matches-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.tst-matches-table tbody tr:hover {
    background: #f8fafc;
}

.tst-matches-table td {
    padding: 16px;
    font-size: 14px;
}

.tst-result-badge {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
}

.tst-result-badge.win {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: white;
}

.tst-result-badge.loss {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
}

.tst-country-flag-small {
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 2px;
}

.tst-opponent-rank {
    color: #64748b;
    font-size: 12px;
    margin-left: 4px;
}

.tst-tournament-footer {
    padding: 16px 24px;
    background: #f8fafc;
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
}

/* News Grid */
.tst-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.tst-news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.tst-news-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.tst-news-card-image {
    overflow: hidden;
    aspect-ratio: 16/9;
}

.tst-news-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.tst-news-card:hover .tst-news-thumbnail {
    transform: scale(1.05);
}

.tst-news-card-content {
    padding: 20px;
}

.tst-news-card-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.tst-news-card-title a {
    color: #1a2840;
    text-decoration: none;
}

.tst-news-card-title a:hover {
    color: #1e40af;
}

.tst-news-card-excerpt {
    margin: 0 0 16px 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.tst-news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.tst-news-date {
    font-size: 13px;
    color: #64748b;
}

.tst-news-read-more {
    font-size: 13px;
    font-weight: 600;
    color: #1e40af;
    text-decoration: none;
}

.tst-news-read-more:hover {
    color: #1e3a8a;
}

/* Videos Grid */
.tst-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.tst-video-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.tst-video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}

.tst-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
}

.tst-video-thumb:hover img {
    opacity: 0.8;
}

.tst-video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tst-video-info {
    padding: 16px;
}

.tst-video-info h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.tst-video-info h4 a {
    color: #1a2840;
    text-decoration: none;
}

.tst-video-info h4 a:hover {
    color: #1e40af;
}

.tst-video-channel {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

/* Biography */
.tst-bio-content {
    line-height: 1.8;
    color: #1a2840;
}

.tst-bio-content p {
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .tst-player-hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .tst-player-name {
        font-size: 36px;
    }
    
    .tst-player-rankings {
        justify-content: center;
    }
    
    .tst-tabs-nav {
        overflow-x: auto;
    }
    
    .tst-activity-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .tst-activity-summary {
        flex-direction: column;
        gap: 16px;
    }
    
    .tst-matches-table {
        font-size: 12px;
    }
    
    .tst-matches-table th,
    .tst-matches-table td {
        padding: 8px;
    }
    
    .tst-news-grid {
        grid-template-columns: 1fr;
    }
    
    .tst-videos-grid {
        grid-template-columns: 1fr;
    }
}
