
.stats-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    will-change: opacity;
}
.clickable-opponent-logo {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.clickable-opponent-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.clickable-opponent-logo:active {
    transform: scale(0.98);
}

.clickable-opponent-logo .team-logo-banner-wrapper {
    position: relative;
}

.clickable-opponent-logo:hover::after {
    content: "👆 Voir le profil";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

.stats-modal-overlay.modal-open {
    opacity: 1;
    pointer-events: all;
}

.stats-modal-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    max-width: min(1200px, 95vw);
    width: min(1200px, 95vw);
    min-width: 320px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    transform: scale(0.9) translateY(30px);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: modalEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

@keyframes modalEntrance {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
        filter: blur(1px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0px);
    }
}

.stats-modal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
            radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    animation: modalBackground 8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events: none;
    border-radius: var(--radius-xl);
    opacity: 0.5;
    will-change: opacity;
}

@keyframes modalBackground {
    0%, 100% { opacity: 0.3; transform: translate(0, 0); }
    50% { opacity: 0.6; transform: translate(-5px, -5px); }
}

.stats-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(15px);
    animation: headerSlideIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    height: 280px;
    overflow: hidden;
}

@keyframes headerSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stats-modal-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--karmine-gradient);
    animation: headerGlow 2s ease-in-out infinite alternate;
    will-change: box-shadow;
}

@keyframes headerGlow {
    0% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.3); }
    100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.8); }
}

.stats-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.stats-close-btn:hover {
    background: var(--accent-red);
    color: white;
    border-color: var(--accent-red);
    transform: scale(1.1) rotate(90deg);
}

.stats-modal-banner {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-red), var(--karmine-blue));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
    transition: box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    animation: bannerFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
    z-index: 1;
}

@keyframes bannerFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stats-modal-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.banner-gradient-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.7));
    opacity: 0.7;
    transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stats-modal-banner:hover {
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.stats-modal-banner:hover .stats-modal-image {
    opacity: 0.5;
}

.stats-modal-banner:hover .banner-gradient-overlay {
    opacity: 0.5;
}

.stats-banner-logos-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 3rem;
    z-index: 3;
}

.team-logo-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.team-logo-banner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.team-logo-banner .team-logo-header,
.team-logo-banner .fallback-logo-header {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.team-logo-banner .team-logo-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.team-name-banner {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    text-align: center;
    max-width: 120px;
    word-wrap: break-word;
}

.vs-banner-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.vs-banner-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: pulse-vs 2s ease-in-out infinite;
}

.vs-banner-text {
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.vs-banner-line {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 100%);
    z-index: -1;
}

.banner-game-info {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 3;
}

.banner-game, .banner-division {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes pulse-vs {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 35px rgba(0, 212, 255, 0.4);
    }
}

.team-logo-banner:hover .team-logo-header,
.team-logo-banner:hover .fallback-logo-header {
    transform: scale(1.1);
    border-color: #00d4ff;
    box-shadow: 0 12px 35px rgba(0, 212, 255, 0.4);
}

.stats-modal-content {
    padding: 1.5rem 2rem;
    animation: contentSlideIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

@keyframes contentSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stats-modal-info {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: teamsFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s forwards;
}

@keyframes teamsFadeIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.main-score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.team-score-detailed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    position: relative;
}

.team-score-detailed:hover {
    transform: translateY(-3px);
}

.team-score-detailed.winner {
    background: linear-gradient(135deg, rgba(212, 237, 218, 0.3), rgba(33, 136, 56, 0.1));
    border: 3px solid #28a745;
    border-radius: var(--radius-md);
    box-shadow: 0 0 25px rgba(40, 167, 69, 0.5);
    padding: 1rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: winnerPulse 2s ease-in-out infinite alternate;
}

.team-score-detailed.winner:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.7);
}

.team-score-detailed.winner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(40, 167, 69, 0.2), transparent);
    opacity: 0.5;
    z-index: -1;
}

@keyframes winnerPulse {
    0%, 100% { box-shadow: 0 0 25px rgba(40, 167, 69, 0.5); opacity: 1; }
    50% { box-shadow: 0 0 35px rgba(40, 167, 69, 0.8); opacity: 0.9; }
}

.winner-indicator {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.5rem;
    background: #28a745;
    border-radius: 50%;
    padding: 0.3rem;
    color: white;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.7);
    animation: trophyFloat 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes trophyFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(10deg); }
}

.team-score-number {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-primary);
}

.team-score-detailed.karmine .team-score-number {
    color: #22c55e;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.team-score-detailed.opponent .team-score-number {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.team-score-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.score-separator-detailed {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-secondary);
    margin: 0 1rem;
    animation: vsGlow 3s ease-in-out infinite alternate;
    will-change: color, text-shadow;
}

@keyframes vsGlow {
    0% { color: var(--text-muted); text-shadow: 0 0 10px rgba(0, 212, 255, 0.3); }
    100% { color: var(--karmine-blue); text-shadow: 0 0 20px rgba(0, 212, 255, 0.8); }
}

.winrate-display-main {
    display: flex;
    justify-content: center;
}

.winrate-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, box-shadow;
}

.winrate-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.winrate-badge:hover::after {
    transform: translateX(100%);
}

.winrate-badge:hover {
    transform: scale(1.05);
}

.winrate-badge.positive {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-color: #22c55e;
}

.winrate-badge.positive:hover {
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.winrate-badge.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: #ef4444;
}

.winrate-badge.negative:hover {
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.winrate-badge:not(.positive):not(.negative) {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    border-color: #a855f7;
}

.winrate-badge:not(.positive):not(.negative):hover {
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

.quick-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    animation: actionsFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}

@keyframes actionsFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.quick-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    will-change: transform, box-shadow;
    position: relative;
    overflow: hidden;
}

.quick-stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.quick-stat-card:hover::after {
    transform: translateX(100%);
}

.quick-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--karmine-blue);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2);
}

.stat-card-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.quick-stat-card:hover .stat-card-icon {
    transform: scale(1.1);
}

.stat-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.stat-card-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--karmine-blue);
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stats-section-card {
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, box-shadow;
}

.stats-section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.section-title-enhanced {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--karmine-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes textShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.section-icon-enhanced {
    font-size: 1.1rem;
}

.form-display-enhanced {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.form-result-enhanced {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, box-shadow;
    position: relative;
    overflow: hidden;
}

.form-result-enhanced:hover {
    transform: scale(1.1);
}

.form-result-enhanced.win {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.form-result-enhanced.win:hover {
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5);
}

.form-result-enhanced.loss {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.form-result-enhanced.loss:hover {
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

.form-result-enhanced.empty {
    background: var(--border-color);
    color: var(--text-secondary);
    box-shadow: none;
}

.form-result-text {
    font-size: 1.2rem;
    font-weight: 900;
}

.form-result-position {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    border: 2px solid white;
}

.form-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.legend-win, .legend-loss {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

.legend-win {
    background: #22c55e;
}

.legend-loss {
    background: #ef4444;
}

.legend-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    flex-basis: 100%;
}

.performance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.performance-column {
    background: var(--dark-tertiary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, box-shadow;
}

.performance-column:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.column-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
}

.stat-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.stat-row:hover {
    background: rgba(0, 212, 255, 0.05);
    border-radius: var(--radius-sm);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    flex-shrink: 0;
    margin-left: 1rem;
}

.stat-value.positive {
    color: #22c55e;
    text-shadow: 0 0 5px rgba(34, 197, 94, 0.3);
}

.stat-value.negative {
    color: #ef4444;
    text-shadow: 0 0 5px rgba(239, 68, 68, 0.3);
}

.matches-history-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.match-history-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--dark-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.46, 0.45, 0.94);
    align-items: center;
    overflow: hidden;
    backdrop-filter: blur(10px);
    will-change: transform, box-shadow;
    position: relative;
    cursor: pointer;
}

.match-history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.match-history-item.win {
    border-left: 4px solid #22c55e;
}

.match-history-item.win:hover {
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.2);
}

.match-history-item.loss {
    border-left: 4px solid #ef4444;
}

.match-history-item.loss:hover {
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.2);
}

.match-number-badge-enhanced {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--karmine-gradient);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.match-number-badge-enhanced:hover {
    transform: scale(1.1);
}

.match-info-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.match-date-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.match-date-main {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.match-date-relative {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

.match-game-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    overflow: hidden;
}

.match-game-name {
    font-weight: 600;
    color: var(--karmine-blue);
    font-size: 1rem;
    white-space: normal;
    max-width: 100%;
    line-height: 1.3;
}

.match-tournament-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--glass-bg);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    max-width: 180px;
    transition: all var(--transition-normal);
    line-height: 1.3;
}

.match-tournament-name:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--karmine-blue);
}

.match-result-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
    flex-shrink: 0;
}

.match-score-display {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.score-numbers {
    font-weight: 700;
    color: var(--text-primary);
}

.match-outcome-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, box-shadow;
}

.match-outcome-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.match-outcome-badge:hover::after {
    transform: translateX(100%);
}

.match-outcome-badge.win {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid #22c55e;
}

.match-outcome-badge.win:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.match-outcome-badge.loss {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.match-outcome-badge.loss:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.outcome-icon {
    font-size: 1rem;
}

.match-click-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--karmine-blue);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 212, 255, 0.3);
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.match-history-item:hover .match-click-hint {
    opacity: 1;
    transform: translateY(0);
}

.click-icon {
    font-size: 0.9rem;
}

.click-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.no-history {
    text-align: center;
    padding: 3rem;
    background: var(--glass-bg);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--border-color);
    backdrop-filter: blur(10px);
}

.no-history-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.no-history-icon {
    font-size: 4rem;
    opacity: 0.5;
    animation: noHistoryFloat 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes noHistoryFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.no-history h4 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.2rem;
}

.no-history p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

.stats-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    animation: actionsFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}

.action-btn {
    flex: 1;
    max-width: 200px;
    min-width: 150px;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.action-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.action-btn:hover::after {
    transform: translateX(100%);
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--accent-red), #dc2626);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.3);
}

.action-btn.primary:hover {
    box-shadow: 0 8px 30px rgba(255, 71, 87, 0.5);
    transform: translateY(-3px) scale(1.02);
}

.action-btn.secondary {
    background: transparent;
    color: var(--karmine-blue);
    border: 2px solid var(--karmine-blue);
}

.action-btn.secondary:hover {
    background: var(--karmine-gradient);
    color: white;
    border-color: var(--karmine-blue);
    transform: translateY(-3px) scale(1.02);
}

.btn-icon {
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    vertical-align: middle;
}

.stats-modal-card::-webkit-scrollbar {
    width: 8px;
}

.stats-modal-card::-webkit-scrollbar-track {
    background: var(--dark-secondary);
    border-radius: var(--radius-sm);
}

.stats-modal-card::-webkit-scrollbar-thumb {
    background: var(--karmine-blue);
    border-radius: var(--radius-sm);
}

.stats-modal-card::-webkit-scrollbar-thumb:hover {
    background: var(--karmine-light);
}

@media (max-width: 768px) {
    .stats-modal-card {
        width: 90vw;
        max-width: 420px;
        max-height: 85vh;
    }

    .stats-modal-header {
        height: 200px;
    }

    .stats-banner-logos-container {
        gap: 2rem;
        transform: translate(-50%, -60%);
    }

    .team-logo-banner .team-logo-header,
    .team-logo-banner .fallback-logo-header {
        width: 60px;
        height: 60px;
    }

    .vs-banner-circle {
        width: 45px;
        height: 45px;
    }

    .vs-banner-text {
        font-size: 1rem;
    }

    .vs-banner-line {
        width: 150px;
    }

    .team-name-banner {
        font-size: 0.9rem;
        max-width: 100px;
    }

    .banner-game-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .main-score-display {
        flex-direction: column;
        gap: 1.5rem;
    }

    .score-separator-detailed {
        margin: 1rem 0;
        font-size: 1.25rem;
    }

    .quick-stats-cards {
        grid-template-columns: 1fr;
    }

    .performance-grid {
        grid-template-columns: 1fr;
    }

    .stats-modal-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .stats-modal-header,
    .stats-modal-content {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .match-history-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    .match-result-info {
        align-items: center;
    }

    .match-click-hint {
        position: static;
        opacity: 1;
        transform: none;
        margin-top: 0.5rem;
        background: rgba(0, 212, 255, 0.2);
        color: var(--karmine-blue);
        border: 1px solid var(--karmine-blue);
    }
}

@media (max-width: 480px) {
    .stats-modal-card {
        width: 95vw;
        max-width: 360px;
    }

    .stats-modal-header {
        height: 150px;
    }

    .stats-banner-logos-container {
        gap: 1.5rem;
    }

    .team-logo-banner .team-logo-header,
    .team-logo-banner .fallback-logo-header {
        width: 50px;
        height: 50px;
    }

    .vs-banner-circle {
        width: 40px;
        height: 40px;
    }

    .vs-banner-line {
        width: 120px;
    }

    .team-score-number {
        font-size: 2rem;
    }

    .stats-section-card {
        padding: 1.5rem;
    }

    .quick-stat-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .form-result-enhanced {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .match-number-badge-enhanced {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }

    .match-history-item {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.15s !important;
    }

    .stats-modal-card,
    .winrate-badge,
    .quick-stat-card:hover,
    .form-result-enhanced:hover,
    .match-history-item:hover {
        animation: none;
        transform: none !important;
    }
}

.stats-modal-card:focus-within,
.stats-close-btn:focus {
    outline: 3px solid var(--karmine-blue);
    outline-offset: 3px;
}

.stats-modal-card,
.winrate-badge,
.quick-stat-card {
    transform: translateZ(0);
    backface-visibility: hidden;
}

@media (prefers-color-scheme: dark) {
    .stats-modal-card {
        background: rgba(26, 35, 50, 0.95);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    }

    .stats-modal-header {
        background: rgba(26, 35, 50, 0.85);
    }
}
