/* Extracted from profile.html - block 1 */
.profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin-left: max(0px, calc((100% - 1200px) / 2));
    margin-right: auto;
    margin-bottom: 1.5rem;
    padding: 0.4rem 0.8rem;
    width: fit-content;
    background: linear-gradient(180deg, rgba(26,26,26,0.95) 0%, rgba(13,13,13,0.98) 100%);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

.profile-tab {
    position: relative;
    z-index: 0;
    padding: 0.6rem 1.2rem;
    color: #888;
    text-decoration: none;
    background-color: transparent;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: 'Apex', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border: none;
    text-align: center;
}

/* Active panel — chamfered red shape, matching the public division-tabs design */
.profile-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, #f4012b 0%, #d00124 100%);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    -webkit-clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    filter: drop-shadow(0 3px 10px rgba(244, 1, 43, 0.35));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profile-tab:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

.profile-tab.active {
    background: transparent;
    color: #fff;
}

.profile-tab.active::before {
    opacity: 1;
}

.profile-tab i {
    margin-right: 6px;
    font-size: 13px;
}

/* Extracted from profile.html - block 2 */
/* Profile Page - Reorganized */
.profile-page {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Side-by-side layout: Profile Card (left) + Stats Dashboard (right) */
.profile-main-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.profile-main-layout .profile-top-row {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.profile-main-layout .stats-dashboard {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

/* Top Row: Player Card + Settings Sidebar */
.profile-top-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}

/* Player Card (Right Side) */
.player-card {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #333;
}

/* Unified Player Card */
.player-card-unified {
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, rgba(13, 13, 13, 0.98) 100%);
    border-radius: 24px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    width: 337px;
    height: 415px;
    flex: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: visible;
    z-index: 2;
    box-sizing: border-box;
}

/* Refresh link — bottom-right corner of player card */
.card-refresh-form {
    position: absolute;
    bottom: 10px;
    right: 12px;
    z-index: 10;
}

.card-refresh-btn {
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.65rem;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.card-refresh-btn:hover {
    color: rgba(255, 255, 255, 0.6);
}

.card-refresh-btn i {
    font-size: 0.6rem;
}

/* Top-left corner badges wrapper */
.corner-badges-left {
    position: absolute;
    bottom: 10px;
    left: 12px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

/* Platform badge */
.platform-corner-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    transition: background 0.2s;
}

.platform-corner-badge i {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.55);
}

.platform-corner-badge:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Premium badge — yellow crown, sits next to platform badge */
.premium-corner-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 6px;
    transition: background 0.2s;
}

.premium-corner-badge i {
    font-size: 0.9rem;
    color: #ffd700;
}

.premium-corner-badge:hover {
    background: rgba(255, 215, 0, 0.25);
}

/* Rank corner badge — icon-only, rank-tinted box */
.rank-corner-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.2s, border-color 0.2s;
}

.rank-corner-badge .rank-cb-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.rank-corner-badge[class*="rank-bronze"],
.rank-corner-badge[class*="rank-rookie"] {
    background: rgba(205, 127, 50, 0.15);
    border-color: rgba(205, 127, 50, 0.35);
}
.rank-corner-badge[class*="rank-bronze"]:hover,
.rank-corner-badge[class*="rank-rookie"]:hover {
    background: rgba(205, 127, 50, 0.25);
}

.rank-corner-badge[class*="rank-silver"] {
    background: rgba(192, 192, 192, 0.15);
    border-color: rgba(192, 192, 192, 0.35);
}
.rank-corner-badge[class*="rank-silver"]:hover {
    background: rgba(192, 192, 192, 0.25);
}

.rank-corner-badge[class*="rank-gold"] {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.35);
}
.rank-corner-badge[class*="rank-gold"]:hover {
    background: rgba(255, 215, 0, 0.25);
}

.rank-corner-badge[class*="rank-platinum"],
.rank-corner-badge[class*="rank-diamond"] {
    background: rgba(0, 191, 255, 0.15);
    border-color: rgba(0, 191, 255, 0.35);
}
.rank-corner-badge[class*="rank-platinum"]:hover,
.rank-corner-badge[class*="rank-diamond"]:hover {
    background: rgba(0, 191, 255, 0.25);
}

.rank-corner-badge[class*="rank-master"] {
    background: rgba(148, 0, 211, 0.15);
    border-color: rgba(148, 0, 211, 0.35);
}
.rank-corner-badge[class*="rank-master"]:hover {
    background: rgba(148, 0, 211, 0.25);
}

.rank-corner-badge[class*="rank-predator"],
.rank-corner-badge[class*="rank-apex"] {
    background: rgba(255, 0, 0, 0.15);
    border-color: rgba(255, 0, 0, 0.35);
}
.rank-corner-badge[class*="rank-predator"]:hover,
.rank-corner-badge[class*="rank-apex"]:hover {
    background: rgba(255, 0, 0, 0.25);
}

/* Settings Sidebar */
.settings-sidebar {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.settings-section {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.settings-title {
    font-family: 'Apex', sans-serif;
    font-size: 0.85rem;
    color: #fff;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-title i {
    color: #f4012b;
    font-size: 0.9rem;
}

.settings-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.division-badge-sidebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.division-badge-sidebar.badge-open {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.division-badge-sidebar.badge-lower {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.division-badge-sidebar .division-name {
    font-family: 'Apex', sans-serif;
    font-size: 0.85rem;
    color: #fff;
    letter-spacing: 0.5px;
}

.division-badge-sidebar.badge-unset {
    background: rgba(107, 114, 128, 0.15);
    border: 1px solid rgba(107, 114, 128, 0.4);
}

.division-badge-sidebar.badge-unset .division-name {
    color: #9ca3af;
}

.settings-hint {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    margin: 0.5rem 0 0 0;
}

.pending-note {
    font-size: 0.75rem;
    color: #f59e0b;
    margin-bottom: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.pending-note i {
    margin-right: 4px;
}

.discord-link {
    color: #5865F2;
    text-decoration: none;
    font-weight: 600;
}

.discord-link:hover {
    text-decoration: underline;
}

.swap-form {
    margin-top: 0.5rem;
}

.btn-swap-small {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid #444;
    border-radius: 6px;
    color: #888;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-swap-small:hover {
    background: rgba(255,255,255,0.05);
    border-color: #666;
    color: #fff;
}

.current-region-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 8px;
    color: #4ade80;
    font-size: 0.85rem;
    font-family: 'Apex', sans-serif;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.current-region-badge.unset {
    background: rgba(107, 114, 128, 0.15);
    border-color: rgba(107, 114, 128, 0.4);
    color: #9ca3af;
}

.region-form-sidebar {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.region-select-small {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: rgba(0,0,0,0.3);
    background-color: #1a1a1a !important;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff !important;
    font-size: 0.75rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23888'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 28px;
}

.region-select-small option {
    background-color: #1a1a1a;
    color: #fff;
    padding: 8px;
}

.region-select-small:focus {
    outline: none;
    border-color: #f4012b;
}

.btn-save-small {
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid #444;
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-save-small:hover {
    background: rgba(255,255,255,0.05);
    border-color: #666;
    color: #fff;
}

/* Player Card Top Layout (main content + SharePlay side panel) */
.player-card-top-layout {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.player-card-main-content {
    flex: 2;
    display: flex;
    flex-direction: column;
}

/* SharePlay Card Section (right side panel ~1/3) */
.shareplay-card-section {
    flex: 1;
    max-width: 200px;
    min-width: 160px;
    padding: 0.875rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 193, 7, 0.03));
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 12px;
    align-self: flex-start;
}

.shareplay-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.shareplay-logo {
    width: 18px;
    height: 18px;
}

.shareplay-title {
    font-family: 'Apex', sans-serif;
    font-size: 0.8rem;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shareplay-connected-badge {
    font-size: 0.6rem;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: auto;
}

.shareplay-connected-info {
    text-align: center;
    margin-bottom: 0.6rem;
}

.shareplay-profile-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.4rem 0.6rem;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    color: #ffd700;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 0.4rem;
}

.shareplay-profile-link:hover {
    background: rgba(255, 215, 0, 0.25);
    border-color: rgba(255, 215, 0, 0.5);
}

.shareplay-mini-icon {
    width: 12px;
    height: 12px;
}

.shareplay-benefit-text {
    font-size: 0.65rem;
    color: #10b981;
    margin: 0.4rem 0 0 0;
    line-height: 1.3;
}

.shareplay-benefit-text i {
    margin-right: 3px;
    font-size: 0.6rem;
}

.shareplay-signup-prompt {
    text-align: center;
    margin-bottom: 0.6rem;
}

.shareplay-promo-text {
    font-size: 0.65rem;
    color: #9ca3af;
    margin: 0;
    line-height: 1.4;
}

.shareplay-promo-text i {
    color: #ffd700;
    margin-right: 4px;
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
}

.shareplay-form-inline {
    width: 100%;
}

.shareplay-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.shareplay-input-inline {
    width: 100%;
    padding: 0.45rem 0.6rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 0.7rem;
    min-width: 0;
}

.shareplay-input-inline:focus {
    outline: none;
    border-color: #ffd700;
}

.shareplay-input-inline::placeholder {
    color: #666;
    font-size: 0.65rem;
}

.shareplay-submit-btn {
    width: 100%;
    padding: 0.45rem 0.6rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 193, 7, 0.15));
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 6px;
    color: #ffd700;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.shareplay-submit-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 193, 7, 0.2));
    border-color: rgba(255, 215, 0, 0.6);
}

/* SharePlay Integration Styles (legacy - keep for compatibility) */
.premium-badge-small {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    margin-left: auto;
}

.shareplay-linked {
    margin-bottom: 0.75rem;
}

.shareplay-link-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 8px;
    color: #ffd700;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.shareplay-link-badge:hover {
    background: rgba(255, 215, 0, 0.25);
    border-color: rgba(255, 215, 0, 0.6);
}

.shareplay-form {
    width: 100%;
}

.shareplay-input-wrapper {
    display: flex;
    width: 100%;
    border: 1px solid #444;
    border-radius: 6px;
    overflow: hidden;
    background: #1a1a1a;
}

.shareplay-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: 0.75rem;
    min-width: 0;
}

.shareplay-input:focus {
    outline: none;
}

.shareplay-input::placeholder {
    color: #666;
}

.shareplay-input-wrapper:focus-within {
    border-color: #ffd700;
}

.shareplay-save-btn {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 215, 0, 0.2);
    border: none;
    border-left: 1px solid #444;
    color: #ffd700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shareplay-save-btn:hover {
    background: rgba(255, 215, 0, 0.4);
    color: #fff;
}

.shareplay-locked {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    background: rgba(107, 114, 128, 0.1);
    border: 1px dashed #444;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.btn-premium-small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 193, 7, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 6px;
    color: #ffd700;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-premium-small:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 193, 7, 0.2));
    border-color: rgba(255, 215, 0, 0.6);
}

/* Responsive: Stack side-by-side layout on medium screens */
@media (max-width: 1100px) {
    .profile-main-layout {
        flex-direction: column;
    }

    .profile-main-layout .profile-top-row {
        flex: none;
        width: 100%;
        position: static;
    }

    .profile-main-layout .stats-dashboard {
        width: 100%;
    }
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .profile-top-row {
        flex-direction: column;
    }

    .player-card-unified {
        margin-left: auto;
        margin-right: auto;
    }

    .player-card-top-layout {
        flex-direction: column;
    }

    .player-card-main-content {
        width: 100%;
    }

    .shareplay-card-section {
        max-width: none;
        width: 100%;
        margin-top: 1rem;
    }

    .shareplay-input-group {
        flex-direction: row;
    }

    .shareplay-input-inline {
        flex: 1;
    }

    .shareplay-submit-btn {
        width: auto;
        padding: 0.45rem 0.75rem;
    }

    .settings-sidebar {
        width: 100%;
        flex-direction: row;
        gap: 0.75rem;
    }

    .settings-section {
        flex: 1;
        min-height: auto;
    }
}


.player-card-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* ===== MMR Circle — scaled up for profile card (1.62× the play page card) ===== */
.profile-mmr-circle.mmr-circle-display {
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.profile-mmr-circle .mmr-circle-label {
    font-size: 0.65rem;
    margin-bottom: 0.1rem;
}

.profile-mmr-circle .mmr-circle-value-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.profile-mmr-circle .mmr-circle-row {
    transform: translateX(-13px);
    gap: 0.25rem;
    padding-top: 0;
    padding-bottom: 0;
}

.profile-mmr-circle .mmr-circle-ring {
    width: 54px;
    height: 54px;
}

.profile-mmr-circle .mmr-circle-inner {
    top: 3px;
    left: 3px;
    width: 48px;
    height: 48px;
}

.profile-mmr-circle .mmr-circle-icon {
    width: 22px;
    height: 22px;
}

.profile-mmr-circle .mmr-circle-inner .unranked-icon {
    width: 22px;
    height: 22px;
    font-size: 1rem;
    font-weight: 700;
    color: #777;
    line-height: 22px;
    text-align: center;
    filter: none;
    display: block;
}

.profile-mmr-circle .mmr-circle-value {
    font-size: 1.3rem;
}

/* MMR circle base styles (shared) */
.mmr-circle-display { position: relative; display: flex; flex-direction: column; align-items: center; cursor: default; }
.mmr-circle-label { font-family: 'URW','Apex',sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: #555; }
.mmr-circle-row { display: flex; align-items: center; position: relative; }
.mmr-circle-ring { transform: rotate(-90deg); }
.mmr-circle-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 4; }
.mmr-circle-progress { fill: none; stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; stroke-dasharray: 138.2; stroke-dashoffset: calc(138.2 - (138.2 * var(--progress) / 100)); }
.mmr-circle-inner { position: absolute; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.mmr-circle-icon { object-fit: contain; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }
.mmr-circle-inner .unranked-icon { width: auto; height: auto; font-size: 1.1rem; font-weight: 700; color: #777; line-height: 1; filter: none; }
.mmr-circle-value { font-family: 'Apex',sans-serif; font-weight: 700; letter-spacing: 0.5px; color: #888; }

/* Tier colors */
.mmr-circle-display.tier-1 .mmr-circle-progress { stroke: #9ca3af; }
.mmr-circle-display.tier-1 .mmr-circle-value { color: #9ca3af; }
.mmr-circle-display.tier-2 .mmr-circle-progress { stroke: #22c55e; }
.mmr-circle-display.tier-2 .mmr-circle-value { color: #22c55e; }
.mmr-circle-display.tier-3 .mmr-circle-progress { stroke: #3b82f6; }
.mmr-circle-display.tier-3 .mmr-circle-value { color: #3b82f6; }
.mmr-circle-display.tier-4 .mmr-circle-progress { stroke: #a855f7; filter: drop-shadow(0 0 4px rgba(168,85,247,0.4)); }
.mmr-circle-display.tier-4 .mmr-circle-value { color: #a855f7; }
.mmr-circle-display.tier-5 .mmr-circle-progress { stroke: #f97316; filter: drop-shadow(0 0 4px rgba(249,115,22,0.4)); }
.mmr-circle-display.tier-5 .mmr-circle-value { color: #f97316; }
.mmr-circle-display.tier-6 .mmr-circle-progress { stroke: #ef4444; filter: drop-shadow(0 0 6px rgba(239,68,68,0.5)); }
.mmr-circle-display.tier-6 .mmr-circle-value { color: #ef4444; }

.avatar-wrapper {
    position: relative;
    overflow: visible;
}

/* ── Avatar edit overlay (Premium only) ─────────────────────────── */
.avatar-edit-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.18s ease, background 0.18s ease;
    z-index: 6;
    color: #fff;
}

.avatar-wrapper:hover .avatar-edit-overlay,
.avatar-wrapper:focus-within .avatar-edit-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.52);
}

.avatar-edit-overlay svg {
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.6));
}

/* Visually hide the real file input — the label acts as the button */
.avatar-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Loading ring shown while upload is in progress */
.avatar-wrapper.uploading .avatar-img,
.avatar-wrapper.uploading .avatar-placeholder {
    opacity: 0.35;
}

.avatar-wrapper.uploading::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #f4012b;
    animation: avatar-spin 0.7s linear infinite;
    z-index: 7;
    pointer-events: none;
}

@keyframes avatar-spin {
    to { transform: rotate(360deg); }
}

/* ── Avatar remove badge — top-right corner of the avatar wrapper ── */
.avatar-remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 10;
    width: 20px;
    height: 20px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 20, 20, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    backdrop-filter: blur(4px);
    line-height: 1;
}

.avatar-wrapper:hover .avatar-remove-btn,
.avatar-wrapper:focus-within .avatar-remove-btn {
    opacity: 1;
}

.avatar-remove-btn:hover {
    background: rgba(220, 38, 38, 0.9);
    border-color: rgba(239, 68, 68, 0.6);
    color: #fff;
}


/* Region flag badge — bottom-right corner, overlaid on the avatar */
.avatar-region-flag {
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px 0 0 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
    z-index: 5;
}

.avatar-region-flag--clickable {
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.15s ease;
}

.avatar-region-flag--clickable:hover {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55)) brightness(1.15);
    transform: scale(1.08);
}

.avatar-img {
    width: 100px;
    height: 100px;
    min-width: 100px;
    min-height: 100px;
    border-radius: 50%;
    border: 3px solid #f4012b;
    object-fit: cover;
    object-position: center;
    display: block;
}

.avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f4012b, #ff4757);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    border: 3px solid #f4012b;
}

.player-username {
    font-size: 1.8rem;
    color: #fff;
    margin: 0;
    font-family: 'Apex', sans-serif;
    letter-spacing: 2px;
}

/* Row wrapping apex name h1 + history button */
.player-username-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Apex name edit button — absolute so it never off-centers the h1 */
.player-username-row .title-edit-btn {
    position: absolute;
    left: calc(50% + 80px);
    top: 50%;
    transform: translateY(-50%);
}

/* Cooldown badge — absolute so it never off-centers the h1 */
.name-change-cooldown-badge {
    position: absolute;
    left: calc(50% + 80px);
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 9px;
    flex-shrink: 0;
}

.player-apex-name {
    color: #888;
    margin: 0;
    font-size: 0.9rem;
}

/* Discord display inside apex-name-wrapper */
.player-discord-display {
    display: flex;
    align-items: center;
    gap: 5px;
}

.player-discord-icon {
    color: #5865f2;
    font-size: 0.95rem;
}

.copy-discord-btn {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.75rem;
    transition: color 0.2s;
    line-height: 1;
}

.copy-discord-btn:hover {
    color: #aaa;
}

/* Player Tags Row */
.player-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    font-family: 'Apex', sans-serif;
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    position: relative;
}

.tag:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
}

.tag i {
    font-size: 0.72rem;
    opacity: 0.85;
}

.tag-label {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.tag-value {
    font-weight: 700;
    color: #ddd;
    font-size: 0.78rem;
}

.tag-rank-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Leaderboard Rank Tag - Red */
.tag-rank {
    background: rgba(244, 1, 43, 0.08);
    border-color: rgba(244, 1, 43, 0.2);
}
.tag-rank:hover {
    background: rgba(244, 1, 43, 0.14);
    border-color: rgba(244, 1, 43, 0.35);
}
.tag-rank i { color: #f4012b; }
.tag-rank .tag-value { color: #f4012b; }

/* Level Tag - Yellow/Gold */
.tag-level {
    background: rgba(255, 215, 0, 0.06);
    border-color: rgba(255, 215, 0, 0.18);
}
.tag-level:hover {
    background: rgba(255, 215, 0, 0.12);
    border-color: rgba(255, 215, 0, 0.3);
}
.tag-level .tag-label { color: rgba(255, 215, 0, 0.5); }
.tag-level .tag-value { color: #ffd700; }

/* Platform Tag */
.tag-platform {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    padding: 5px 8px;
}
.tag-platform:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}
.tag-platform i {
    font-size: 0.9rem;
    opacity: 1;
}
.tag-platform .fa-steam { color: #66c0f4; }
.tag-platform .fa-playstation { color: #006fcd; }
.tag-platform .fa-xbox { color: #107c10; }
.tag-platform .fa-gamepad { color: #e60012; }

/* Region Tag */
.tag-region {
    background: rgba(74, 222, 128, 0.06);
    border-color: rgba(74, 222, 128, 0.18);
}
.tag-region:hover {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.3);
}
.tag-region .tag-value { color: #4ade80; }

/* Voice Comms Preference Tag */
/* Comms Toggle Button (top-right of player card, mirrors play page) */
.comms-toggle-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 12;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(220, 38, 38, 0.4);
    background: rgba(220, 38, 38, 0.12);
    color: rgba(248, 113, 113, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    font-size: 0.75rem;
}

.comms-toggle-btn:hover {
    background: rgba(220, 38, 38, 0.22);
    border-color: rgba(220, 38, 38, 0.6);
    color: #f87171;
    transform: scale(1.1);
}

.comms-toggle-btn:active {
    transform: scale(0.9);
    transition: transform 0.08s ease;
}

.comms-toggle-btn.active {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.5);
    color: #34d399;
    animation: comms-activate 0.3s ease;
}

.comms-toggle-btn.active:hover {
    background: rgba(16, 185, 129, 0.28);
    border-color: rgba(16, 185, 129, 0.65);
    color: #6ee7b7;
    transform: scale(1.1);
}

.comms-toggle-btn.active:active {
    transform: scale(0.9);
    transition: transform 0.08s ease;
}

@keyframes comms-activate {
    0%   { transform: scale(0.9); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.comms-toggle-btn.locked {
    background: rgba(100, 100, 100, 0.15);
    border-color: rgba(100, 100, 100, 0.3);
    color: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

.comms-toggle-btn.locked:hover {
    background: rgba(100, 100, 100, 0.2);
    border-color: rgba(100, 100, 100, 0.4);
    color: #666;
    transform: none;
}

.comms-toggle-btn.locked:active {
    transform: none;
}

/* Comms Toggle Tooltip (appears to the left on profile) */
.comms-toggle-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    background: rgba(0, 0, 0, 0.85);
    color: #f87171;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: 1px solid rgba(220, 38, 38, 0.3);
    z-index: 20;
}

.comms-toggle-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.comms-toggle-btn.active::after {
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.comms-toggle-btn.locked::after {
    color: #f87171;
    border-color: rgba(220, 38, 38, 0.3);
}

/* Language toggle — circular button (mirrors comms-toggle-btn) */
.comms-language-selector {
    position: absolute;
    top: 12px;
    left: 48px;
    z-index: 10;
}

/* Region button — top-right corner of player card */
.corner-region-select {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 12;
    display: flex;
    align-items: center;
}

/* The region-edit-btn inside is always visible (not hidden like card-border btn) */
.corner-region-select .title-edit-btn {
    opacity: 1 !important;
}

.lang-toggle-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.12);
    color: rgba(147, 197, 253, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.lang-toggle-btn:hover {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(59, 130, 246, 0.6);
    color: #93c5fd;
    transform: scale(1.1);
}

.lang-toggle-btn:active {
    transform: scale(0.9);
    transition: transform 0.08s ease;
}

.lang-toggle-btn[data-lang="es"] {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.12);
    color: rgba(253, 224, 71, 0.9);
}

.lang-toggle-btn[data-lang="es"]:hover {
    background: rgba(251, 191, 36, 0.22);
    border-color: rgba(251, 191, 36, 0.6);
    color: #fde047;
    transform: scale(1.1);
}

/* Tooltip (appears to the left on profile, like comms btn) */
.lang-toggle-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    background: rgba(0, 0, 0, 0.85);
    color: #93c5fd;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: 1px solid rgba(59, 130, 246, 0.3);
    z-index: 20;
}

.lang-toggle-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.lang-toggle-btn[data-lang="es"]::after {
    color: #fde047;
    border-color: rgba(251, 191, 36, 0.3);
}

.lang-flag-img {
    width: 18px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
}

/* Language badge (badges section) */
.badge-language {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #a78bfa;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Refresh Badge Button */
.tag-refresh {
    background: rgba(107, 114, 128, 0.06);
    border: 1px solid rgba(107, 114, 128, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
}
.tag-refresh:hover {
    background: rgba(107, 114, 128, 0.14);
    border-color: rgba(107, 114, 128, 0.3);
}
.tag-refresh:hover i { color: #d1d5db; }
.tag-refresh:hover .tag-value { color: #d1d5db; }
.tag-refresh i { color: #9ca3af; font-size: 0.72rem; transition: color 0.2s; }
.tag-refresh .tag-value { color: #9ca3af; transition: color 0.2s; }

/* ============ Inline Settings Row ============ */
.player-settings-inline {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #222;
}

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

.setting-inline-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setting-inline-label i {
    margin-right: 4px;
    font-size: 0.7rem;
}

.setting-inline-value {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.setting-inline-value.division-open {
    background: rgba(244, 1, 43, 0.15);
    border: 1px solid rgba(244, 1, 43, 0.4);
    color: #f4012b;
}

.setting-inline-value.division-open i {
    color: #f4012b;
    font-size: 0.65rem;
}

.setting-inline-value.division-lower {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #3b82f6;
}

.setting-inline-value.division-lower i {
    color: #3b82f6;
    font-size: 0.65rem;
}

.setting-inline-value.division-lower i.fa-clock {
    color: #f59e0b;
}

.setting-inline-value.division-unset {
    background: rgba(107, 114, 128, 0.15);
    border: 1px solid rgba(107, 114, 128, 0.4);
    color: #9ca3af;
}

.setting-inline-form {
    display: flex;
    align-items: center;
}

.btn-inline-action {
    padding: 0.3rem 0.5rem;
    background: transparent;
    border: 1px solid #333;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.7rem;
}

.btn-inline-action:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #555;
    color: #fff;
}

.setting-inline-select {
    padding: 0.3rem 1.5rem 0.3rem 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.75rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 10px;
}

.setting-inline-select:focus {
    outline: none;
    border-color: #f4012b;
}

.setting-inline-select option {
    background: #1a1a1a;
    color: #fff;
}

@media (max-width: 480px) {
    .player-settings-inline {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Premium Tag */
.tag-premium {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    gap: 5px;
}
.tag-premium:hover {
    background: rgba(255, 215, 0, 0.14);
    border-color: rgba(255, 215, 0, 0.35);
}
.tag-premium i { color: #ffd700; }
.tag-premium .tag-value { color: #ffd700; font-weight: 700; }

/* Apex Rank Tags - inherit rank colors */
.tag-apex-rank {
    gap: 5px;
}
.tag-apex-rank.rank-rookie {
    background: rgba(205, 127, 50, 0.08);
    border: 1px solid rgba(205, 127, 50, 0.2);
}
.tag-apex-rank.rank-rookie:hover { background: rgba(205, 127, 50, 0.14); border-color: rgba(205, 127, 50, 0.35); }
.tag-apex-rank.rank-rookie .tag-value { color: #cd7f32; }

.tag-apex-rank.rank-bronze {
    background: rgba(205, 127, 50, 0.08);
    border: 1px solid rgba(205, 127, 50, 0.2);
}
.tag-apex-rank.rank-bronze:hover { background: rgba(205, 127, 50, 0.14); border-color: rgba(205, 127, 50, 0.35); }
.tag-apex-rank.rank-bronze .tag-value { color: #cd7f32; }

.tag-apex-rank.rank-silver {
    background: rgba(192, 192, 192, 0.08);
    border: 1px solid rgba(192, 192, 192, 0.2);
}
.tag-apex-rank.rank-silver:hover { background: rgba(192, 192, 192, 0.14); border-color: rgba(192, 192, 192, 0.35); }
.tag-apex-rank.rank-silver .tag-value { color: #c0c0c0; }

.tag-apex-rank.rank-gold {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
}
.tag-apex-rank.rank-gold:hover { background: rgba(255, 215, 0, 0.14); border-color: rgba(255, 215, 0, 0.35); }
.tag-apex-rank.rank-gold .tag-value { color: #ffd700; }

.tag-apex-rank.rank-platinum {
    background: rgba(0, 191, 255, 0.08);
    border: 1px solid rgba(0, 191, 255, 0.2);
}
.tag-apex-rank.rank-platinum:hover { background: rgba(0, 191, 255, 0.14); border-color: rgba(0, 191, 255, 0.35); }
.tag-apex-rank.rank-platinum .tag-value { color: #00bfff; }

.tag-apex-rank.rank-diamond {
    background: rgba(0, 191, 255, 0.08);
    border: 1px solid rgba(0, 191, 255, 0.2);
}
.tag-apex-rank.rank-diamond:hover { background: rgba(0, 191, 255, 0.14); border-color: rgba(0, 191, 255, 0.35); }
.tag-apex-rank.rank-diamond .tag-value { color: #00bfff; }

.tag-apex-rank.rank-master {
    background: rgba(148, 0, 211, 0.08);
    border: 1px solid rgba(148, 0, 211, 0.2);
}
.tag-apex-rank.rank-master:hover { background: rgba(148, 0, 211, 0.14); border-color: rgba(148, 0, 211, 0.35); }
.tag-apex-rank.rank-master .tag-value { color: #9400d3; }

.tag-apex-rank.rank-predator,
.tag-apex-rank.rank-apex,
.tag-apex-rank[class*="rank-apex"] {
    background: rgba(255, 0, 0, 0.08);
    border: 1px solid rgba(255, 0, 0, 0.2);
}
.tag-apex-rank.rank-predator:hover,
.tag-apex-rank.rank-apex:hover,
.tag-apex-rank[class*="rank-apex"]:hover { background: rgba(255, 0, 0, 0.14); border-color: rgba(255, 0, 0, 0.35); }
.tag-apex-rank.rank-predator .tag-value,
.tag-apex-rank.rank-apex .tag-value,
.tag-apex-rank[class*="rank-apex"] .tag-value { color: #ff4500; }

.tag-apex-rank.rank-unranked {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.tag-apex-rank.rank-unranked .tag-value { color: #888; }

/* Card Footer Row */
.player-card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-ids {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

/* ============ Compact Settings Row (Division & Region) ============ */
.settings-row {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
    flex-wrap: wrap;
}

.setting-item {
    flex: 1;
    min-width: 220px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.setting-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.setting-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.setting-label i {
    color: #f4012b;
    font-size: 0.8rem;
}

.division-badge-compact {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
}

.division-badge-compact.badge-open {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.division-badge-compact.badge-lower {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.region-badge-compact {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.region-badge-compact.unset {
    background: rgba(107, 114, 128, 0.15);
    border: 1px solid rgba(107, 114, 128, 0.4);
    color: #9ca3af;
}

.setting-note {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.5rem;
    padding: 4px 8px;
    border-radius: 4px;
}

.setting-note.pending {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.setting-note a {
    color: #fbbf24;
    text-decoration: underline;
}

.setting-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.region-form-inline {
    display: flex;
    gap: 0.5rem;
}

.region-select-compact {
    padding: 5px 10px;
    background: rgba(0,0,0,0.3);
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    min-width: 100px;
}

.region-select-compact:focus {
    outline: none;
    border-color: #f4012b;
}

.btn-setting {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: transparent;
    border: 1px solid #444;
    border-radius: 6px;
    color: #888;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-setting:hover {
    background: rgba(255,255,255,0.05);
    border-color: #666;
    color: #fff;
}

.btn-setting i {
    font-size: 0.7rem;
}

@media (max-width: 600px) {
    .settings-row {
        flex-direction: column;
    }
    .setting-item {
        min-width: unset;
    }
}

.player-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
}

.badge {
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
}

.badge.platform {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.badge.region {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge.rank {
    background: rgba(244, 1, 43, 0.3);
    color: #f4012b;
    font-family: 'Apex', sans-serif;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 8px 16px;
}

/* Bio Section - Centered and limited width */
.bio-section {
    margin-top: 1rem;
    text-align: center;
    max-width: 100%;
    width: 100%;
    padding: 0 25%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.bio-label {
    display: block;
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    text-align: left;
}

.bio-input {
    width: 100%;
    height: 60px;
    background: rgba(255,255,255,0.03);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 0.5rem;
    color: #fff;
    font-family: 'URW Dock', sans-serif;
    font-size: 0.85rem;
    resize: none;
}

.bio-input:disabled {
    color: #aaa;
    cursor: default;
}

.bio-input:not(:disabled) {
    background: rgba(255,255,255,0.06);
    border-color: #f4012b;
}

.bio-input::placeholder {
    color: #555;
}

.bio-input:focus {
    outline: none;
    border-color: #f4012b;
}

/* Bio Edit Button - Match About Me label style */
.bio-section .btn-action {
    background: transparent;
    border: none;
    color: #666;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.bio-section .btn-action:hover {
    color: #f4012b;
    background: transparent;
}

.player-card-actions {
    margin-top: 1rem;
}

/* Player Card Footer - Subtle Logout */
.player-card-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #333;
    text-align: center;
}

.logout-link {
    color: #555;
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.2s;
}

.logout-link:hover {
    color: #f4012b;
}

/* Apex Legends Rank Styling */
.rank-row {
    flex-direction: column;
    align-items: flex-start !important;
}

.apex-rank {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    margin-top: 4px;
}

.rank-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.rank-text {
    font-family: 'Apex', sans-serif;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Rank Colors */
.apex-rank.rank-rookie {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.1));
    border: 1px solid rgba(205, 127, 50, 0.4);
}
.apex-rank.rank-rookie .rank-text { color: #cd7f32; }

.apex-rank.rank-bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.1));
    border: 1px solid rgba(205, 127, 50, 0.4);
}
.apex-rank.rank-bronze .rank-text { color: #cd7f32; }

.apex-rank.rank-silver {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.1));
    border: 1px solid rgba(192, 192, 192, 0.4);
}
.apex-rank.rank-silver .rank-text { color: #c0c0c0; }

.apex-rank.rank-gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.4);
}
.apex-rank.rank-gold .rank-text { color: #ffd700; }

.apex-rank.rank-platinum {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(0, 191, 255, 0.1));
    border: 1px solid rgba(0, 191, 255, 0.4);
}
.apex-rank.rank-platinum .rank-text { color: #00bfff; }

.apex-rank.rank-diamond {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(138, 43, 226, 0.1));
    border: 1px solid rgba(0, 191, 255, 0.4);
}
.apex-rank.rank-diamond .rank-text { color: #00bfff; }

.apex-rank.rank-master {
    background: linear-gradient(135deg, rgba(148, 0, 211, 0.2), rgba(148, 0, 211, 0.1));
    border: 1px solid rgba(148, 0, 211, 0.4);
}
.apex-rank.rank-master .rank-text { color: #9400d3; }

.apex-rank.rank-predator,
.apex-rank.rank-apex {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), rgba(255, 69, 0, 0.1));
    border: 1px solid rgba(255, 0, 0, 0.4);
}
.apex-rank.rank-predator .rank-text,
.apex-rank.rank-apex .rank-text { color: #ff4500; }

.apex-rank.rank-unranked {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}
.apex-rank.rank-unranked .rank-text { color: #888; }

/* Account Section (Left Side) */
.account-section {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.account-section.no-account {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.no-account-content {
    padding: 2rem;
}

.no-account-content p {
    color: #888;
    margin-bottom: 1rem;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #333;
}

.section-header-row h3 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
    font-family: 'Apex', sans-serif;
}

.account-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    flex-grow: 1;
}

.account-info-item {
    background: rgba(255,255,255,0.03);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    border: 1px solid #333;
}

.account-info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    display: block;
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

.info-value {
    display: block;
    font-size: 0.9rem;
    color: #fff;
}

.info-value.monospace {
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
}

/* Account Actions - Side by Side Buttons */
.account-actions {
    display: flex;
    gap: 0.75rem;
}

/* Account Actions Row - Buttons left, IDs right */
.account-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.account-ids {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.id-text {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.65rem;
    color: #555;
    letter-spacing: 0.5px;
}

/* COMPACT Account Section Styles */
.account-section.compact {
    padding: 1.25rem;
}

.account-section.compact .section-header-row {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
}

/* Large Level Display */
.level-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, rgba(244, 1, 43, 0.1), rgba(244, 1, 43, 0.02));
    border-radius: 8px;
    border: 1px solid rgba(244, 1, 43, 0.2);
}

.level-number {
    font-family: 'Apex', Arial, sans-serif;
    font-size: 2.25rem;
    font-weight: bold;
    color: #fff;
    line-height: 1;
}

.level-label {
    font-family: 'Apex', Arial, sans-serif;
    font-size: 0.7rem;
    color: #f4012b;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.25rem;
}

/* Rank + Platform Row */
.rank-platform-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

/* Platform Icon Badge - next to rank */
.platform-icon-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.platform-icon-badge i {
    font-size: 1.2rem;
}

.platform-icon-badge .fa-steam { color: #66c0f4; }
.platform-icon-badge .fa-playstation { color: #006fcd; }
.platform-icon-badge .fa-xbox { color: #107c10; }
.platform-icon-badge .fa-gamepad { color: #e60012; }

/* Compact Info Rows */
.account-info-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.6rem;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
}

.info-row .info-label {
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 0;
}

.info-row .info-value {
    font-size: 0.85rem;
    color: #fff;
}

.info-row .info-value.rank-value {
    color: #fbbf24;
}

.info-row .info-value.small {
    font-size: 0.7rem;
    color: #888;
}

/* Compact Account Actions */
.account-actions.compact {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    gap: 0.5rem;
}

.btn-action.small {
    padding: 10px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Font Fallbacks for Numbers and Special Characters */
.monospace, code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
}

/* Ensure numbers render properly with fallback */
.stat-num, .highlight-value, .level-number, .placement-num {
    font-family: 'Apex', Arial, Helvetica, sans-serif;
}

.btn-action {
    flex: 1;
    background: rgba(255,255,255,0.08);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: 'URW Dock', sans-serif;
    font-size: 0.85rem;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.btn-action:hover {
    background: #f4012b;
    color: #fff;
}

/* Buttons */
.btn-primary {
    background: #f4012b;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'URW Dock', sans-serif;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #ff2d4f;
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: 'URW Dock', sans-serif;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

.btn-ghost {
    background: transparent;
    color: #888;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.btn-ghost:hover {
    color: #fff;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ============================================
   NEW STATS DASHBOARD STYLES
   ============================================ */
.stats-dashboard {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 1.5rem;
}

.stats-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: none;
    flex-wrap: wrap;
    gap: 1rem;
}

.stats-dashboard-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-family: 'Apex', sans-serif;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-dashboard-header h2 i {
    color: #f4012b;
}

.time-filter-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-filter-container label {
    color: #888;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.time-filter-container label i {
    color: #f4012b;
}

.stats-time-filter {
    padding: 8px 16px;
    background: #0d0d0d;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 160px;
    transition: all 0.2s;
}

.stats-time-filter:hover {
    border-color: #f4012b;
}

.stats-time-filter:focus {
    outline: none;
    border-color: #f4012b;
    box-shadow: 0 0 0 2px rgba(244, 1, 43, 0.2);
}

.stats-time-filter option {
    background: #1a1a1a;
    color: #fff;
}

/* Compact Stats Board */
.compact-stats-board {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Primary Stats Row */
.primary-stats-row {
    display: flex;
    gap: 0.6rem;
}

.primary-stat {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #333;
    transition: all 0.2s;
    flex: 1;
    min-width: 0;
}

.primary-stat:hover {
    border-color: #444;
    transform: translateY(-2px);
}

.primary-stat > i {
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.primary-stat.rank-stat > i {
    background: rgba(244, 1, 43, 0.15);
    color: #f4012b;
}

.primary-stat.points-stat > i {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.primary-stat.games-stat > i {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.primary-stat.wins-stat > i {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.primary-stat.winrate-stat > i {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.primary-stat-content {
    display: flex;
    flex-direction: column;
    min-width: 0;             /* allow children to shrink below intrinsic width */
    flex: 1 1 auto;
}

.primary-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Apex', sans-serif;
    line-height: 1.2;
    /* Never break the tile layout: clip gracefully instead of overflowing. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.primary-stat-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Secondary Stats Grid */
.secondary-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
}

.stat-tile {
    background: #0d0d0d;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    border: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    min-height: 70px;
}

.stat-tile:hover {
    border-color: #444;
    background: #111;
}

.stat-tile-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.85rem;
    opacity: 0.4;
}

.stat-tile.kills .stat-tile-icon { color: #f4012b; }
.stat-tile.damage .stat-tile-icon { color: #3b82f6; }
.stat-tile.assists .stat-tile-icon { color: #8b5cf6; }
.stat-tile.placement .stat-tile-icon { color: #fbbf24; }
.stat-tile.accuracy .stat-tile-icon { color: #22c55e; }
.stat-tile.survival .stat-tile-icon { color: #06b6d4; }
.stat-tile.knockdowns .stat-tile-icon { color: #ef4444; }
.stat-tile.revives .stat-tile-icon { color: #ec4899; }
.stat-tile.avg-points .stat-tile-icon { color: #f59e0b; }
.stat-tile.top5 .stat-tile-icon { color: #10b981; }
.stat-tile.total-kills .stat-tile-icon { color: #ef4444; }
.stat-tile.placement-pts .stat-tile-icon { color: #7c3aed; }

.stat-tile-content {
    display: flex;
    flex-direction: column;
}

.stat-tile-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Apex', sans-serif;
}

.stat-tile-label {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-tile-total {
    font-size: 0.7rem;
    color: #555;
    margin-top: auto;
}

.stat-tile-total span {
    color: #888;
    font-weight: 600;
}

/* ============================================
   FULL WIDTH CHARTS STYLES
   ============================================ */
.performance-trends-section.full-width {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid #333;
}

.performance-trends-section.full-width .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.performance-trends-section.full-width .section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.performance-trends-section.full-width .section-header h2 i {
    color: #f4012b;
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Chart Selector Dropdown */
.chart-selector-dropdown {
    padding: 10px 20px;
    background: #0d0d0d;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    min-width: 200px;
    transition: all 0.2s;
}

.chart-selector-dropdown:hover {
    border-color: #f4012b;
}

.chart-selector-dropdown:focus {
    outline: none;
    border-color: #f4012b;
    box-shadow: 0 0 0 2px rgba(244, 1, 43, 0.2);
}

.chart-selector-dropdown option {
    background: #1a1a1a;
    color: #fff;
    padding: 10px;
}

/* Unified Chart Container */
.unified-chart-container {
    background: #0d0d0d;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #333;
    position: relative;
    min-height: 420px;
}

.chart-panel {
    display: none;
    width: 100%;
}

.chart-panel.active {
    display: block;
}

.chart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chart-subtitle {
    font-size: 0.8rem;
    color: #666;
}

.chart-wrapper-unified {
    width: 100%;
    height: 350px;
    position: relative;
}

.chart-wrapper-unified canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Legend Styles */
.chart-legend-inline {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #888;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.kills { background: #f4012b; }
.legend-color.damage { background: #3b82f6; }
.legend-color.avg { background: transparent; border: 2px dashed #4ade80; }

/* Legend Stats Panel Styles */
.legend-stats-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.legend-stats-cards-inline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.legend-card-inline {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    border: 1px solid #333;
}

.legend-card-inline.best {
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
}

.legend-card-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.legend-card-inline .legend-card-title {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-card-badge-inline {
    font-size: 0.65rem;
    color: #ffd700;
}

.legend-name-inline {
    font-family: 'Apex', sans-serif;
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

.legend-stats-row-inline {
    display: flex;
    gap: 1.5rem;
}

.legend-stat-inline {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.legend-stat-inline .stat-value {
    font-family: 'Apex', sans-serif;
    font-size: 1rem;
    color: #fff;
    font-weight: bold;
}

.legend-stat-inline.highlight .stat-value {
    color: #4ade80;
}

.legend-stat-inline .stat-label {
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
}

.legends-table-container {
    overflow-x: auto;
}

.legends-table-inline {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.legends-table-inline th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #333;
}

.legends-table-inline td {
    padding: 0.65rem 1rem;
    color: #fff;
    border-bottom: 1px solid #222;
}

.legends-table-inline tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.legends-table-inline .legend-name-cell {
    font-weight: 600;
    color: #fff;
}

.no-legend-data {
    text-align: center;
    padding: 2rem;
    color: #666;
}

@media (max-width: 768px) {
    .legend-stats-cards-inline {
        grid-template-columns: 1fr;
    }

    .legend-stats-row-inline {
        gap: 1rem;
    }
}

/* Legacy chart styles for backwards compatibility */
.charts-container-fullwidth {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chart-card-large {
    background: #0d0d0d;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #333;
}

.chart-card-large .chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chart-card-large h4 {
    font-size: 1rem;
    color: #fff;
    margin: 0;
    font-weight: 600;
}

.chart-wrapper-large {
    width: 100%;
    height: 350px;
    position: relative;
}

.chart-wrapper-large canvas {
    width: 100% !important;
    height: 100% !important;
}

.charts-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.chart-card-medium {
    background: #0d0d0d;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #333;
}

.chart-card-medium h4 {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-card-medium h4 i {
    color: #f4012b;
    font-size: 0.75rem;
}

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

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-card-wide {
    background: #0d0d0d;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #333;
}

.chart-card-wide h4 {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-card-wide h4 i {
    color: #fbbf24;
}

.chart-wrapper-wide {
    width: 100%;
    height: 250px;
    position: relative;
}

.chart-wrapper-wide canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Match Controls */
.match-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.match-filter-select {
    padding: 6px 12px;
    background: #0d0d0d;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
}

.match-filter-select:focus {
    outline: none;
    border-color: #f4012b;
}

.match-filter-select option {
    background: #1a1a1a;
}

/* Responsive Adjustments for New Layout */
@media (max-width: 1200px) {
    .primary-stats-row {
        flex-wrap: wrap;
    }

    .primary-stat {
        flex: 1 1 calc(33.33% - 0.4rem);
    }

    .secondary-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .primary-stat {
        flex: 1 1 calc(50% - 0.3rem);
    }

    .secondary-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .chart-wrapper-large {
        height: 280px;
    }
}

@media (max-width: 600px) {
    .stats-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .time-filter-container {
        width: 100%;
    }

    .stats-time-filter {
        flex: 1;
    }

    .primary-stats-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .primary-stat {
        flex: none;
        padding: 0.6rem 0.75rem;
    }

    .primary-stat > i {
        font-size: 1rem;
        width: 28px;
        height: 28px;
    }

    .primary-stat-value {
        font-size: 1.05rem;   /* tighter on narrow viewports so numbers like "100%" fit */
    }

    .secondary-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-tile {
        padding: 0.5rem 0.65rem;
    }

    .stat-tile-value {
        font-size: 1rem;
    }

    .chart-wrapper-large {
        height: 220px;
    }

    .chart-wrapper {
        height: 160px;
    }

    .match-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ============================================
   SHARED STYLES - Also defined in static/css/profile-shared.css
   These styles are shared with tournament/player_profile.html
   To update both pages at once, edit the shared CSS file.
   ============================================ */

/* Match History */
.match-history-section {
    margin-top: 2rem;
    padding: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #333;
}

.section-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.25rem;
    font-family: 'Apex', sans-serif;
}

.match-count {
    color: #666;
    font-size: 0.85rem;
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.match-row {
    display: grid;
    grid-template-columns: 50px 100px 40px 1fr 120px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, rgba(13, 13, 13, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid #444;
    border-radius: 8px;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Faded map image — occupies left 35% of card, right 25% of that fades out */
.match-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 35%;
    height: 100%;
    background-image: var(--map-bg);
    background-size: cover;
    background-position: center;
    -webkit-mask-image: linear-gradient(to right, black 0%, black 75%, transparent 100%);
    mask-image: linear-gradient(to right, black 0%, black 75%, transparent 100%);
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

/* Keep all children above the pseudo-element */
.match-row > * {
    position: relative;
    z-index: 1;
}


.match-row:hover {
    background: linear-gradient(180deg, rgba(34, 34, 34, 0.95) 0%, rgba(20, 20, 20, 0.98) 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

.match-row.win {
    border-left-color: #4ade80;
    background: rgba(74, 222, 128, 0.05);
}

.match-row.top3 {
    border-left-color: #fbbf24;
    background: rgba(251, 191, 36, 0.05);
}

.match-row.top5 {
    border-left-color: #60a5fa;
    background: rgba(96, 165, 250, 0.05);
}

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

.game-link {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #666;
    transition: color 0.2s ease;
}

.game-link:hover {
    color: #f4012b;
}

.game-link:hover .game-num {
    color: #f4012b;
}

.game-link-icon {
    font-size: 0.65rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.game-link:hover .game-link-icon {
    opacity: 1;
}

.game-num {
    font-size: 0.85rem;
    color: #666;
    font-weight: bold;
    transition: color 0.2s ease;
}

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

.placement-num {
    font-size: 1.25rem;
    font-weight: bold;
    color: #888;
    font-family: 'Apex', sans-serif;
}

.match-row.win .placement-num {
    color: #4ade80;
}

.match-row.top3 .placement-num {
    color: #fbbf24;
}

.match-row.top5 .placement-num {
    color: #60a5fa;
}

.match-info {
    display: flex;
    flex-direction: column;
}

.match-date {
    color: #fff;
    font-size: 0.85rem;
}

/* Legend Icon Column */
.match-legend-col {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 0 0.5rem;
}

.match-legend-col .legend-icon {
    width: 26px;
    height: 26px;
    filter: brightness(0) invert(1);  /* Makes black SVG white */
    opacity: 0.9;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.match-row:hover .match-legend-col .legend-icon {
    opacity: 1;
    transform: scale(1.15);
}

.match-legend {
    color: #888;
    font-size: 0.75rem;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.match-legend .legend-icon {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);  /* Makes black SVG white */
    transition: transform 0.2s ease, filter 0.2s ease;
}

.match-row:hover .match-legend .legend-icon {
    filter: brightness(0) invert(1);
    transform: scale(1.1);
}

.match-legend.team-comp {
    color: #9d4edd;
    font-style: normal;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.match-legend.team-comp i {
    font-size: 0.7rem;
    color: #7b2cbf;
}

.match-stats {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.match-stat {
    text-align: center;
    min-width: 40px;
}

.match-stat .stat-num {
    display: block;
    color: #fff;
    font-weight: bold;
    font-size: 0.95rem;
    font-family: 'Apex', sans-serif;
}

.match-stat .stat-type {
    display: block;
    color: #666;
    font-size: 0.65rem;
    text-transform: uppercase;
}

.match-stat.points .stat-num {
    color: #4ade80;
}

.match-stat.points .stat-num.negative {
    color: #ef4444;
}

.match-teammates {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 100px;
}

.teammate-name {
    color: #888;
    font-size: 0.8rem;
}

.no-teammates {
    color: #555;
    font-size: 0.8rem;
    font-style: italic;
}

/* Match History Pagination */
.match-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(244, 1, 43, 0.2);
    border-color: #f4012b;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn i {
    font-size: 0.75rem;
}

.pagination-info {
    color: #888;
    font-size: 0.9rem;
}

.pagination-info span {
    color: #fff;
    font-weight: bold;
}

/* Session History Section */
.session-history-section {
    padding: 0;
    margin-top: 1.5rem;
}

.session-history-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: none;
    flex-wrap: wrap;
    gap: 1rem;
}

.session-history-section .section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    color: #fff;
    margin: 0;
}

.session-history-section .section-header h2 i {
    color: #f4012b;
}

.session-count {
    color: #888;
    font-size: 0.85rem;
}

.session-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.session-row {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, rgba(13, 13, 13, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid #444;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.session-row:hover {
    background: linear-gradient(180deg, rgba(34, 34, 34, 0.95) 0%, rgba(20, 20, 20, 0.98) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.session-row.win {
    border-left-color: #4ade80;
    background: rgba(74, 222, 128, 0.05);
}

.session-row.top3 {
    border-left-color: #fbbf24;
    background: rgba(251, 191, 36, 0.05);
}

.session-row.top5 {
    border-left-color: #60a5fa;
    background: rgba(96, 165, 250, 0.05);
}

.session-placement {
    text-align: center;
}

.session-placement .placement-emoji {
    font-size: 1.5rem;
}

.session-placement .placement-num {
    font-size: 1.1rem;
    font-weight: bold;
    color: #888;
}

.session-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.session-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.session-date {
    color: #999;
    font-size: 0.8rem;
}

.session-division {
    color: #666;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.session-stat {
    text-align: center;
    min-width: 50px;
}

.session-stat .stat-num {
    display: block;
    color: #fff;
    font-weight: bold;
    font-size: 0.95rem;
}

.session-stat .stat-type {
    display: block;
    color: #666;
    font-size: 0.65rem;
    text-transform: uppercase;
}

.session-badge {
    min-width: 80px;
    text-align: right;
}

.session-badge .placement-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
    color: #fbbf24;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .session-row {
        grid-template-columns: 50px 1fr;
        gap: 0.75rem;
    }

    .session-stats {
        display: none;
    }

    .session-badge {
        display: none;
    }
}

/* No Stats State */
.no-stats-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-top-row > .no-stats-container {
    align-self: stretch;
    min-width: 0;
    box-sizing: border-box;
}

.profile-top-row > .no-stats-container > .no-stats-card {
    flex: 1;
    align-self: stretch;
    justify-content: center;
    min-width: 0;
    box-sizing: border-box;
}

.no-stats-card {
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, rgba(13, 13, 13, 0.98) 100%);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.no-stats-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(244, 1, 43, 0.2), rgba(244, 1, 43, 0.1));
    border: 1px solid rgba(244, 1, 43, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.no-stats-icon i {
    font-size: 1.5rem;
    color: #f4012b;
}

.no-stats-card h3 {
    font-family: 'Apex', sans-serif;
    font-size: 1.25rem;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.no-stats-subtitle {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
    max-width: 400px;
}

.als-id-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #333;
    margin: 0.5rem 0;
}

.als-id-badge .als-label {
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.als-id-badge code {
    background: transparent;
    padding: 0;
    color: #4ade80;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.no-stats-cta {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
}

.btn-play-now {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid #f4012b;
    border-radius: 8px;
    color: #f4012b;
    font-family: 'Apex', sans-serif;
    font-size: 0.85rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.btn-play-now:hover {
    background: #f4012b;
    color: #fff;
}

.btn-connect {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    background: #f4012b;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: 'Apex', sans-serif;
    font-size: 0.85rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    margin-top: 0.5rem;
    white-space: nowrap;
}

.btn-connect:hover {
    background: #d4001f;
}

/* Match History Empty Placeholder — mimics a match-row to suggest what the tab shows */
.match-placeholder {
    border-left: 3px dashed #444 !important;
    background: rgba(255, 255, 255, 0.015) !important;
    cursor: default !important;
    opacity: 0.75;
}
.match-placeholder:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}
.placeholder-icon {
    color: #444;
    font-family: 'Apex', sans-serif;
    font-size: 1.25rem;
}
.match-placeholder-text {
    color: #555;
    font-style: italic;
}
.match-placeholder-legend {
    color: #444;
    font-size: 20px;
}
.stat-num-placeholder {
    color: #444 !important;
}
.play-first-match-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: #f4012b;
    color: #fff;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}
.play-first-match-btn:hover {
    background: #d4001f;
    color: #fff;
    text-decoration: none;
}
.play-first-match-btn i {
    font-size: 0.7rem;
    transition: transform 0.2s;
}
.play-first-match-btn:hover i {
    transform: translateX(3px);
}

/* Responsive */
@media (max-width: 1100px) {
    .stats-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .profile-top-section {
        grid-template-columns: 1fr;
    }

    .player-card {
        order: -1;
    }

    .match-row {
        grid-template-columns: 40px 80px 30px 1fr;
    }

    .match-teammates {
        display: none;
    }
}

@media (max-width: 600px) {
    .profile-page {
        padding: 1rem;
    }

    .player-card {
        padding: 1.5rem;
    }

    .player-username {
        font-size: 1.25rem;
    }

    .avatar-img,
    .avatar-placeholder {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .account-actions {
        flex-direction: column;
    }

    .highlight-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .match-row {
        grid-template-columns: 50px 40px 1fr;
        gap: 0.5rem;
    }

    .match-placement {
        text-align: left;
    }

    .match-stats {
        justify-content: space-between;
    }
}

/* Division Management Styles */
.division-management-card {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid #333;
}

.division-card-header {
    margin-bottom: 1.5rem;
}

.division-card-header h3 {
    font-family: 'Apex-Black', sans-serif;
    font-size: 1.25rem;
    color: #fff;
    margin: 0;
}

.division-card-header h3 i {
    color: #f4012b;
    margin-right: 0.5rem;
}

.division-current {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #333;
}

.division-badge {
    display: inline-flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: #0d0d0d;
    border: 2px solid #333;
}

.division-badge.badge-open {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.division-badge.badge-lower {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.division-name {
    font-family: 'Apex-Black', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    letter-spacing: 1px;
}

.division-status {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.division-status.status-open_verified,
.division-status.status-lower_verified {
    color: #10b981;
}

.division-status.status-lower_pending {
    color: #f59e0b;
}

.division-status.status-rejected {
    color: #ef4444;
}

.division-status.status-unset {
    color: #6b7280;
}

.division-reason {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.85rem;
}

.division-reason i {
    margin-right: 0.5rem;
}

.division-pending-info {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
}

.division-pending-info p {
    color: #fcd34d;
    font-size: 0.85rem;
    margin: 0 0 1rem 0;
}

.division-pending-info i {
    margin-right: 0.5rem;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #5865F2;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-discord:hover {
    background: #4752C4;
}

.division-actions {
    margin-top: 1rem;
}

.division-actions h4 {
    font-family: 'Apex-Black', sans-serif;
    font-size: 1rem;
    color: #fff;
    margin: 0 0 0.5rem 0;
}

.division-swap-note {
    color: #888;
    font-size: 0.85rem;
    margin: 0 0 1rem 0;
}

.division-swap-form {
    display: inline-block;
}

.btn-swap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    color: #f4012b;
    border: 2px solid #f4012b;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-swap:hover {
    background: #f4012b;
    color: #fff;
}

.btn-swap i {
    font-size: 0.85rem;
}

/* Region Settings Styles */
.region-settings-card {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid #333;
}

.region-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.region-description {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
}

.region-form {
    display: inline-block;
}

.region-select-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.region-select {
    padding: 0.75rem 1rem;
    background: #0d0d0d;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    min-width: 200px;
}

.region-select:focus {
    outline: none;
    border-color: #f4012b;
}

.region-select option {
    background: #1a1a1a;
    color: #fff;
}

.current-region-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.region-label {
    color: #888;
    font-size: 0.85rem;
}

.region-value {
    color: #4ade80;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ============================================
   LEGEND STATS SECTION
   ============================================ */
.legend-stats-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid #333;
}

.legend-stats-section .section-header {
    margin-bottom: 1.5rem;
}

.legend-stats-section .section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.legend-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.legend-card {
    background: #0d0d0d;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #333;
}

.legend-card.best {
    border-color: #f4012b;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a0a0d 100%);
}

.legend-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.legend-card-title {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-card-badge {
    font-size: 0.65rem;
    color: #f4012b;
    background: rgba(244, 1, 43, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.legend-card-content .legend-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    font-family: 'Apex', sans-serif;
}

.legend-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    border-bottom: 1px solid #222;
}

.legend-stat-row:last-child {
    border-bottom: none;
}

.legend-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.legend-stat-value.highlight {
    color: #f4012b;
    font-size: 1.1rem;
}

.legend-stat-label {
    font-size: 0.75rem;
    color: #666;
}

/* All Legends Table */
.all-legends-table {
    margin-top: 1rem;
}

.all-legends-table h4 {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.legends-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.legends-table th {
    text-align: left;
    padding: 0.5rem;
    color: #666;
    font-weight: 500;
    border-bottom: 1px solid #333;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.legends-table td {
    padding: 0.5rem;
    color: #ccc;
    border-bottom: 1px solid #222;
}

.legends-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.legend-name-cell {
    font-weight: 600;
    color: #fff;
}

/* ============================================
   PERFORMANCE TRENDS SECTION (Legacy/Fallback)
   ============================================ */
.performance-trends-section:not(.full-width) {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid #333;
}

.performance-trends-section:not(.full-width) .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.performance-trends-section:not(.full-width) .section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.section-subtitle {
    font-size: 0.8rem;
    color: #666;
}

.charts-container:not(.charts-container-fullwidth) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.chart-card:not(.chart-card-large):not(.chart-card-medium):not(.chart-card-wide) {
    background: #0d0d0d;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #333;
}

.chart-card:not(.chart-card-large):not(.chart-card-medium):not(.chart-card-wide) h4 {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
    font-weight: 500;
}

.chart-card:not(.chart-card-large):not(.chart-card-medium):not(.chart-card-wide) canvas {
    max-height: 200px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .legend-stats-cards {
        grid-template-columns: 1fr;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }

    .legends-table {
        font-size: 0.75rem;
    }

    .legends-table th,
    .legends-table td {
        padding: 0.35rem;
    }
}/* ═══════════════════════════════════════════════════════════
   PLAYER CARD CUSTOMISATION — Feature 3: Custom Card Border
   ═══════════════════════════════════════════════════════════ */
.player-card-unified {
    --card-border: rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.player-card-unified.has-custom-border {
    border-color: var(--card-border);
    box-shadow: 0 0 20px color-mix(in srgb, var(--card-border) 30%, transparent);
}
/* ═══════════════════════════════════════════════════════════
   PLAYER CARD CUSTOMISATION — Feature 1: Player Title
   ═══════════════════════════════════════════════════════════ */
.player-title-display {
    font-family: 'Apex', 'URW', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin: 0 0 5px;
    line-height: 1;
}
.player-title-display.title-gold   { color: #fbbf24; }
.player-title-display.title-silver { color: #c0c4cc; }
.player-title-display.title-bronze { color: #cd7f32; }
.player-title-display.title-elite  { color: #a5b4fc; }
.set-title-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: rgba(255,255,255,0.4);
    font-size: 10px;
    letter-spacing: 0.8px;
    padding: 2px 7px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.set-title-btn:hover {
    border-color: rgba(255,255,255,0.35);
    color: rgba(255,255,255,0.75);
}
/* Title Picker Modal */
.title-picker-section-label {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin: 1rem 0 0.5rem;
    text-align: left;
}
.title-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}
.title-option-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
}
.title-option-chip:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
}
.title-option-chip.selected {
    background: rgba(244,1,43,0.12);
    border-color: rgba(244,1,43,0.5);
    color: #fff;
}
/* Earned chips — gold look in picker modal */
.title-option-chip.earned {
    background: rgba(255,215,0,0.07);
    border-color: rgba(255,215,0,0.35);
    color: #ffd700;
    position: relative;
    overflow: hidden;
}
.title-option-chip.earned::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
    animation: earnedTitleShimmer 2.8s ease-in-out infinite;
    pointer-events: none;
}
.title-option-chip.earned:hover {
    background: rgba(255,215,0,0.14);
    border-color: rgba(255,215,0,0.6);
    color: #ffe44d;
}
.title-option-chip.earned.selected { background: rgba(255,215,0,0.15); border-color: rgba(255,215,0,0.65); color: #ffe44d; }
.title-option-chip.earned.selected.rank-1  { background: rgba(255,215,0,0.15); border-color: rgba(255,215,0,0.7);  color: #ffd700; }
.title-option-chip.earned.selected.rank-2  { background: rgba(255,215,0,0.12); border-color: rgba(255,215,0,0.55); color: #ffd700; }
.title-option-chip.earned.selected.rank-3  { background: rgba(255,215,0,0.12); border-color: rgba(255,215,0,0.5);  color: #ffd700; }
.title-option-chip.earned.selected.rank-45 { background: rgba(255,215,0,0.10); border-color: rgba(255,215,0,0.45); color: #ffd700; }
@keyframes earnedTitleShimmer {
    0%        { left: -100%; }
    60%, 100% { left: 125%; }
}
@keyframes earnedTitleGlow {
    0%, 100% {
        text-shadow: 0 0 4px rgba(255,215,0,.5), 0 0 8px rgba(255,215,0,.25);
        filter: brightness(1);
    }
    50% {
        text-shadow: 0 0 8px rgba(255,215,0,1), 0 0 18px rgba(255,215,0,.55), 0 0 32px rgba(255,215,0,.2);
        filter: brightness(1.18);
    }
}
.title-modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 10px;
}
.title-modal-clear-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.title-modal-clear-btn:hover {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.7);
}
.title-modal-save-btn {
    background: #f4012b;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 8px 24px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.title-modal-save-btn:hover { background: #d0011f; }
/* ═══════════════════════════════════════════════════════════
   PLAYER CARD CUSTOMISATION — Feature 2: Pinned Stat Tiles
   ═══════════════════════════════════════════════════════════ */
.pinned-stat-tiles {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 8px 0 6px;
    flex-shrink: 0;
    width: 100%;
}
.pinned-stat-tile {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 66px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
    padding: 6px 8px;
    box-sizing: border-box;
}
/* Red accent bar along the top of every filled tile */
.pinned-stat-tile:not(.empty)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: rgba(244,1,43,0.55);
    border-radius: 0 0 2px 2px;
}
.pinned-stat-tile:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}
.pinned-stat-tile.empty {
    border: 1px dashed rgba(255,255,255,0.1);
    background: transparent;
}
.pinned-stat-tile.empty:hover {
    border-color: rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.03);
}
.pinned-tile-label {
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.38);
    line-height: 1;
    margin-bottom: 5px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.pinned-tile-value {
    font-family: 'Apex', 'URW', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 1px;
}
.pinned-tile-empty-icon {
    font-size: 18px;
    color: rgba(255,255,255,0.18);
    line-height: 1;
    margin-bottom: 3px;
}
.pinned-tile-empty-label {
    font-size: 9px;
    color: rgba(255,255,255,0.18);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
/* Inline stat picker dropdown */
.pinned-stat-picker {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 6px 0;
    min-width: 150px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    display: none;
    max-height: 220px;
    overflow-y: auto;
}
.pinned-stat-picker.open { display: block; }
.pinned-picker-item {
    padding: 7px 14px;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: background 0.1s ease;
    white-space: nowrap;
    text-align: left;
}
.pinned-picker-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.pinned-picker-item.clear-item {
    color: rgba(244,1,43,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 3px;
}
.pinned-picker-item.clear-item:hover { background: rgba(244,1,43,0.08); color: #f4012b; }
/* ═══════════════════════════════════════════════════════════
   PLAYER CARD CUSTOMISATION — Feature 3: Card Style Sidebar
   ═══════════════════════════════════════════════════════════ */
.card-style-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 12px;
}
.card-style-section-header {
    font-size: 11px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.card-style-section-header .premium-lock {
    font-size: 10px;
    color: #eab308;
    opacity: 0.8;
}
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}
.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}
.color-swatch:hover { transform: scale(1.2); }
.color-swatch.active { border-color: #fff; transform: scale(1.15); }
.color-swatch.reset-swatch {
    background: rgba(255,255,255,0.12);
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.15);
}
.color-custom-input {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}
.color-custom-input label {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.5px;
}
.color-custom-input input[type="color"] {
    width: 28px;
    height: 22px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    background: none;
    cursor: pointer;
    padding: 1px;
}
.card-style-save-btn {
    margin-top: 8px;
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.card-style-save-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
/* No-stats card — inline, side-by-side with Player Card */
.no-stats-card--inline {
    flex: 1;
    align-self: stretch;
    justify-content: center;
    min-width: 0;
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════
   PROFILE HEADER — full-width banner redesign
   ═══════════════════════════════════════════════════════════ */

/* Stack the banner header above the stats dashboard */
.profile-main-layout {
    flex-direction: column;
    align-items: stretch;
}
.profile-main-layout .profile-top-row {
    flex: 0 0 auto;
    width: 100%;
}

/* The unified card becomes a full-width header */
.player-card-unified.profile-header {
    --ph-avatar: 190px;
    --ph-gap: 36px;
    --ph-left: 32px;
    --ph-banner-h: 150px;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 320px;
    flex: 1 1 auto;
    padding: 0;
    text-align: left;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, rgba(13, 13, 13, 0.98) 100%);
}

/* ── Top band (banner) ── */
.profile-header .ph-banner {
    position: relative;
    height: var(--ph-banner-h);
    flex: 0 0 var(--ph-banner-h);
    background:
        linear-gradient(135deg, rgba(244, 1, 43, 0.55) 0%, rgba(244, 1, 43, 0.18) 45%, rgba(26, 26, 26, 0) 75%),
        linear-gradient(180deg, #2a2a2a 0%, #141414 100%);
    overflow: hidden;
}
.profile-header .ph-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.profile-header .ph-banner::after {
    /* soft gradient so the name row stays legible over any image */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(13, 13, 13, 0.35) 100%);
    pointer-events: none;
}

/* Banner controls (Premium) — bottom-left of banner */
.profile-header .ph-banner-controls {
    position: absolute;
    bottom: 12px;
    left: 14px;
    display: flex;
    gap: 8px;
    z-index: 6;
}
.profile-header .ph-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s, border-color 0.2s;
}
.profile-header .ph-banner-btn:hover {
    background: rgba(0, 0, 0, 0.65);
    border-color: rgba(255, 255, 255, 0.45);
}
.profile-header .ph-banner-btn.ph-banner-remove {
    padding: 6px 9px;
}

/* Top-right actions: premium badge + edit card */
.profile-header .ph-banner-actions {
    position: absolute;
    top: 12px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 6;
}
.profile-header .ph-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-family: 'Apex', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s, border-color 0.2s;
}
.profile-header .ph-edit-btn:hover {
    background: rgba(0, 0, 0, 0.65);
    border-color: rgba(255, 255, 255, 0.45);
}
.profile-header .ph-edit-btn i { color: #f4012b; }
.profile-header .ph-premium-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.18);
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

/* ── Avatar (overlapping both bands) ── */
.profile-header .ph-avatar {
    position: absolute;
    left: var(--ph-left);
    top: 50%;
    transform: translateY(-50%);
    width: var(--ph-avatar);
    height: var(--ph-avatar);
    z-index: 7;
}
.profile-header .ph-avatar .avatar-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-header .ph-avatar .avatar-img,
.profile-header .ph-avatar .avatar-placeholder {
    width: var(--ph-avatar);
    height: var(--ph-avatar);
    min-width: var(--ph-avatar);
    min-height: var(--ph-avatar);
    border-radius: 50%;
    border: 4px solid #f4012b;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}
.profile-header .ph-avatar .avatar-region-flag {
    bottom: -6px;
    right: 0;
    width: 60px;
    height: 60px;
}

/* ── Name row (overlaid at the bottom of the banner) ── */
.profile-header .ph-name-row {
    position: absolute;
    left: calc(var(--ph-left) + var(--ph-avatar) + var(--ph-gap));
    top: calc(var(--ph-banner-h) - 18px);
    transform: translateY(-100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    z-index: 6;
}
.profile-header .player-username-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.profile-header .ph-name-topline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.profile-header .player-username {
    font-size: 2rem;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.profile-header .ph-platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 0.95rem;
    backdrop-filter: blur(4px);
}
.profile-header .player-title-display {
    margin: 0;
}
.profile-header .ph-pills {
    display: flex;
    gap: 8px;
    align-items: center;
}
.profile-header .ph-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    font-family: 'Apex', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
}
.profile-header .ph-pill i { color: #f4012b; font-size: 0.7rem; }
.profile-header .ph-pill .ph-pill-label {
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.62rem;
}
.profile-header .ph-pill .ph-pill-value {
    color: #fff;
    font-weight: 700;
}
.profile-header .ph-points-pill i { color: #ffd700; }
/* Temporary hide — Points is not a real metric yet */
.profile-header .ph-points-pill {
    display: none;
}

/* ── Bottom band (info row + stats strip) ── */
.profile-header .ph-info-band {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 24px 18px calc(var(--ph-left) + var(--ph-avatar) + var(--ph-gap));
    min-height: 170px;
}
.profile-header .ph-info-row {
    display: flex;
    align-items: flex-start;
    gap: 26px;
    order: 2;
}
.profile-header .ph-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 0 0 auto;
}
.profile-header .ph-col-label {
    font-family: 'Apex', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
}
.profile-header .ph-col-value {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.3;
    white-space: nowrap;
    text-transform: uppercase;
}
.profile-header .ph-col-value-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-header .ph-region-flag-icon {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}
.profile-header .ph-about {
    flex: 1 1 40%;
    min-width: 180px;
}
.profile-header .ph-about-value {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.profile-header .ph-bio-input {
    flex: 1;
    min-width: 0;
    resize: none;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
    line-height: 1.35;
    font-family: inherit;
    padding: 0;
    outline: none;
}
.profile-header .ph-bio-input:disabled {
    color: rgba(255, 255, 255, 0.88);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.88);
    opacity: 1;
}
.profile-header .ph-bio-input:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 8px;
    color: #fff;
}
.profile-header .ph-bio-btn {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    padding: 4px 9px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.profile-header .ph-bio-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.profile-header .ph-spacer {
    flex: 1 1 20px;
}
.profile-header .ph-follow {
    flex: 0 0 auto;
}
.profile-header .ph-social-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.profile-header .ph-social-empty {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.35);
}

/* ── Stats strip (MMR + pinned stats) ── */
.profile-header .ph-stats-strip {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 2px;
    order: 1;
}
.profile-header .ph-mmr.profile-mmr-circle {
    flex: 0 0 auto;
}
.profile-header .pinned-stat-tiles {
    flex: 1 1 auto;
    margin: 0;
    width: auto;
    justify-content: flex-start;
}
.profile-header .pinned-stat-tile {
    flex: 1 1 110px;
    max-width: 132px;
    height: 44px;
    border-radius: 8px;
    padding: 5px 8px;
}
.profile-header .pinned-tile-label {
    font-size: 8px;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
}
.profile-header .pinned-tile-value {
    font-size: 14px;
    letter-spacing: 0.5px;
}
.profile-header .pinned-tile-empty-icon {
    font-size: 14px;
    margin-bottom: 2px;
}
