/* ==========================================================================
   BracketFlow — Players Directory Styles
   ========================================================================== */

/* SCROLLABLE BODY */
body {
    overflow-y: auto !important;
    height: auto !important;
}

.mirror-container {
    height: auto !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 50px;
}

/* NAVIGATION TABS */
.navigation-row {
    max-width: 1350px;
    margin: 0 auto 20px auto;
    width: 100%;
    display: flex;
    gap: 12px;
    padding: 0 20px 6px 20px;
    box-sizing: border-box;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(197, 168, 128, 0.5) rgba(255, 255, 255, 0.05);
}

.navigation-row::-webkit-scrollbar {
    height: 4px;
}

.navigation-row::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.navigation-row::-webkit-scrollbar-thumb {
    background: rgba(197, 168, 128, 0.4);
    border-radius: 4px;
}

.navigation-row::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.nav-tab {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    text-decoration: none;
    padding: 10px 18px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    flex-shrink: 0;
    display: inline-block;
}

@media (max-width: 768px) {
    .navigation-row {
        gap: 8px;
        margin-bottom: 15px;
        padding: 0 10px 6px 10px;
    }
    .nav-tab {
        padding: 8px 14px;
        font-size: 0.72rem;
        letter-spacing: 1px;
    }
}

.nav-tab:hover {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}
.nav-tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

/* PREMIUM GAME FILTER CHIPS */
.game-filter-container {
    margin-top: 5px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 1350px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.section-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.game-chips-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .game-filter-container {
        padding: 0 10px;
    }
    .game-chips-list {
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .game-chip {
        flex-shrink: 0;
    }
}

.game-chip {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}
.game-chip:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
}
.game-chip.active {
    color: var(--accent) !important;
    transform: translateY(-1px);
    border-color: var(--accent) !important;
    background: rgba(197, 168, 128, 0.12) !important;
    font-weight: 800;
}
.game-chip-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.game-chip-icon-emoji {
    font-size: 1.1rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
}
.game-chip:hover .game-chip-icon-img,
.game-chip.active .game-chip-icon-img,
.game-chip:hover .game-chip-icon-emoji,
.game-chip.active .game-chip-icon-emoji {
    transform: scale(1.2);
}

/* SEARCH CONTAINER & FILTERS */
.search-container {
    max-width: 1350px;
    margin: 0 auto 25px auto;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .search-container {
        padding: 0 10px;
        gap: 12px;
    }
    .search-box {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }
    .filter-group {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }
}

.search-box {
    position: relative;
    flex: 2;
    min-width: 240px;
}
.search-box input {
    width: 100%;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 20px 12px 45px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    box-sizing: border-box;
}
.search-box input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(20, 20, 22, 0.95);
}
.search-box .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.3s ease;
}
.search-box input:focus + .search-icon {
    color: var(--accent-blue);
}

.filter-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.filter-group label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.filter-group select {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 11px 15px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 35px;
    box-sizing: border-box;
    width: 100%;
}
.filter-group select:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(20, 20, 22, 0.95);
}

/* LEADERBOARD PLAYERS GRID */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    padding: 0 20px;
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .players-grid {
        padding: 0 10px;
        gap: 14px;
    }
}

/* HOLOGRAPHIC PLAYER CARD */
.player-card {
    position: relative;
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: white;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
}
.player-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.02);
}

/* Rank Badge */
.rank-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    background: rgba(255,255,255,0.05);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}

.player-multi-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    color: #c5a880;
    background: rgba(197, 168, 128, 0.1);
    border: 1px solid rgba(197, 168, 128, 0.25);
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.player-card:nth-child(1) .rank-badge {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.2);
}
.player-card:nth-child(2) .rank-badge {
    color: #c0c0c0;
    background: rgba(192, 192, 192, 0.1);
    border-color: rgba(192, 192, 192, 0.2);
}
.player-card:nth-child(3) .rank-badge {
    color: #cd7f32;
    background: rgba(205, 127, 50, 0.1);
    border-color: rgba(205, 127, 50, 0.2);
}

/* Game Badge */
.game-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 2;
}

/* Game Box Art Background Stamp */
.card-game-boxart {
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 100%;
    background-size: cover;
    background-position: left center;
    opacity: 0.2;
    filter: grayscale(0.2) contrast(1.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 1;
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 15%, rgba(0, 0, 0, 0) 90%);
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 15%, rgba(0, 0, 0, 0) 90%);
}
.player-card:hover .card-game-boxart {
    opacity: 0.4;
}

/* Profile Block */
.profile-block {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 12px;
    position: relative;
    z-index: 2;
}
.avatar-circle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: radial-gradient(circle, #1a1a24 0%, #0d0d12 100%);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    overflow: hidden;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.player-card:hover .avatar-circle {
    border-color: rgba(255, 255, 255, 0.25);
}
.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.name-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: calc(100% - 80px);
}
.player-tag {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}
.player-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
}

/* Stats Blocks */
.stats-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 5px;
    position: relative;
    z-index: 2;
}
.stats-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-dim);
}
.win-rate-text {
    font-weight: 700;
    color: white;
}
.power-score-text {
    font-weight: 700;
    color: var(--accent-blue);
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #8c7355, var(--accent-blue));
    border-radius: 4px;
}

/* Main Character Badge */
.main-char-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 500;
    margin-top: auto;
    position: relative;
    z-index: 2;
}
.main-char-badge img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* LOADING SPINNER */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    padding: 60px 0;
    gap: 15px;
    color: var(--text-dim);
    font-size: 1rem;
    font-weight: 600;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-dim);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

/* PREMIUM AMBIENT CHARACTER BACKGROUND */
.card-char-bg {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 150px;
    height: 150px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
    opacity: 0.25;
    filter: grayscale(0.2) blur(0.3px);
    transform: rotate(5deg);
    z-index: 1;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.player-card:hover .card-char-bg {
    opacity: 0.35;
    transform: scale(1.15) rotate(10deg);
}

/* DUAL TAG TEAM CHARACTER BACKGROUNDS (2XKO & Tag Fighters) */
.card-char-bg.card-char-bg-tag-front {
    right: -10px;
    bottom: -20px;
    width: 145px;
    height: 145px;
    transform: rotate(8deg);
    background-position: bottom right;
    opacity: 0.35;
    z-index: 2;
    filter: contrast(1.1);
}
.card-char-bg.card-char-bg-tag-back {
    right: 70px;
    bottom: -15px;
    width: 130px;
    height: 130px;
    transform: rotate(-8deg);
    background-position: bottom right;
    opacity: 0.28;
    z-index: 1;
    filter: contrast(1.05) brightness(0.95);
}
.player-card:hover .card-char-bg.card-char-bg-tag-front {
    opacity: 0.48;
    transform: scale(1.12) translateX(8px) rotate(12deg);
}
.player-card:hover .card-char-bg.card-char-bg-tag-back {
    opacity: 0.40;
    transform: scale(1.12) translateX(-8px) rotate(-12deg);
}

/* TRIO TAG TEAM CHARACTER BACKGROUNDS (Dragon Ball FighterZ 3v3) */
.card-char-bg.card-char-bg-trio-1 {
    right: -10px;
    bottom: -20px;
    width: 135px;
    height: 135px;
    transform: rotate(10deg);
    background-position: bottom right;
    opacity: 0.35;
    z-index: 3;
    filter: contrast(1.1);
}
.card-char-bg.card-char-bg-trio-2 {
    right: 55px;
    bottom: -15px;
    width: 125px;
    height: 125px;
    transform: rotate(-2deg);
    background-position: bottom right;
    opacity: 0.26;
    z-index: 2;
    filter: contrast(1.05) brightness(0.95);
}
.card-char-bg.card-char-bg-trio-3 {
    right: 115px;
    bottom: -10px;
    width: 115px;
    height: 115px;
    transform: rotate(-12deg);
    background-position: bottom right;
    opacity: 0.20;
    z-index: 1;
    filter: contrast(1.02) brightness(0.9);
}
.player-card:hover .card-char-bg.card-char-bg-trio-1 {
    opacity: 0.48;
    transform: scale(1.12) translateX(10px) rotate(14deg);
}
.player-card:hover .card-char-bg.card-char-bg-trio-2 {
    opacity: 0.38;
    transform: scale(1.12) rotate(-4deg);
}
.player-card:hover .card-char-bg.card-char-bg-trio-3 {
    opacity: 0.30;
    transform: scale(1.12) translateX(-10px) rotate(-16deg);
}

/* TAG TEAM BADGE STYLES */
.tag-team-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 70, 85, 0.1);
    border: 1px solid rgba(255, 70, 85, 0.25);
    padding: 4px 10px;
    border-radius: 30px;
}
.tag-icons-group {
    display: flex;
    align-items: center;
}
.tag-icons-group img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #141418;
    object-fit: cover;
    background: rgba(255,255,255,0.05);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
}
.tag-icons-group img:not(:first-child) {
    margin-left: -7px;
}
