/* ==========================================
   PERIOD FILTER BAR
   ========================================== */

.profile-period-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 0 6px;
    margin-bottom: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 12px;
}

.profile-top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
    padding-bottom: 6px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.profile-top-controls .profile-period-bar {
    border-top: none;
    margin: 0;
    padding: 0;
}

.profile-view-bar {
    justify-content: flex-start;
    flex: 1 1 auto;
}

.profile-period-bar-right {
    justify-content: flex-end;
    flex: 0 0 auto;
    padding-top: 14px;
    padding-bottom: 6px;
    margin-bottom: 12px;
    margin-top: 8px;
}

.profile-period-btn {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.15s ease;
}

.profile-period-btn:hover:not([disabled]) {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.profile-period-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    font-weight: 600;
}

.profile-period-btn.disabled,
.profile-period-btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ==========================================
   PROFILE HUB PAGE
   ========================================== */

.profile-hub-page {
    max-width: 1140px;
    margin: 0 auto;
    padding: 22px;
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.5;
}

/* ==========================================
   HEADER
   ========================================== */

.profile-hub-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    min-height: 160px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
}

.profile-hub-identity {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-hub-avatar-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(3, 202, 252, 0.15);
    overflow: hidden;
    flex-shrink: 0;
}

.profile-hub-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-hub-text {
    min-width: 0;
}

.profile-hub-name {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-hub-tag {
    margin-top: 3px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 400;
}

.profile-hub-name-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.profile-hub-state {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.profile-hub-text-cs2 {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-hub-accounts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-hub-accounts.single {
    align-items: flex-start;
}

.profile-hub-account-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.profile-hub-account-icon {
    width: 15px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    flex-shrink: 0;
}

.profile-hub-account-icon svg {
    width: 15px;
    height: 15px;
    display: block;
}

.profile-hub-account-name {
    font-size: 13px;
    line-height: 1.2;
    color: #9ca3af;
    font-weight: 600;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 300px;
}

.profile-hub-text-cs2-single {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    width: auto;
    max-width: 100%;
}

.profile-hub-text-cs2-single .profile-hub-name-row {
    justify-content: flex-start;
}

.profile-follow-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: var(--font-family);
    white-space: nowrap;
    flex-shrink: 0;
}

.profile-follow-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.profile-follow-btn.following {
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
}

.profile-follow-btn.following:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.profile-follow-btn.active {
    border-color: #10b981;
    color: #10b981;
}

.profile-refresh-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
    flex-shrink: 0;
    padding: 0;
}

.profile-refresh-btn svg {
    width: 14px;
    height: 14px;
}

.profile-refresh-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.profile-refresh-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.profile-refresh-btn.busy svg {
    animation: profile-refresh-spin 0.9s linear infinite;
}

@keyframes profile-refresh-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   CIRCLES (HEADER STATS)
   ========================================== */

.profile-hub-circles-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-hub-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.profile-period-bar-inline {
    padding: 0;
    margin: 0;
}

.profile-hub-circles {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.profile-hub-circle-card {
    width: 110px;
    text-align: center;
}

.profile-hub-circle-label {
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.profile-hub-circle {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto;
}

.profile-hub-circle svg {
    width: 90px;
    height: 90px;
    transform: rotate(-90deg);
}

.profile-hub-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 7;
}

.profile-hub-circle-progress {
    fill: none;
    stroke-width: 7;
    stroke-linecap: round;
    will-change: stroke-dashoffset;
}

.profile-hub-circle-value {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.profile-hub-circle-meta {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    min-height: 18px;
}

/* ==========================================
   GAME MODE SWITCH
   ========================================== */

.profile-game-switch {
    display: grid;
    gap: 4px;
}

.profile-mode-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: var(--font-family);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.profile-mode-icon {
    width: 23px;
    height: 23px;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

.profile-mode-btn.active {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: rgba(3, 202, 252, 0.1);
}

.profile-mode-btn.disabled,
.profile-mode-btn:disabled {
    border-color: rgba(255, 255, 255, 0.05);
    color: rgba(156, 163, 175, 0.4);
    background: rgba(26, 32, 53, 0.5);
    cursor: not-allowed;
}

/* ==========================================
   MAIN GRID
   ========================================== */

.profile-hub-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.profile-hub-left,
.profile-hub-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==========================================
   CARDS
   ========================================== */

.profile-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    padding: 16px;
}

.profile-card h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.profile-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.profile-card-head h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    line-height: 1.2;
    white-space: nowrap;
}

/* ==========================================
   SORT BUTTONS
   ========================================== */

.profile-sort-group {
    display: inline-flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.profile-sort-btn {
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    cursor: pointer;
    font-family: var(--font-family);
    line-height: 1.2;
    transition: all 0.15s ease;
}

.profile-sort-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-card);
}

.profile-sort-btn.active {
    background: rgba(3, 202, 252, 0.15);
    color: var(--accent-primary);
}

/* ==========================================
   CHAMPION LIST
   ========================================== */

.profile-champion-list {
    display: grid;
    gap: 8px;
}

.profile-champion-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    background: var(--bg-tertiary);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.profile-champion-row:hover {
    background: var(--bg-card);
}

.profile-champion-row[data-champion-key] {
    cursor: pointer;
}

.profile-champion-row.expanded {
    border-color: rgba(3, 202, 252, 0.35);
    background: rgba(26, 34, 58, 0.9);
}

.profile-champion-tile {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.profile-champion-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.profile-champion-name-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
}

.profile-champion-toggle,
.profile-champion-name-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-family);
    color: inherit;
    padding: 0;
}

.profile-champion-toggle {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    border-radius: 6px;
    flex-shrink: 0;
    transition: color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}

.profile-champion-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transform: rotate(0deg);
    transform-origin: 50% 50%;
    will-change: transform;
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), color 0.18s ease;
}

.profile-champion-toggle-icon svg {
    width: 13px;
    height: 13px;
    display: block;
}

.profile-champion-toggle-icon.expanded {
    transform: rotate(90deg);
}

.profile-champion-name-toggle {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    text-align: left;
    min-width: 0;
    flex: 0 1 auto;
}

.profile-champion-toggle:active,
.profile-champion-name-toggle:active {
    transform: scale(0.96);
}

.profile-champion-toggle:hover,
.profile-champion-name-toggle:hover {
    color: var(--accent-primary);
}

.profile-champion-toggle:hover {
    background: rgba(3, 202, 252, 0.08);
}

.profile-champion-games,
.profile-champion-record {
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted);
}

.profile-champion-extra-stats {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.profile-champion-circles {
    display: flex;
    gap: 6px;
}

.profile-champion-circles .profile-mini-circle {
    width: 66px;
    height: 66px;
}

.profile-champion-circles .profile-mini-circle svg {
    width: 66px;
    height: 66px;
}

.profile-champion-circles .profile-mini-circle .profile-mini-circle-bg,
.profile-champion-circles .profile-mini-circle .profile-mini-circle-progress {
    stroke-width: 4.5;
}

.profile-champion-circles .profile-mini-circle span {
    font-size: 11px;
    line-height: 1.05;
}

.profile-champion-expand {
    grid-column: 1 / -1;
    height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: height 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease, margin-top 0.22s ease;
}

.profile-champion-expand.visible {
    opacity: 1;
    margin-top: 10px;
}

.profile-champion-expand-grid {
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-champion-expand-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.profile-champion-expand-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 1px 0;
}

.profile-champion-expand-item {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    background: rgba(15, 20, 35, 0.45);
    padding: 8px;
}

.profile-champion-expand-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-champion-expand-value {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-champion-expand-bar-track {
    margin-top: 7px;
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.profile-champion-expand-bar-fill {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #6b7280 0%, #ef4444 35%, #f59e0b 68%, #22c55e 100%);
    background-repeat: no-repeat;
    background-position: left center;
    transition: width 0.35s ease, background-size 0.35s ease;
}

.profile-champion-matchups {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-champion-matchups-head {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.profile-champion-matchups-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
}

.profile-champion-matchups-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.09);
}

.profile-champion-matchups-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-champion-matchups-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.profile-champion-matchups-list {
    display: grid;
    gap: 5px;
}

.profile-champion-matchup-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    background: rgba(15, 20, 35, 0.45);
    padding: 5px 7px;
}

.profile-champion-matchup-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.profile-champion-matchup-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
}

.profile-champion-matchup-name {
    min-width: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-champion-matchup-circles {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.profile-champion-matchups-empty {
    font-size: 11px;
    color: var(--text-muted);
    padding: 4px 2px;
}

.profile-mini-circle-matchup {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.profile-mini-circle-matchup svg {
    width: 34px;
    height: 34px;
}

.profile-mini-circle-matchup .profile-mini-circle-bg,
.profile-mini-circle-matchup .profile-mini-circle-progress {
    stroke-width: 4.5;
}

.profile-mini-circle-matchup span {
    font-size: 8px;
    line-height: 1.05;
    padding: 3px;
}

.profile-mini-circle-matchup-winrate span {
    font-size: 8px;
}

.profile-mini-circle-matchup-rating span {
    font-size: 8.4px;
}

.profile-champion-expand-footer {
    display: flex;
    align-items: center;
}

.profile-champion-view-matches-btn {
    width: 100%;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.profile-champion-view-matches-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-card);
    color: var(--text-primary);
}

.profile-champion-view-matches-btn:active {
    transform: scale(0.985);
}

/* ==========================================
   MINI CIRCLES
   ========================================== */

.profile-mini-circle {
    position: relative;
    width: 60px;
    height: 60px;
}

.profile-mini-circle svg {
    width: 60px;
    height: 60px;
    transform: rotate(-90deg);
}

.profile-mini-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 6;
}

.profile-mini-circle-progress {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    will-change: stroke-dashoffset;
}

.profile-mini-circle span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 9px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    overflow: hidden;
    text-align: center;
    padding: 2px;
}

/* ==========================================
   MASTERY
   ========================================== */

.profile-mastery-divider {
    margin: 12px 0;
    height: 1px;
    background: var(--border-color);
}

.profile-mastery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.profile-mastery-tile {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.profile-mastery-tile:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
}

.profile-mastery-img {
    width: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center top;
}

.profile-mastery-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1.2;
}

.profile-mastery-info {
    padding: 6px 7px 7px;
}

.profile-mastery-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.profile-mastery-points {
    margin-top: 2px;
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-card-champions-full,
.profile-card-mastery-list {
    min-height: 520px;
    display: flex;
    flex-direction: column;
}

.profile-champion-list-full,
.profile-mastery-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    max-height: 62vh;
}

.profile-mastery-list {
    display: grid;
    gap: 8px;
}

.profile-mastery-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    background: var(--bg-tertiary);
}

.profile-mastery-row-tile {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.profile-mastery-row-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-mastery-row-points {
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted);
}

.profile-mastery-row-meta {
    min-width: 0;
}

.profile-mastery-row-level {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-primary);
}

/* ==========================================
   RANK CARD
   ========================================== */

.profile-card-ranks {
    display: grid;
    grid-template-columns: 1fr auto auto auto 1fr;
    align-items: center;
    gap: 0;
}

.profile-rank-col {
    text-align: left;
    padding: 4px 16px;
}

.profile-rank-col-right {
    text-align: right;
}

.profile-rank-mid {
    display: flex;
    flex-direction: row;
    gap: 0;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}

.profile-rank-circle-pair {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.profile-rank-circle-lbl {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.profile-rank-divider {
    width: 1px;
    align-self: stretch;
    background: var(--border-color);
    margin: 4px 0;
}


.profile-rank-mode {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    line-height: 1.2;
}

.profile-rank-emblem-clip {
    width: 30px;
    height: 30px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-rank-emblem {
    width: 250%;
    height: 250%;
    object-fit: contain;
    display: block;
    transform: translateY(2%);
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.3));
}

.profile-rank-tier-row {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

.profile-rank-tier-row-right {
    justify-content: flex-end;
}

.profile-rank-tier {
    margin-top: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    white-space: nowrap;
}

.profile-rank-tier-unranked {
    font-size: 15px;
    color: var(--text-muted);
}

.profile-rank-lp,
.profile-rank-record {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-muted);
}


/* ==========================================
   ROLE CARD
   ========================================== */

.profile-card-role {
    display: grid;
    grid-template-columns: minmax(0, 200px) 1fr;
    gap: 16px;
}

.profile-role-stats {
    display: grid;
    gap: 12px;
    align-content: center;
}

.profile-role-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}

.profile-role-value {
    margin-top: 3px;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-role-main-inline {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.profile-role-main-inline img {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.profile-role-main-inline span {
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.profile-role-main-inline.empty span {
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0.01em;
}

.profile-role-bars {
    display: grid;
    align-content: stretch;
    border-left: 1px solid var(--border-color);
    padding-left: 14px;
}

.profile-role-chart {
    height: 100%;
    min-height: 130px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.profile-role-col {
    display: grid;
    gap: 6px;
    align-items: end;
    justify-items: center;
}

.profile-role-col-bar-bg {
    width: 100%;
    height: 72px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.profile-role-col-bar-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-role-col img {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.profile-cs2-map-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: 0.9;
}

.profile-cs2-map-icon-main {
    width: 18px;
    height: 18px;
}

.profile-cs2-map-icon-fallback {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.08);
}

.profile-role-col strong {
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    color: var(--text-muted);
}

.profile-mode-donut-wrap {
    display: grid;
    gap: 10px;
}

.profile-card-role-modes {
    grid-template-columns: minmax(0, 1fr) minmax(0, 178px);
}

.profile-mode-legend-panel {
    align-content: stretch;
    gap: 0;
    height: 100%;
}

.profile-mode-donut-panel {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-left: 8px;
}

.profile-mode-donut-shell {
    position: relative;
    width: 100%;
    max-width: 146px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
}

.profile-mode-donut-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.profile-mode-donut-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 18;
}

.profile-mode-donut-segment {
    fill: none;
    stroke-width: 18;
    stroke-linecap: butt;
    cursor: pointer;
    transition: stroke-dasharray 560ms cubic-bezier(0.22, 1, 0.36, 1),
        stroke-dashoffset 560ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.16s ease,
        filter 0.16s ease;
    shape-rendering: auto;
    pointer-events: stroke;
}

.profile-mode-donut-segment:hover,
.profile-mode-donut-segment:focus-visible {
    opacity: 0.55;
    filter: grayscale(1) saturate(0) brightness(1.05);
    outline: none;
}

.profile-mode-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.profile-mode-donut-center-value {
    font-size: 40px;
    line-height: 0.95;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.profile-mode-donut-center-label {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.profile-mode-donut-tooltip {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 4;
    pointer-events: none;
    min-width: 126px;
    max-width: 190px;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid rgba(92, 175, 255, 0.45);
    background: linear-gradient(170deg, rgba(24, 35, 58, 0.98), rgba(14, 23, 40, 0.96));
    box-shadow: 0 10px 20px rgba(2, 8, 23, 0.45);
}

.profile-mode-donut-tooltip-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.profile-mode-donut-tooltip-meta {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.profile-mode-donut-legend {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
    height: 100%;
    min-height: 146px;
}

.profile-mode-donut-legend-item {
    display: grid;
    grid-template-columns: 9px 1fr auto;
    align-items: center;
    gap: 8px;
    min-height: 20px;
    padding: 0 2px;
    border-radius: 6px;
    cursor: default;
    transform: translateY(0);
}

.profile-mode-donut-legend-item.reorder {
    transform: translateY(var(--legend-shift, 0px));
}

.profile-mode-donut-legend-item.reorder.ready {
    transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
    transform: translateY(0);
}

.profile-mode-donut-legend-item:focus-visible,
.profile-mode-donut-legend-item:hover {
    background: rgba(255, 255, 255, 0.04);
    outline: none;
}

.profile-mode-donut-legend-item.empty {
    opacity: 0.55;
}

.profile-mode-donut-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.profile-mode-donut-legend-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.profile-mode-donut-legend-value {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   CS2 PROFILE
   ========================================== */

.profile-hub-grid-cs2 {
    grid-template-columns: 1.1fr 0.9fr;
}

.profile-card-cs2-summary,
.profile-card-cs2-maps {
    display: grid;
    gap: 12px;
}

.profile-card-cs2-summary .profile-card-head {
    margin-bottom: 0;
}

.profile-cs2-summary-top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 6px 12px;
}

.profile-cs2-summary-top--single {
    grid-template-columns: minmax(0, 1fr);
}

.profile-cs2-summary-top-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.profile-cs2-summary-top-col-premier {
    align-items: center;
    text-align: center;
}

.profile-cs2-summary-top-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.profile-cs2-summary-premier {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    line-height: 1;
}

.profile-cs2-summary-premier .profile-cs2-summary-value {
    font-size: 28px;
}

.profile-cs2-summary-top-col-faceit {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 26px;
}

.profile-cs2-summary-faceit-main {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
}

.profile-cs2-summary-faceit-name {
    font-size: 24px;
    line-height: 1;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.profile-cs2-summary-faceit-sub {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 160px;
}

.profile-cs2-summary-faceit-ring-wrap {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-cs2-faceit-rank-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
}

.profile-cs2-faceit-rank-icon.empty {
    filter: grayscale(1);
}

.profile-cs2-summary-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.profile-cs2-summary-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    background: rgba(21, 31, 58, 0.7);
    padding: 12px 12px;
    min-height: 86px;
    display: grid;
    align-content: space-between;
    gap: 6px;
}

.profile-cs2-summary-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #93a0be;
}

.profile-cs2-summary-value {
    font-size: 34px;
    line-height: 1;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.profile-cs2-summary-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.profile-cs2-summary-map-ranks {
    display: grid;
    gap: 8px;
    padding-top: 10px;
}

.profile-cs2-map-rank-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.profile-cs2-map-rank-tile {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    background: rgba(21, 31, 58, 0.7);
    min-height: 132px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.profile-cs2-map-rank-tile.empty {
    opacity: 0.38;
}

.profile-cs2-map-rank-tile-logo-wrap {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(8, 14, 28, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-cs2-map-rank-tile-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
}

.profile-cs2-map-rank-tile-logo-fallback {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.profile-cs2-map-rank-tile-name {
    width: 100%;
    min-height: 16px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    text-align: center;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.profile-cs2-map-rank-tile-meta {
    width: 100%;
    display: grid;
    gap: 2px;
}

.profile-cs2-map-rank-tile-count {
    width: 100%;
    min-height: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #9ca3af;
    text-align: center;
}

.profile-cs2-map-rank-tile-rank {
    margin-top: auto;
    min-height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-cs2-map-rank-tile-rank img {
    width: 40px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.profile-cs2-map-rank-tile-rank-empty {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 700;
}

.profile-match-map-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.profile-match-map-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.profile-match-map-logo-fallback {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-cs2-map-list {
    display: grid;
    gap: 6px;
}

.profile-cs2-map-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    padding: 8px 10px;
}

.profile-cs2-map-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-cs2-map-rank img {
    width: 34px;
    height: 16px;
    object-fit: contain;
    display: block;
}

.profile-cs2-map-unranked {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ==========================================
   FRIENDS CARD
   ========================================== */

.profile-card-friends h3 {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.profile-friends-list {
    display: grid;
    gap: 6px;
}

.profile-friend-row {
    display: grid;
    grid-template-columns: 32px 1fr auto 56px;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    transition: background 0.15s ease;
    text-decoration: none;
    color: inherit;
}

.profile-friend-row:hover {
    background: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.1);
}

.profile-friend-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.profile-friend-info {
    min-width: 0;
}

.profile-friend-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-friend-games {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-muted);
}

.profile-friend-record,
.profile-friend-share {
    font-size: 12px;
    color: var(--text-secondary);
}

.profile-friend-winrate {
    display: flex;
    justify-content: flex-end;
}

.profile-mini-circle-sm {
    width: 46px;
    height: 46px;
}

.profile-mini-circle-sm svg {
    width: 46px;
    height: 46px;
}

.profile-mini-circle-sm span {
    font-size: 8px;
}

/* ==========================================
   MATCHES SECTION
   ========================================== */

.profile-card-matches {
    margin-top: 16px;
}

.profile-matches-view {
    margin-top: 0;
}

.profile-card-matches-full {
    margin-top: 0;
}

.profile-card-matches h3 {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.profile-matches-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.profile-matches-head h3 {
    margin: 0;
}

.profile-match-filter {
    position: relative;
    min-width: 260px;
    width: min(320px, 100%);
    z-index: 8;
}

.profile-match-filter-trigger {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.profile-match-filter-trigger:hover,
.profile-match-filter.open .profile-match-filter-trigger {
    border-color: var(--accent-primary);
    background: var(--bg-card);
    color: var(--text-primary);
}

.profile-match-filter-trigger-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-match-filter-trigger-icon,
.profile-match-filter-option-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.profile-match-filter-trigger-icon-all,
.profile-match-filter-option-icon-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
}

.profile-match-filter-trigger-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
}

.profile-match-filter-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.profile-match-filter-chevron svg {
    width: 14px;
    height: 14px;
    display: block;
}

.profile-match-filter.open .profile-match-filter-chevron {
    transform: rotate(180deg);
}

.profile-match-filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    padding: 10px;
    display: none;
}

.profile-match-filter.open .profile-match-filter-menu {
    display: block;
}

.profile-match-filter-search-wrap {
    margin-bottom: 8px;
}

.profile-match-filter-search {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 7px 10px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.profile-match-filter-search:focus {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: var(--bg-card);
}

.profile-match-filter-options {
    max-height: 280px;
    overflow-y: auto;
    display: grid;
    gap: 6px;
    padding-right: 2px;
}

.profile-match-filter-option {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.profile-match-filter-option:hover {
    border-color: rgba(3, 202, 252, 0.28);
    background: var(--bg-card);
    color: var(--text-primary);
}

.profile-match-filter-option.active {
    border-color: rgba(3, 202, 252, 0.42);
    background: rgba(3, 202, 252, 0.12);
    color: var(--text-primary);
}

.profile-match-filter-option-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
}

.profile-match-filter-option-count {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.profile-match-filter-option.hidden {
    display: none;
}

.profile-matches-table {
    width: 100%;
    border-collapse: collapse;
}

.profile-matches-table th,
.profile-matches-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    font-size: 13px;
}

.profile-matches-table th {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 10px;
    font-weight: 600;
    background: var(--bg-tertiary);
}

.profile-match-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.profile-match-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.profile-match-champ-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-match-role-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    flex-shrink: 0;
}

.profile-match-time {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.profile-match-mode {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.profile-matches-table th.profile-match-time,
.profile-matches-table td.profile-match-time {
    text-align: right;
}

.match-win {
    color: #10b981;
    font-weight: 600;
}

.match-loss {
    color: #ef4444;
    font-weight: 600;
}

/* ==========================================
   EMPTY / LOADING / ERROR STATES
   ========================================== */

.profile-empty-card {
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
}

.profile-loading-screen {
    min-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    padding: 24px 0;
}

.profile-loading-spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--accent-primary);
    animation: profileSpin 0.8s linear infinite;
}

.profile-loading-message {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
    max-width: min(560px, 88vw);
}

.profile-loading-progress {
    width: min(560px, 88vw);
}

.profile-loading-progress.hidden {
    display: none;
}

.profile-loading-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.profile-loading-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.22s linear;
    will-change: width;
}

.profile-loading-percent {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    min-height: 1em;
}

.profile-corner-loading {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: min(360px, calc(100vw - 24px));
    padding: 12px 12px 10px;
    border-radius: 12px;
    border: 1px solid rgba(96, 132, 196, 0.45);
    background: linear-gradient(165deg, rgba(15, 28, 58, 0.96), rgba(10, 20, 44, 0.94));
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    z-index: 1400;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.profile-corner-loading.show {
    opacity: 1;
    transform: translateY(0);
}

.profile-corner-loading-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.profile-corner-loading-message {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--text-primary);
}

.profile-corner-loading-progress {
    margin-top: 10px;
}

.profile-corner-loading-progress.hidden {
    display: none;
}

.profile-corner-loading-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    overflow: hidden;
}

.profile-corner-loading-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.22s linear;
    will-change: width;
}

.profile-corner-loading-percent {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
}

.profile-error-state {
    max-width: 900px;
    margin: 40px auto;
    color: var(--text-muted);
    text-align: center;
}

@keyframes profileSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1180px) {
    .profile-hub-grid {
        grid-template-columns: 1fr;
    }

    .profile-hub-name {
        font-size: 22px;
    }

    .profile-rank-tier {
        font-size: 16px;
    }
}

@media (max-width: 820px) {
    .profile-hub-page {
        padding: 12px;
    }

    .profile-hub-header {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .profile-hub-header-actions {
        justify-self: start;
    }

    .profile-hub-circles-wrap {
        width: 100%;
        justify-content: space-between;
    }

    .profile-top-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .profile-view-bar,
    .profile-period-bar-right {
        width: 100%;
        justify-content: flex-start;
        margin: 0;
        padding: 8px 0 4px;
    }

    .profile-card-head h3 {
        font-size: 13px;
    }

    .profile-matches-head {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-match-filter {
        width: 100%;
        min-width: 0;
    }

    .profile-match-filter-menu {
        left: 0;
        right: auto;
    }

    .profile-sort-btn {
        font-size: 11px;
        padding: 5px 9px;
    }

    .profile-champion-name {
        font-size: 13px;
    }

    .profile-card-ranks {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .profile-rank-mid {
        border: none;
        padding: 0;
        grid-auto-flow: column;
        justify-content: center;
    }

    .profile-card-role {
        grid-template-columns: 1fr;
    }

    .profile-role-value {
        font-size: 18px;
    }

    .profile-role-main-inline {
        min-height: 34px;
    }

    .profile-role-main-inline span {
        font-size: 12px;
    }

    .profile-role-bars {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 12px;
    }

    .profile-card-role-modes {
        grid-template-columns: 1fr;
    }

    .profile-mode-donut-panel {
        padding-left: 0;
    }

    .profile-cs2-summary-top {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 10px 2px 12px;
    }

    .profile-cs2-summary-top-col-faceit {
        justify-content: center;
        align-items: center;
        text-align: center;
        border-left: none;
        padding-left: 0;
    }

    .profile-cs2-summary-metrics {
        grid-template-columns: 1fr;
    }

    .profile-role-col strong {
        font-size: 11px;
    }

    .profile-mastery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-card-champions-full,
    .profile-card-mastery-list {
        min-height: 0;
    }

    .profile-champion-list-full,
    .profile-mastery-list {
        max-height: none;
    }

    .profile-mastery-row {
        grid-template-columns: 44px 1fr auto;
        gap: 10px;
    }

    .profile-mastery-row-tile {
        width: 44px;
        height: 44px;
    }

    .profile-champion-expand-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .profile-hub-avatar-wrap {
        width: 64px;
        height: 64px;
    }

    .profile-hub-name {
        font-size: 18px;
    }

    .profile-hub-tag {
        font-size: 12px;
    }

    .profile-hub-circle {
        width: 78px;
        height: 78px;
    }

    .profile-hub-circle svg {
        width: 78px;
        height: 78px;
    }

    .profile-hub-circle-value {
        font-size: 12px;
    }

    .profile-hub-circle-meta {
        font-size: 10px;
    }

    .profile-role-chart {
        min-height: 110px;
        gap: 6px;
        padding: 8px;
    }

    .profile-role-col-bar-bg {
        height: 60px;
    }

    .profile-mode-donut-shell {
        max-width: 138px;
    }

    .profile-mode-donut-center-value {
        font-size: 30px;
    }

    .profile-mode-donut-legend {
        gap: 0;
        min-height: 138px;
    }

    .profile-mode-donut-legend-label {
        font-size: 10px;
    }

    .profile-champion-row {
        grid-template-columns: 44px 1fr;
        grid-template-areas:
            'icon text'
            'circles circles';
    }

    .profile-champion-tile {
        grid-area: icon;
        width: 44px;
        height: 44px;
    }

    .profile-champion-meta {
        grid-area: text;
    }

    .profile-champion-circles {
        grid-area: circles;
        justify-content: flex-start;
        margin-top: 6px;
    }

    .profile-champion-circles .profile-mini-circle {
        width: 58px;
        height: 58px;
    }

    .profile-champion-circles .profile-mini-circle svg {
        width: 58px;
        height: 58px;
    }

    .profile-champion-circles .profile-mini-circle span {
        font-size: 10px;
    }

    .profile-champion-expand-row {
        grid-template-columns: 1fr;
    }

    .profile-champion-matchups-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .profile-champion-matchups-divider {
        width: 100%;
        height: 1px;
    }

    .profile-matches-table th,
    .profile-matches-table td {
        font-size: 11px;
        padding: 7px 5px;
    }

    .profile-match-filter-trigger-text,
    .profile-match-filter-option-label {
        font-size: 11px;
    }

    .profile-friend-row {
        grid-template-columns: 32px 1fr auto;
        grid-template-areas:
            'avatar info wr'
            'avatar record wr';
        row-gap: 4px;
    }

    .profile-friend-avatar {
        grid-area: avatar;
    }

    .profile-friend-info {
        grid-area: info;
    }

    .profile-friend-record {
        grid-area: record;
    }

    .profile-friend-winrate {
        grid-area: wr;
    }

    .profile-cs2-summary-faceit-name {
        font-size: 24px;
    }

    .profile-cs2-faceit-rank-icon {
        width: 32px;
        height: 32px;
    }

    .profile-cs2-summary-value {
        font-size: 30px;
    }

    .profile-cs2-map-rank-tile-logo-wrap {
        width: 50px;
        height: 50px;
    }

    .profile-cs2-map-rank-tile-logo {
        width: 38px;
        height: 38px;
    }
}
