/* ============================================================
   characters.css — BracketFlow Character Meta Analysis
   Extracted from characters.html
   ============================================================ */

/* 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;
}

/* PREMIUM GAME FILTER CHIPS */
.game-filter-container {
    margin-top: 5px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 1350px;
    margin-left: auto;
    margin-right: auto;
    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: 1px;
}
.game-chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@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: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.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:hover .game-chip-icon-img,
.game-chip.active .game-chip-icon-img {
    transform: scale(1.2);
}
.game-chip:hover {
    background: #171922;
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-1px);
}
.game-chip.active {
    background: #1e222d;
    border-color: var(--accent);
    color: #ffffff;
}
.game-chip.disabled {
    opacity: 0.35;
    cursor: not-allowed !important;
    filter: grayscale(1);
    border-color: rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
    color: rgba(255, 255, 255, 0.25);
    pointer-events: auto;
}
.game-chip.disabled:hover {
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.08);
    transform: none;
}
.game-chip.disabled .game-chip-icon-img {
    transform: none !important;
}

/* SEARCH CONTAINER & FILTERS */
.search-container {
    max-width: 1350px;
    margin: 0 auto 30px 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;
        margin-bottom: 20px;
    }
    .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(10, 10, 11, 0.98);
}
.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: row;
    align-items: center;
    gap: 12px;
}
.filter-group label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.char-mini-confidence {
    position: absolute;
    right: -15px;
}

.filter-group select {
    flex-grow: 1;
    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: 16px;
    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%, 300px), 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;
    }
}

/* PREMIUM COMPACT CHARACTER CARD */
.character-card {
    position: relative;
    background: #0f1118;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: white;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    display: flex;
    gap: 14px;
    align-items: center;
    min-height: 112px;
    box-sizing: border-box;
    cursor: pointer;
}
.character-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    background: #141722;
}
.character-card .card-char-bg {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 120px;
    height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.05;
    filter: grayscale(0.2) blur(0.5px);
    z-index: 1;
    pointer-events: none;
    transition: all 0.4s ease;
}
.character-card:hover .card-char-bg {
    opacity: 0.12;
    transform: scale(1.08);
}
.character-card .avatar-wrapper {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 8px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 2;
    overflow: visible;
}
.character-card:hover .avatar-wrapper {
    border-color: transparent;
}
.character-card .avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
    transition: transform 0.3s ease;
}
.character-card:hover .avatar-wrapper img {
    transform: scale(1.08);
}
.character-card .char-rank-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    text-transform: uppercase;
}
.char-rank-badge.s-tier { color: #ffcc00; border: 1px solid rgba(255, 204, 0, 0.35); background: #151100; }
.char-rank-badge.a-tier { color: #00ffcc; border: 1px solid rgba(0, 255, 204, 0.35); background: #001510; }
.char-rank-badge.b-tier { color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.35); background: #000c1e; }
.char-rank-badge.c-tier { color: #fb923c; border: 1px solid rgba(251, 146, 60, 0.35); background: #1e0e00; }
.char-rank-badge.d-tier { color: #f43f5e; border: 1px solid rgba(244, 63, 94, 0.35); background: #1e0009; }
.char-rank-badge.no-tier { color: #888; border: 1px solid rgba(136, 136, 136, 0.2); background: #111; }
.player-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
}

/* Stats Grid Inside Card */
.char-info-block {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
    overflow: hidden;
}
.char-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.char-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.char-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: 6px;
    align-items: flex-end;
}
.stat-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}
.stat-col.primary {
    align-items: flex-end;
    text-align: right;
}
.stat-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    opacity: 0.8;
    white-space: nowrap;
}
.stat-col.primary .stat-label {
    color: #c5a880;
    opacity: 0.95;
}
.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}
.stat-value.winrate.positive {
    color: #10b981;
}
.stat-value.primary-value {
    color: #c5a880;
    font-weight: 800;
}
.card-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}
.card-progress-fill {
    height: 100%;
    background: #c5a880;
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Subtle clean badges without emojis */
.data-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.data-badge.low {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.data-badge.insufficient {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.pick-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.pick-badge.elite {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.pick-badge.pro {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.pick-badge.popular {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.matchups-section {
    margin-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 12px;
    position: relative;
    z-index: 2;
}
.matchups-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
    margin-bottom: 8px;
}
.matchup-pill {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}
.matchup-pill.best {
    background: rgba(0, 255, 128, 0.1);
    color: #00ff80;
    border: 1px solid rgba(0, 255, 128, 0.2);
}
.matchup-pill.worst {
    background: rgba(255, 64, 64, 0.1);
    color: #ff4040;
    border: 1px solid rgba(255, 64, 64, 0.2);
}

/* 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: 16px;
}
.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;
}

/* CLASSIC TIER LIST CONTAINER */
.tier-list-container {
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 20px;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .tier-list-container {
        padding: 0 10px;
        gap: 12px;
    }
}

.tier-row {
    display: flex;
    background: rgba(20, 20, 28, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s ease;
}
.tier-row:hover {
    border-color: rgba(255, 255, 255, 0.2);
}
.tier-label {
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: #0b0c0e;
    flex-shrink: 0;
    box-shadow: 5px 0 15px rgba(0,0,0,0.3);
    z-index: 2;
}

@media (max-width: 600px) {
    .tier-label {
        width: 50px;
        font-size: 1.3rem;
    }
}

.tier-label.s-tier { background: #ffcc00; color: #0b0c0e; }
.tier-label.a-tier { background: #38bdf8; color: #0b0c0e; }
.tier-label.b-tier { background: #3b82f6; color: #ffffff; }
.tier-label.c-tier { background: #f97316; color: #ffffff; }
.tier-label.d-tier { background: #ef4444; color: #ffffff; }

.tier-chars {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    flex-grow: 1;
    align-items: center;
}

@media (max-width: 600px) {
    .tier-chars {
        gap: 8px;
        padding: 10px 8px;
    }
}

.char-icon-box {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 10px;
    background: radial-gradient(circle, #2a2a36 0%, #15151c 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

@media (max-width: 600px) {
    .char-icon-box {
        width: 52px;
        height: 52px;
        border-radius: 8px;
    }
    .char-mini-stat {
        font-size: 11px !important;
        padding: 1px 4px !important;
        bottom: -4px !important;
    }
}
.char-icon-box:hover {
    transform: translateY(-5px) scale(1.08);
    border-color: rgba(255, 255, 255, 0.35);
    z-index: 10;
}
.char-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.char-mini-stat {
    position: absolute;
    bottom: -6px;
    background: #0b0c0e;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--accent);
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    pointer-events: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: all 0.2s ease;
}
.char-icon-box:hover .char-mini-stat {
    background: #14161a;
    color: var(--text-main);
    border-color: var(--accent);
}

/* CUSTOM HOVER TOOLTIP CARD */
.char-tooltip {
    position: absolute;
    width: min(320px, 90vw);
    max-width: 90vw;
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 0;
    box-sizing: border-box;
}
.char-tooltip.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* COLLAPSIBLE EXPLANATION PANEL */
.info-panel {
    max-width: 1350px;
    margin: 0 auto 20px auto;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .info-panel {
        padding: 0 10px;
    }
}
.info-card {
    background: rgba(20, 20, 28, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.info-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}
.info-header {
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.info-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-blue);
    letter-spacing: 0.5px;
}
.info-arrow {
    font-size: 12px;
    color: var(--text-dim);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.info-content {
    display: none;
    padding: 0 20px;
}
.info-card.expanded .info-content {
    display: block;
    padding: 0 20px 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.info-card.expanded .info-arrow {
    transform: rotate(180deg);
    color: white;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}
.info-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.info-col-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}
.info-col-desc {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* Pick Badge Styles (tooltip / tooltip-card context) */
.pick-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    width: fit-content;
}
.pick-badge.elite {
    background: #ef4444;
    color: #ffffff;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.pick-badge.pro {
    background: #f59e0b;
    color: #0b0c0e;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.pick-badge.popular {
    background: #0ea5e9;
    color: #0b0c0e;
    border: 1px solid rgba(14, 165, 233, 0.4);
}

/* ==========================================================================
   CHARACTER DETAILS & TIMELINE MODAL — PREMIER ESPORTS REDESIGN
   ========================================================================== */
.char-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    background: rgba(4, 5, 8, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.char-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.char-modal-card {
    background: #11121a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    width: 100%;
    max-width: 780px;
    padding: 26px 28px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85);
    position: relative;
    transform: scale(0.96) translateY(12px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.char-modal-backdrop.active .char-modal-card {
    transform: scale(1) translateY(0);
}

.char-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

.char-modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.char-modal-close:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* Modal Header */
.char-modal-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    z-index: 1;
}

.char-modal-hero-bg {
    position: absolute;
    right: 10px;
    top: -20px;
    width: 320px;
    height: 160px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right center;
    opacity: 0.08;
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.char-modal-avatar-box {
    width: 76px;
    height: 76px;
    border-radius: 16px;
    background: #181924;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.char-modal-avatar-box img {
    width: 88%;
    height: 88%;
    object-fit: contain;
}

.char-modal-title-info {
    flex-grow: 1;
    min-width: 0;
}

.char-modal-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.char-modal-tier {
    font-size: 11px;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-family: 'Outfit', sans-serif;
}

.char-modal-tier.s-tier {
    background: rgba(255, 204, 0, 0.18);
    color: #ffcc00;
    border: 1px solid rgba(255, 204, 0, 0.45);
}

.char-modal-tier.a-tier {
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.char-modal-tier.b-tier {
    background: rgba(59, 130, 246, 0.16);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.char-modal-tier.c-tier {
    background: rgba(249, 115, 22, 0.16);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.4);
}

.char-modal-tier.d-tier {
    background: rgba(239, 68, 68, 0.16);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.char-modal-tier.no-tier {
    background: rgba(148, 163, 184, 0.14);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.char-modal-score {
    font-size: 11px;
    font-weight: 800;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.3px;
}

.char-modal-conf-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}

.char-modal-name {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.4px;
    margin: 2px 0;
    line-height: 1.2;
}

.char-modal-game {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 600;
    margin: 0;
}

/* KPI Metric Grid */
.char-modal-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

@media (max-width: 700px) {
    .char-modal-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.modal-kpi-card {
    background: #141520;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 13px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    transition: transform 0.2s, border-color 0.2s;
}

.modal-kpi-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.kpi-card-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
}

.kpi-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.kpi-val {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}

.kpi-val.winrate-val {
    color: #34d399;
}

.kpi-bar-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 99px;
    overflow: hidden;
}

.kpi-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.kpi-bar-fill.ceiling { background: #38bdf8; }
.kpi-bar-fill.carry { background: #a855f7; }
.kpi-bar-fill.winrate { background: #10b981; }
.kpi-bar-fill.pick { background: #c5a880; }

.kpi-desc {
    font-size: 10.5px;
    color: #64748b;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Matchups & Intel Grid */
.char-modal-intel-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

@media (max-width: 700px) {
    .char-modal-intel-grid {
        grid-template-columns: 1fr;
    }
}

.modal-intel-box {
    background: #11121c;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 13px 15px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.intel-box-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.intel-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-height: 26px;
}

.intel-player-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.3px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.intel-player-pill:hover {
    background: rgba(197, 168, 128, 0.15);
    border-color: rgba(197, 168, 128, 0.45);
    color: #ffffff;
    transform: translateY(-1px);
}

.intel-matchup-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    font-family: 'Outfit', sans-serif;
}

.intel-matchup-pill.best {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.intel-matchup-pill.worst {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.28);
}

.intel-matchups-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.intel-sublabel {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    display: block;
    margin-bottom: 4px;
}

.intel-sublabel.best { color: #34d399; }
.intel-sublabel.worst { color: #f87171; }

.intel-empty-text {
    font-size: 11px;
    color: #64748b;
    font-style: italic;
}

/* Chart Section */
.char-chart-section {
    background: #0d0e15;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.char-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.char-chart-title {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
}

.char-chart-subtitle {
    font-size: 11.5px;
    color: var(--text-dim);
    margin: 2px 0 0 0;
}

.chart-metric-switch {
    background: #181926;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3px;
    border-radius: 99px;
    display: flex;
    gap: 2px;
}

.metric-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s ease;
}

.metric-btn.active {
    background: var(--accent);
    color: #0b0c0e;
    font-weight: 800;
}

.char-chart-wrapper {
    position: relative;
    height: 220px;
    width: 100%;
}

.chart-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 14, 21, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border-radius: 10px;
    z-index: 5;
}

.chart-loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.chart-empty-state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
    text-align: center;
    padding: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.chart-empty-state svg {
    color: #475569;
}

/* Cursor pointer on cards */
.character-card, .char-icon-box {
    cursor: pointer;
}

/* EWGF Online Ranked Box (Tekken 8) */
.modal-ewgf-box {
    margin-top: 14px;
    background: rgba(56, 189, 248, 0.03);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    padding: 13px 16px;
    position: relative;
    z-index: 1;
}

.ewgf-box-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ewgf-badge {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-cyan);
    font-size: 10px;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.ewgf-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.ewgf-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    font-size: 12px;
}

.ewgf-stat-label {
    display: block;
    font-size: 10px;
    color: var(--text-dim);
    margin-bottom: 2px;
}

.ewgf-stats-grid strong {
    font-size: 14px;
    color: var(--accent-cyan);
    font-weight: 800;
}
