/* Estilos mejorados para el perfil de jugador */
.player-profile-container {
    background: linear-gradient(135deg, var(--color-light) 0%, var(--color-border) 100%);
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.player-card {
    background: var(--color-background);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--color-border);
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.player-photo-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 2rem;
    text-align: center;
    color: white;
    position: relative;
}

.player-photo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.player-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.player-photo:hover {
    transform: scale(1.05);
}

.player-name {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.club-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(var(--color-background-rgb, 255, 255, 255), 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    margin-top: 1rem;
    position: relative;
    z-index: 2;
}

.club-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-background);
    padding: 2px;
    object-fit: cover;
}

.info-section {
    padding: 2rem;
}

.info-card {
    background: linear-gradient(135deg, var(--color-light), var(--color-background));
    border: 1px solid var(--color-border);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
}

.transfer-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    text-align: center;
    flex-wrap: wrap;
}

.transfer-club {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    text-decoration: none;
    transition: opacity 0.2s ease, color 0.2s ease;
}

a.transfer-club:hover {
    text-decoration: underline;
    opacity: 1;
}

.transfer-club.previous {
    color: var(--color-text);
    opacity: 0.7;
}

.transfer-club.current {
    color: var(--color-primary);
}

.transfer-arrow {
    color: var(--color-primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.transfer-date {
    font-weight: 500;
    opacity: 0.85;
}

.info-card-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    font-weight: 600;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.2s ease;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item:hover {
    background-color: var(--color-light);
    border-radius: 8px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 1rem;
    font-size: 1.1rem;
}

.info-content {
    flex: 1;
}

.info-field {
    padding: 0.75rem;
    background: var(--color-background);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0.25rem;
}

.info-field:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

.info-label {
    font-weight: 600;
    color: var(--color-text);
    opacity: 0.8;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.info-label i {
    background: var(--color-primary);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-right: 0.75rem;
}

.info-value {
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    margin-top: auto;
}

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

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--color-background);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--stat-color, var(--color-primary));
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--stat-color, var(--color-primary));
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text);
    opacity: 0.7;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item.goals {
    --stat-color: var(--color-success);
}

.stat-item.matches {
    --stat-color: var(--color-info);
}

.stat-item.yellow-cards {
    --stat-color: var(--color-warning);
}

.stat-item.red-cards {
    --stat-color: var(--color-danger);
}

.history-table {
    background: var(--color-background);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-border);
}

.history-table .table {
    margin-bottom: 0;
}

.history-table .table thead th {
    background: linear-gradient(135deg, var(--color-dark), var(--color-text));
    color: white;
    border: none;
    padding: 1rem;
    font-weight: 600;
}

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

.history-table .table tbody tr:hover {
    background-color: var(--color-light);
}

.history-table .table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: var(--color-border);
    color: var(--color-text);
}

.match-score {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.score-badge {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-modern {
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--color-text);
    opacity: 0.7;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .header-back-btn {
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
    }
    
    .player-card {
        margin: 1rem;
    }
    
    .player-photo-section {
        padding: 1.5rem;
    }
    
    .player-photo {
        width: 150px;
        height: 150px;
    }
    
    .player-name {
        font-size: 1.8rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .info-section {
        padding: 1rem;
    }
}

/* Pantallas muy pequeñas (phones estrechos) */
@media (max-width: 480px) {
    .player-card {
        margin: 0;
        border-radius: 14px;
    }
    
    .player-photo-section {
        padding: 1.25rem;
    }
    
    .player-photo {
        width: 120px;
        height: 120px;
        border-width: 4px;
    }
    
    .player-name {
        font-size: 1.5rem;
    }
    
    .club-info {
        flex-wrap: wrap;
        padding: 0.4rem 0.75rem;
        font-size: 0.95rem;
    }
    
    .info-section {
        padding: 0.75rem;
    }
    
    .info-card-header {
        padding: 0.75rem 1rem;
    }
    
    .info-card-header h5 {
        font-size: 1rem;
    }
    
    .card-body[style*="padding"] {
        padding: 1rem !important;
    }
    
    .info-field {
        padding: 0.6rem;
        margin: 0;
    }
    
    .info-label {
        font-size: 0.85rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .stat-item {
        padding: 1rem 0.5rem;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .matches-timeline {
        padding: 0.75rem;
        max-height: 480px;
    }
    
    .match-history-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .match-date-badge {
        min-width: 64px;
        padding: 0.5rem 0.6rem;
    }
    
    .date-day {
        font-size: 1.2rem;
    }
    
    .date-month {
        font-size: 0.6rem;
    }
    
    .date-year {
        font-size: 0.7rem;
    }
    
    .match-teams {
        padding: 0.75rem 0.5rem;
        gap: 0.5rem;
    }
    
    .team-name {
        font-size: 0.8rem;
        overflow-wrap: anywhere;
        word-break: break-word;
        flex: 1;
        text-align: center;
    }
    
    .team-info {
        gap: 0.4rem;
    }
    
    .team-score {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
        border-width: 2px;
        flex-shrink: 0;
    }
    
    .vs-separator {
        margin: 0 0.5rem;
    }
    
    .perf-stat {
        padding: 0.5rem;
        gap: 0.35rem;
    }
    
    .perf-stat-icon {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }
    
    .perf-stat-value {
        font-size: 1.05rem;
    }
    
    .result-badge {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 0.75rem;
    }
    
    .condition-badge {
        font-size: 0.75rem;
    }
    
    .back-button {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1.5rem;
    }
}

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

.player-card {
    animation: fadeInUp 0.6s ease-out;
}

.stat-item {
    animation: fadeInUp 0.6s ease-out;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

/* Estilos mejorados para el botón Volver */
.back-button-section {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.back-button {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.back-button:hover::before {
    left: 100%;
}

.back-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}

.back-button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.back-button i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.back-button:hover i {
    transform: translateX(-3px);
}

/* Estilos para el historial de partidos mejorado */
.matches-timeline {
    padding: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) transparent;
}

.matches-timeline::-webkit-scrollbar {
    width: 6px;
}

.matches-timeline::-webkit-scrollbar-track {
    background: transparent;
}

.matches-timeline::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 3px;
}

.match-history-card {
    background: linear-gradient(135deg, var(--color-background), var(--color-light));
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.match-history-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.match-history-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--color-primary);
}

.match-history-card:hover::before {
    transform: scaleX(1);
}

.match-date-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: 0.75rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    min-width: 80px;
}

.date-day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.date-month {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.9;
}

.date-year {
    font-size: 0.8rem;
    opacity: 0.8;
}

.match-details {
    margin-bottom: 1.5rem;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(var(--color-background-rgb, 255, 255, 255), 0.7);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.team-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.team-info.player-team {
    font-weight: 600;
    color: var(--color-primary);
}

.team-name {
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.2;
}

.team-score {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    background: linear-gradient(135deg, var(--color-light), var(--color-surface));
    border: 2px solid var(--color-border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vs-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 1rem;
    font-weight: 700;
    color: var(--color-text);
    opacity: 0.6;
    font-size: 0.8rem;
}

.match-condition {
    text-align: center;
}

.condition-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.condition-badge.local {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    color: white;
    box-shadow: 0 2px 8px rgba(49, 130, 206, 0.3);
}

.condition-badge.visitante {
    background: linear-gradient(135deg, #38a169, #2f855a);
    color: white;
    box-shadow: 0 2px 8px rgba(56, 161, 105, 0.3);
}

.player-performance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.performance-stats {
    display: flex;
    gap: 1.5rem;
    flex: 1;
}

.perf-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(var(--color-background-rgb, 255, 255, 255), 0.8);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

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

.perf-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.goals-stat .perf-stat-icon {
    background: linear-gradient(135deg, #f6ad55, #ed8936);
}

.cards-stat .perf-stat-icon {
    background: linear-gradient(135deg, #9f7aea, #805ad5);
}

.perf-stat-info {
    display: flex;
    flex-direction: column;
}

.perf-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.perf-stat-label {
    font-size: 0.75rem;
    color: var(--color-text);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cards-display {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.card-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

.yellow-card {
    background: rgba(255, 193, 7, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.red-card {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.no-cards {
    font-size: 0.75rem;
    color: var(--color-text);
    opacity: 0.6;
    font-style: italic;
}

.match-result-indicator {
    flex-shrink: 0;
}

.result-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-badge.win {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.result-badge.loss {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.result-badge.draw {
    background: linear-gradient(135deg, #a0aec0, #718096);
    color: white;
}

.result-badge i {
    font-size: 1rem;
}

/* Responsive para historial */
@media (max-width: 768px) {
    .match-history-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .match-date-badge {
        position: static;
        margin-bottom: 1rem;
        align-self: flex-start;
    }
    
    .match-teams {
        flex-direction: column;
        gap: 1rem;
    }
    
    .team-info {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .vs-separator {
        order: -1;
        margin: 0;
    }
    
    .player-performance {
        flex-direction: column;
        gap: 1rem;
    }
    
    .performance-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .perf-stat {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        flex: 1;
    }
    
    .matches-timeline {
        padding: 1rem;
        max-height: 500px;
    }
}

/* Animaciones para el historial */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.match-history-card {
    animation: slideInUp 0.6s ease-out;
}

.match-history-card:nth-child(1) { animation-delay: 0.1s; }
.match-history-card:nth-child(2) { animation-delay: 0.2s; }
.match-history-card:nth-child(3) { animation-delay: 0.3s; }
.match-history-card:nth-child(4) { animation-delay: 0.4s; }
.match-history-card:nth-child(5) { animation-delay: 0.5s; }

/* Reducir movimiento para usuarios con preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .player-card,
    .stat-item,
    .match-history-card {
        animation: none !important;
        transition: none !important;
    }
}

/* Historial de partidos: fechas como badges interactivos que abren un modal */
.history-badge-hint {
    margin: 0;
    padding: 0.75rem 1.5rem 0;
    font-size: 0.8rem;
    color: var(--color-text);
    opacity: 0.6;
}

.matches-timeline--badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    max-height: none;
    overflow: visible;
}

.history-badge-btn {
    position: relative;
    top: auto;
    right: auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    font-family: inherit;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    min-width: 80px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.history-badge-btn:hover,
.history-badge-btn:focus {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1);
}

.history-badge-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.history-badge-btn:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* Modal de detalle del partido */
#historialModal .modal-dialog {
    max-width: 560px;
}

#historialModal .modal-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border: none;
}

#historialModal .modal-body {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--color-light), var(--color-background));
}

#historialModal .match-history-card {
    margin-bottom: 0;
    cursor: default;
    animation: none;
}

#historialModal .match-history-card:hover {
    transform: none;
    box-shadow: none;
}

/* Distribución del contenido dentro del modal */
#historialModal .match-history-card--modal {
    padding: 1.25rem;
}

#historialModal .match-details {
    margin-bottom: 1rem;
}

#historialModal .match-teams {
    margin-bottom: 0.75rem;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
}

#historialModal .team-name {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4em;
    font-size: 0.95rem;
    font-weight: 600;
}

#historialModal .match-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#historialModal .result-badge {
    border-radius: 12px;
}

#historialModal .player-performance {
    display: block;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

#historialModal .performance-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

#historialModal .perf-stat {
    justify-content: center;
    padding: 0.85rem;
}

@media (max-width: 575.98px) {
    #historialModal .match-meta {
        justify-content: center;
    }

    #historialModal .performance-stats {
        grid-template-columns: 1fr;
    }
}