/* ===== PLAYER HEADER ===== */
.player-header {
    background: linear-gradient(135deg, #003893 0%, #001f4d 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.header-top .flag-icon {
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.player-info h1 {
    font-size: 2.5rem;
    margin: 0;
    font-weight: 700;
}

.player-info p {
    margin: 0;
    font-size: 1.1rem;
}

/* Teams Section */
.teams-section {
    margin-top: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.teams-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.teams-list {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.team-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.team-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.team-badge a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.team-badge a:hover {
    text-decoration: underline;
}

.season-tag {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
}

/* ===== TABS ===== */
.tabs-navigation {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #DC143C;
}

.tab-btn.active {
    color: #DC143C;
    border-bottom-color: #DC143C;
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== STATS CARD ===== */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.stats-card h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #DC143C;
}

.stats-card h3 {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}

.stats-card h3:first-child {
    margin-top: 0;
}

.stats-section {
    margin-bottom: 2rem;
}

.stats-section:last-child {
    margin-bottom: 0;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1.2rem;
    background: #fafafa;
    border-radius: 8px;
    border-left: 3px solid #DC143C;
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.1);
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 10px;
}

.stat-value {
    font-size: 1.6rem;
    color: #003893;
    font-weight: 700;
}

/* ===== TABLES ===== */
.table-wrapper {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.stats-table thead {
    background: #f5f5f5;
    border-bottom: 2px solid #DC143C;
}

.stats-table th {
    padding: 0.9rem;
    font-weight: 600;
    text-align: left;
    color: white;
    font-size: 0.85rem;
}

.stats-table th:first-child {
    text-align: left;
}

.stats-table tr.sub-header th {
    padding: 0.6rem 0.9rem;
    font-size: 0.75rem;
    background: #efefef;
    border-bottom: 1px solid #ddd;
    color: #333;
}

.stats-table td {
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid #f5f5f5;
    color: #555;
}

.stats-table tbody tr {
    transition: background-color 0.2s ease;
}

.stats-table tbody tr:hover {
    background: #fafafa;
}

.stats-table tbody tr.match-row:nth-child(even) {
    background: white;
}

.match-info {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

/* ===== RECENT MATCHES LIST ===== */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-match-item {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 1.2rem;
    transition: all 0.2s ease;
    border-left: 4px solid #DC143C;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.recent-match-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.match-header {
    display: grid;
    grid-template-columns: 100px 80px 1fr;
    gap: 1.5rem;
    align-items: center;
    flex: 1;
}

.match-date {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

.match-season {
    font-size: 0.8rem;
    background: #e0e7ff;
    color: #1e40af;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

.match-title {
    font-size: 0.95rem;
    color: #333;
    font-weight: 600;
}

.match-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex-shrink: 0;
    justify-content: flex-end;
    min-width: 300px;
}

.stat-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.stat-block.batting {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.stat-block.bowling {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #b45309;
}

.stat-block.no-data {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #999;
}

.stat-icon {
    font-size: 1.2rem;
}

.stat-label {
    font-weight: 600;
    color: inherit;
}

.stat-value {
    font-weight: 700;
    font-size: 1rem;
}

.best-figures-card {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.08) 0%, rgba(0, 56, 147, 0.08) 100%);
    border: 2px solid #DC143C;
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
}

.figures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.figure-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #DC143C;
}

.figure-label {
    font-size: 0.9rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.figure-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #DC143C;
}

.fav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.fav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.fav-icon {
    font-size: 1rem;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.fav-icon.favorited {
    color: #ff4444;
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(255, 68, 68, 0.6));
}

.fav-count {
    font-size: 1.0rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .fav-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.9rem;
    }

    .fav-icon {
        font-size: 1rem;
    }
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    10%, 20% {
        transform: scale(1.2);
    }

    30% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .figures-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }

    .figure-item {
        padding: 0.75rem;
    }

    .figure-value {
        font-size: 1.2rem;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .match-stats {
        min-width: 250px;
    }

    .stat-block {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 1024px) {
    .recent-match-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .match-header {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        width: 100%;
    }

    .match-stats {
        width: 100%;
        justify-content: flex-start;
        min-width: unset;
    }

    .stat-block {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .recent-match-item {
        padding: 0.75rem;
        border-left: 3px solid #DC143C;
        flex-direction: column;
    }

    .match-date,
    .match-season,
    .match-title {
        font-size: 0.85rem;
    }

    .match-stats {
        gap: 0.5rem;
        width: 100%;
    }

    .stat-block {
        flex: 1;
        min-width: 140px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .stat-icon {
        font-size: 1rem;
    }

    .teams-section {
        margin-top: 1rem;
        gap: 0.75rem;
    }

    .teams-label {
        width: 100%;
        font-size: 0.9rem;
    }

    .teams-list {
        width: 100%;
        gap: 0.5rem;
    }

    .team-badge {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }

    .team-badge a {
        font-size: 0.9rem;
    }

    .season-tag {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .recent-list {
        gap: 0.75rem;
    }

    .recent-match-item {
        padding: 0.6rem;
        flex-direction: column;
    }

    .match-header {
        gap: 0.3rem;
        width: 100%;
    }

    .match-date,
    .match-season,
    .match-title {
        font-size: 0.75rem;
    }

    .match-stats {
        flex-direction: column;
        gap: 0.4rem;
        width: 100%;
    }

    .stat-block {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
        min-width: unset;
    }

    .stat-icon {
        font-size: 0.9rem;
    }

    .stat-label,
    .stat-value {
        font-size: 0.75rem;
    }

    .teams-section {
        flex-direction: column;
        gap: 0.5rem;
    }

    .teams-label {
        margin-bottom: 0.5rem;
    }

    .teams-list {
        gap: 0.5rem;
    }

    .team-badge {
        flex: 1;
        min-width: 150px;
        padding: 0.4rem 0.6rem;
    }

    .season-tag {
        white-space: nowrap;
    }
}