/* Account / profile pages — loaded in <head> to avoid FOUC */

/* Rank Crown Badge Instant Tooltip */
.rank-crown-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--badge-color, #ffd700);
    cursor: default;
}

.rank-crown-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(15, 15, 30, 0.95);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid var(--badge-color, #ffd700);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.1s ease, transform 0.1s ease;
    z-index: 100;
}

.rank-crown-badge:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* Faster paint: solid panels instead of heavy backdrop-blur stacks */
.profile-page .glass-panel,
.friends-page .glass-panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(15, 15, 35, 0.92);
}

/* ── Auth (login / register) ── */
.account-auth-page {
    display: flex;
    justify-content: center;
    padding: 24px 16px 64px;
}
.account-auth-shell {
    width: 100%;
    max-width: 400px;
}
.account-auth-hero {
    text-align: center;
    margin-bottom: 18px;
}
.account-auth-icon {
    font-size: 1.75rem;
    color: var(--accent, #ff0033);
    margin-bottom: 10px;
    filter: drop-shadow(0 0 16px var(--accent-glow, rgba(255, 0, 51, 0.45)));
}
.account-auth-title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
}
.account-auth-panel {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 24px 22px 26px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 26, 0.88);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.account-auth-form { display: flex; flex-direction: column; gap: 14px; }
.account-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.88rem;
    color: var(--text-muted, #9aa0b4);
}
.account-field input,
.account-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.98rem;
}
.account-field select option { color: #111; }
.account-field input:focus,
.account-field select:focus {
    outline: none;
    border-color: var(--accent, #ff0033);
}
.account-field input:disabled,
.account-field input[readonly] {
    opacity: 0.65;
    cursor: not-allowed;
}
.account-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted, #9aa0b4);
    cursor: pointer;
    user-select: none;
}
.account-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent, #ff0033);
    cursor: pointer;
}
.account-submit {
    margin-top: 4px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 999px;
    background: var(--accent, #ff0033);
    color: #fff;
    font-weight: 600;
    font-size: 0.98rem;
    cursor: pointer;
}
.account-submit:hover { filter: brightness(1.08); }
.account-switch {
    margin: 18px 0 0;
    text-align: center;
    color: var(--text-muted, #9aa0b4);
    font-size: 0.9rem;
}
.account-switch a { color: #fff; text-decoration: underline; }
.account-alert {
    padding: 11px 13px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}
.account-alert-error {
    background: rgba(255, 0, 51, 0.15);
    border: 1px solid rgba(255, 0, 51, 0.35);
}
.account-alert-success {
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.35);
}
@media (max-width: 560px) {
    .account-auth-page { padding: 12px 12px 48px; }
    .account-auth-panel { padding: 20px 16px 22px; }
    .account-auth-title { font-size: 1.4rem; }
}

/* ── Profile edit ── */
.profile-edit-panel { max-width: 520px; margin: 0 auto 48px; padding: 28px 24px 32px; }
.profile-edit-back { margin: 0 0 8px; }
.profile-edit-back a { color: var(--text-muted, #9aa0b4); text-decoration: none; }
.profile-edit-back a:hover { color: #fff; }
.profile-edit-block {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 14px 8px;
    margin: 0;
}
.profile-edit-block legend {
    padding: 0 6px;
    font-size: 0.85rem;
    color: var(--text-muted, #9aa0b4);
}
.profile-edit-panel .account-field { margin-bottom: 14px; }
.profile-edit-panel .account-field label { margin-bottom: 8px; font-size: 0.9rem; }
.profile-edit-panel .account-field input,
.profile-edit-panel .account-field select { padding: 12px 14px; font-size: 1rem; }
.profile-edit-panel .account-submit { margin-top: 8px; font-size: 1rem; }
.profile-edit-panel .account-alert { margin-bottom: 18px; font-size: 0.92rem; }
.field-hint {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: var(--text-muted, #9aa0b4);
    line-height: 1.35;
}

/* ── Profile (own + public) ── */
.profile-page { max-width: 1100px; margin: 0 auto 48px; padding: 0 16px; }
.profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.profile-identity { display: flex; align-items: center; gap: 16px; }
.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    object-fit: cover;
    border: 2px solid rgba(255, 0, 51, 0.45);
    background: #12121f;
}
.profile-username { margin: 0 0 6px; font-size: 1.6rem; }
.profile-meta { margin: 0; color: var(--text-muted, #9aa0b4); }
.profile-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.92rem;
}
.profile-edit-btn:hover { border-color: var(--accent, #ff0033); }
.profile-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.profile-edit-btn-ghost { background: transparent; }
.profile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent, #ff0033);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}
.profile-country {
    opacity: 0.85;
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.profile-country i { color: var(--accent, #ff0033); font-size: 1rem; }
.profile-edit-btn[hidden],
.profile-friend-label[hidden] {
    display: none !important;
}
.profile-friend-label {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--text-muted, #9aa0b4);
    font-size: 0.92rem;
}
.profile-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
    align-items: start;
}
.profile-card,
.profile-section { padding: 18px; }
.profile-card h2,
.profile-section-head h2 {
    margin: 0 0 14px;
    font-size: 1rem;
    letter-spacing: 0.02em;
}
.profile-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.profile-section-head span { color: var(--text-muted, #9aa0b4); font-size: 0.9rem; }
.profile-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.profile-stats li {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    gap: 10px;
    align-items: center;
    color: var(--text-muted, #9aa0b4);
    font-size: 0.92rem;
}
.profile-stats i { color: var(--accent, #ff0033); }
.profile-stats strong { color: #fff; }
.profile-empty { color: var(--text-muted, #9aa0b4); margin: 0; font-size: 0.92rem; }
.profile-main { display: grid; gap: 18px; }
.profile-thumb-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}
.profile-thumb {
    display: block;
    text-decoration: none;
    color: #fff;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.profile-thumb:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 0, 51, 0.45);
}
.profile-thumb-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #12121f;
}
.profile-thumb-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease, filter 0.25s ease;
}
.profile-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.profile-thumb-hover-title {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (hover: hover) {
    .profile-thumb:hover .profile-thumb-overlay { opacity: 1; }
    .profile-thumb:hover .profile-thumb-media img {
        transform: scale(1.05);
        filter: brightness(1.05);
    }
}
.profile-load-more {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}
.profile-load-more:hover { border-color: var(--accent, #ff0033); }
.profile-load-more[hidden] { display: none !important; }
.profile-load-more.is-loading { opacity: 0.6; pointer-events: none; }
.profile-modal[hidden] { display: none !important; }
.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 16px;
}
.profile-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.65); }
.profile-modal-panel {
    position: relative;
    width: min(520px, 100%);
    padding: 20px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: auto;
}
.profile-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}
.profile-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
}
#avatarForm {
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    min-height: 0;
    overflow: hidden;
    margin: 0;
}
.avatar-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 12px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 6px;
    margin-bottom: 0;
    flex: 0 1 auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.avatar-catalog::-webkit-scrollbar {
    width: 6px;
}
.avatar-catalog::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.avatar-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}
.avatar-option input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    margin: 0;
}
.avatar-option img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    display: block;
}
.avatar-option:has(input:checked), .avatar-option.selected-avatar {
    border-color: var(--accent, #ff0033);
    box-shadow: 0 0 0 2px var(--accent, #ff0033);
    background: rgba(255, 0, 51, 0.08);
}
.avatar-modal-footer {
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.avatar-modal-footer .account-submit {
    margin-top: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-modal-footer .account-submit[disabled], button#btnSaveAvatar[disabled] {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(60%);
    box-shadow: none !important;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@media (max-width: 900px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-thumb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .profile-thumb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================
   🔒 AUTH MODAL & HEADER AUTH STYLES
   ========================================== */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.auth-modal-card {
    position: relative;
    width: min(440px, 100%);
    padding: 28px 24px;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 1;
    animation: authModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes authModalPop {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.auth-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}
.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.auth-modal-header {
    text-align: center;
    margin-bottom: 22px;
}
.auth-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 0, 51, 0.2) 0%, rgba(230, 0, 46, 0.1) 100%);
    border: 1px solid rgba(255, 0, 51, 0.3);
    color: var(--accent, #FF0033);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 12px;
}
.auth-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.3;
}
.auth-modal-subtitle {
    font-size: 0.88rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}
.auth-modal-socials {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.btn-social-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.google-auth-btn {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.google-auth-btn:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}
.discord-auth-btn {
    background: #5865F2;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}
.discord-auth-btn:hover {
    background: #4752C4;
    transform: translateY(-1px);
}
.auth-modal-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.auth-modal-divider::before,
.auth-modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}
.auth-modal-divider span {
    padding: 0 10px;
}
.auth-modal-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-modal-tab {
    flex: 1;
    padding: 9px 12px;
    background: none;
    border: none;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.auth-modal-tab.active {
    background: linear-gradient(135deg, #FF0033 0%, #E6002E 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 0, 51, 0.35);
}

/* Header User Profile & Auth Trigger Styles */
.header-auth-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #FF0033 0%, #E6002E 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.88rem;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 0, 51, 0.35);
    transition: all 0.2s ease;
}
.header-auth-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 0, 51, 0.45);
}
.header-user-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.header-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3px 8px 3px 3px;
    border-radius: 30px;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.header-user-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 0, 51, 0.5);
    box-shadow: 0 0 12px rgba(255, 0, 51, 0.25);
}
.header-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent, #FF0033);
}

/* User Profile Dropdown Menu with Hover Bridge */
.header-user-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-bottom: 8px;
    margin-bottom: -8px;
}
.header-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 210px;
    background: rgba(30, 41, 59, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 1000;
    backdrop-filter: blur(12px);
}
.header-user-dropdown::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}
.header-user-menu:hover .header-user-dropdown,
.header-user-menu:focus-within .header-user-dropdown {
    display: flex;
}
.header-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.15s ease;
}
.header-dropdown-item:hover {
    background: rgba(249, 115, 22, 0.15);
    color: #ffffff;
}
.header-dropdown-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Mobile Header Clean Layout Override */
@media (max-width: 768px) {
    .header-inner {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 16px !important;
    }
    .header-mobile-logo {
        position: static !important;
        transform: none !important;
        display: flex !important;
        z-index: 1 !important;
    }
    .header-right-mobile {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
}

/* ── Friends ── */
.friends-back { margin: 0 0 14px; }
.friends-back a { color: var(--text-muted, #9aa0b4); text-decoration: none; }
.friends-back a:hover { color: #fff; }
.friends-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    margin-bottom: 14px;
}
.friends-tab {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}
.friends-tab span { opacity: 0.7; margin-left: 4px; }
.friends-tab.is-active {
    border-color: var(--accent, #ff0033);
    background: rgba(255, 0, 51, 0.12);
}
.friends-panel { padding: 16px; }
.friends-panel[hidden],
.friend-list[hidden],
.profile-empty[hidden] { display: none !important; }
.friend-list { display: grid; gap: 10px; }
.friend-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}
.friend-card-main {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    min-width: 0;
}
.friend-card-main img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}
.friend-card-main strong { display: block; }
.friend-country {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted, #9aa0b4);
}
.friend-country i { color: var(--accent, #ff0033); }
.friend-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.friend-btn {
    padding: 8px 12px;
    border-radius: 999px;
    border: none;
    background: var(--accent, #ff0033);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}
.friend-btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
}
.friend-btn-danger {
    background: rgba(255, 0, 51, 0.25);
    border: 1px solid rgba(255, 0, 51, 0.4);
}
.friend-btn:disabled { opacity: 0.55; cursor: wait; }
.friends-page .account-alert { margin-bottom: 0; font-size: 0.92rem; }

/* Favorites share + report inbox */
.profile-section-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.profile-share-fav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.profile-share-fav-btn:hover {
    border-color: var(--accent, #ff0033);
    background: rgba(255, 0, 51, 0.12);
}
.report-inbox-card {
    padding: 16px 18px;
    display: grid;
    gap: 12px;
}
.report-inbox-card.has-reply {
    border: 1px solid rgba(52, 211, 153, 0.28);
}
.report-inbox-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.report-inbox-game {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.report-inbox-game img {
    width: 56px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
}
.report-inbox-game strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
}
.report-inbox-game small {
    color: var(--text-muted, #9aa0b4);
    font-size: 0.8rem;
}
.report-inbox-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted, #9aa0b4);
}
.report-badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}
.report-badge-replied {
    background: rgba(52, 211, 153, 0.18);
    color: #34d399;
}
.report-status {
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.report-status-new { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.report-status-investigating { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.report-status-fixed { background: rgba(52, 211, 153, 0.2); color: #6ee7b7; }
.report-status-invalid { background: rgba(244, 63, 94, 0.2); color: #fda4af; }
.report-inbox-message {
    margin: 0;
    color: var(--text-muted, #9aa0b4);
    font-size: 0.9rem;
    line-height: 1.45;
}
.report-inbox-reply {
    padding: 12px;
    border-radius: 10px;
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.report-inbox-reply-label {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    color: #6ee7b7;
    font-size: 0.8rem;
    font-weight: 600;
}
.report-inbox-reply-label time {
    color: var(--text-muted, #9aa0b4);
    font-weight: 400;
}
.report-inbox-reply p {
    margin: 0;
    color: #fff;
    font-size: 0.92rem;
    line-height: 1.5;
}
@media (max-width: 720px) {
    .profile-section-head-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

/* User Level Ring Tooltip */
.user-level-ring-wrapper {
    position: relative;
}
.user-level-ring-wrapper::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    white-space: nowrap;
    background: rgba(15, 23, 42, 0.96);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10001;
}
.user-level-ring-wrapper:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
