/* Tabs */

.player-tabs {
    width: 80%;
    margin: 10px auto 0;
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.player-tab-btn {
    position: relative;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Oswald';
    font-size: 15px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 12px 28px;
    cursor: pointer;
    transition: color 0.2s;
    outline: none;
}

.player-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #1a78ff, #3d9dff);
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px 2px 0 0;
}

.player-tab-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}

.player-tab-btn.active {
    color: white;
}

.player-tab-btn.active::after {
    transform: scaleX(1);
}

.player-tab-section {
    display: none;
    width: 100%;
}

.player-tab-section.active {
    display: block;
}

/* Loading */

.battles-loading {
    display: flex;
    justify-content: center;
    padding: 60px 0;
}

/* Placeholder vide */

.battles-placeholder {
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 20px;
    background-color: #0e131d;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    text-align: center;
}

.battles-placeholder-icon {
    width: 52px;
    height: 52px;
    opacity: 0.3;
}

.battles-placeholder-title {
    font-family: 'Oswald';
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
}

.battles-placeholder-sub {
    font-family: 'Roboto Condensed';
    font-size: 13px;
    color: rgba(255, 255, 255, 0.2);
    margin: 0;
}

/* Section matchs */

.review-search-battles {
    width: 80%;
    margin: 20px auto 40px;
    display: flex;
    flex-flow: column;
    gap: 8px;
}

/* Carte match */

.battle-item {
    display: flex;
    align-items: stretch;
    background-color: #0e131d;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    box-shadow: 0 0 0 1px black;
    overflow: hidden;
    transition: background-color 0.2s;
    position: relative;
}

.battle-item:hover {
    background-color: #141b28;
}

.battle-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.battle-item.victory::before {
    background: #00c853;
}

.battle-item.defeat::before {
    background: #ff1744;
}

.battle-item.draw::before {
    background: #ffd600;
}

/* Section gauche - bannière mode */

.battle-item-left {
    display: flex;
    align-items: center;
    padding: 14px 16px 14px 20px;
    min-width: 180px;
    flex-shrink: 0;
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.battle-item-left::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 2;
}

.battle-item-left-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 8, 15, 0.75) 0%, rgba(5, 8, 15, 0.92) 100%);
}

.battle-item-info {
    position: relative;
    z-index: 1;
    display: flex;
    flex-flow: column;
    gap: 2px;
}

.battle-item-mode {
    font-family: 'Oswald';
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.battle-item-map {
    font-family: 'Roboto Condensed';
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    margin: 0;
}

.battle-item-duration {
    font-family: 'Roboto Condensed';
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    margin: 0;
}

/* Section centre - équipes */

.battle-item-center {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 10px 16px;
    min-width: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.battle-teams {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
}

.battle-team {
    display: flex;
    gap: 6px;
    align-items: center;
}

.battle-team-player {
    opacity: 1;
}

.battle-team-enemy {
    opacity: 0.5;
}

.battle-teams-vs {
    font-family: 'Lilita One';
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.battle-team-member a {
    display: flex;
    flex-flow: column;
    align-items: center;
    gap: 3px;
    position: relative;
}

.battle-team-member-icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 6px;
    background-color: #003B72;
    box-shadow: 0 0 0 1px black;
}

.battle-team-member-highlight .battle-team-member-icon {
    box-shadow: 0 0 0 2px #FFCC01;
}

.battle-team-member-star .battle-team-member-icon {
    box-shadow: 0 0 0 2px #FFCC01;
}

.battle-team-member-name {
    font-family: 'Roboto Condensed';
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    text-transform: uppercase;
    max-width: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

.battle-team-member-star-icon {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 14px;
    height: 14px;
}

/* Section droite - brawler + résultat */

.battle-item-right {
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 16px;
    min-width: 110px;
    flex-shrink: 0;
}

.battle-item-brawler {
    display: flex;
    flex-flow: column;
    align-items: center;
    gap: 4px;
    position: relative;
}

.battle-item-brawler-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #003B72;
    box-shadow: 0 0 0 1px black;
}

.battle-item-brawler-name {
    font-family: 'Lilita One';
    font-size: 11px;
    text-transform: uppercase;
    text-shadow: 0 1px 0 #000;
    margin: 0;
    text-align: center;
}

.battle-item-star-icon {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
}

.battle-item-result {
    font-family: 'Oswald';
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 6px;
    margin: 0;
}

.battle-item-result.victory {
    color: #00e676;
    background-color: rgba(0, 200, 83, 0.12);
}

.battle-item-result.defeat {
    color: #ff5252;
    background-color: rgba(255, 23, 68, 0.12);
}

.battle-item-result.draw {
    color: #ffd600;
    background-color: rgba(255, 214, 0, 0.12);
}

.battle-item-trophies {
    font-family: 'Oswald';
    font-size: 14px;
    margin: 0;
}

.battle-item-trophies.positive {
    color: #00e676;
}

.battle-item-trophies.negative {
    color: #ff5252;
}

.battle-item-time {
    font-family: 'Roboto Condensed';
    font-size: 10px;
    color: rgba(255, 255, 255, 0.25);
    margin: 0;
}

/* Solo Showdown grid */

.battle-showdown-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.battle-member-info {
    display: flex;
    flex-flow: column;
    gap: 1px;
    min-width: 0;
}

.battle-member-stats {
    display: flex;
    gap: 4px;
    align-items: center;
}

.battle-member-power {
    font-family: 'Roboto Condensed';
    font-size: 9px;
    color: rgba(255, 200, 0, 0.8);
}

.battle-member-trophies {
    font-family: 'Roboto Condensed';
    font-size: 9px;
    color: rgba(255, 255, 255, 0.45);
}

/* Mobile */

@media only screen and (max-width: 1200px) {

    .player-tabs,
    .review-search-battles {
        width: 95%;
    }

    .player-tab-btn {
        font-size: 13px;
        padding: 10px 18px;
    }

    .battle-item {
        flex-flow: column;
        align-items: stretch;
    }

    .battle-item-left {
        min-width: unset;
        max-width: unset;
        width: 100%;
        padding: 10px 14px 10px 16px;
        flex-flow: row;
        justify-content: space-between;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        box-sizing: border-box;
    }

    .battle-item-left::after {
        display: none;
    }

    .battle-item-info {
        flex-flow: row;
        align-items: center;
        gap: 8px;
    }

    .battle-item-mode {
        font-size: 12px;
        letter-spacing: 0.5px;
    }

    .battle-item-map {
        font-size: 10px;
        color: rgba(255, 255, 255, 0.45);
    }

    .battle-item-map::before {
        content: '·';
        margin-right: 6px;
        color: rgba(255, 255, 255, 0.25);
    }

    .battle-item-duration {
        display: none;
    }

    .battle-item-center {
        width: 100%;
        padding: 10px 14px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        box-sizing: border-box;
        overflow: visible;
    }

    .battle-teams {
        flex-flow: row;
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .battle-team {
        flex: 1;
        flex-flow: column;
        gap: 6px;
        align-items: flex-start;
    }

    .battle-team-player {
        opacity: 1;
    }

    .battle-team-enemy {
        opacity: 0.6;
    }

    .battle-team[data-label]::before {
        content: attr(data-label);
        font-family: 'Oswald';
        font-size: 9px;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.35);
        margin-bottom: 2px;
    }

    .battle-teams-vs {
        align-self: center;
        padding: 0 8px;
        font-size: 10px;
    }

    .battle-team-member a {
        flex-flow: row;
        align-items: center;
        gap: 6px;
        width: 100%;
    }

    .battle-team-member-icon {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .battle-team-member-name {
        font-size: 10px;
        max-width: 90px;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: rgba(255, 255, 255, 0.7);
    }

    .battle-showdown-grid {
        flex-wrap: wrap;
        gap: 6px;
    }

    .battle-showdown-grid .battle-team-member a {
        flex-flow: column;
        width: auto;
        gap: 2px;
    }

    .battle-showdown-grid .battle-team-member-name {
        font-size: 8px;
        max-width: 36px;
        text-align: center;
    }

    .battle-item-right {
        flex-flow: row;
        min-width: unset;
        width: 100%;
        padding: 8px 14px;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        box-sizing: border-box;
    }

    .battle-item-brawler {
        flex-flow: row;
        gap: 8px;
        align-items: center;
    }

    .battle-item-brawler-img {
        width: 32px;
        height: 32px;
    }

    .battle-item-brawler-name {
        font-size: 11px;
    }

    .battle-item-result {
        font-size: 11px;
        padding: 3px 10px;
        margin-left: auto;
    }

    .battle-item-trophies {
        font-size: 12px;
    }

    .battle-item-time {
        font-size: 10px;
        margin-left: auto;
    }
}