/* ── PAGE ENTRY ANIMATION ── */
#profile-page {
    animation: profilePageIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes profilePageIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0);     }
}

/* ─────────────────────────────────────────
   HERO SECTION
───────────────────────────────────────── */
.prof-hero {
    position: relative;
    background: linear-gradient(145deg, #0f172a 0%, #1a1040 50%, #0f172a 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 24px;
    padding: 32px 24px 28px;
    margin-bottom: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.prof-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.prof-hero-bg::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 65%);
    border-radius: 50%;
}
.prof-hero-bg::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(236,72,153,0.1) 0%, transparent 65%);
    border-radius: 50%;
}

/* ── AVATAR RING ── */
.prof-avatar-ring-wrap {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.prof-avatar-ring {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(#6366f1, #8b5cf6, #ec4899, #6366f1);
    box-shadow: 0 0 30px rgba(99,102,241,0.4);
    animation: ringRotate 8s linear infinite;
    position: relative;
}
@keyframes ringRotate {
    to { filter: hue-rotate(360deg); }
}
.prof-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #0f172a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #6366f1;
    position: relative;
}
.prof-avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.prof-avatar-img .fa-user {
    opacity: 0.5;
}

/* ── HERO TEXT ── */
.prof-hero-info {
    position: relative;
    z-index: 1;
    width: 100%;
}
.prof-hero-name {
    font-size: clamp(1.4rem, 5vw, 2rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.prof-hero-badges {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.prof-level-badge {
    padding: 5px 14px;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.35);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.prof-batch-badge {
    padding: 5px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── HERO STATS ROW ── */
.prof-hero-stats {
    display: flex;
    gap: 0;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    max-width: 360px;
    margin: 0 auto;
}
.prof-stat-item {
    flex: 1;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-right: 1px solid rgba(255,255,255,0.07);
}
.prof-stat-item:last-child { border-right: none; }
.prof-stat-val {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.prof-stat-key {
    font-size: 0.62rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ── HERO ACTIONS ── */
.prof-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.prof-edit-btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(99,102,241,0.4);
    background: rgba(99,102,241,0.12);
    color: #a5b4fc;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.prof-edit-btn:hover {
    background: rgba(99,102,241,0.22);
    border-color: rgba(99,102,241,0.6);
    color: white;
    transform: translateY(-2px);
}

/* Profile btn in nav restyled */
#profileBtn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    padding: 0;
    overflow: hidden;
    border: 2px solid rgba(99,102,241,0.4);
    background: rgba(99,102,241,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
#profileBtn:hover {
    border-color: rgba(99,102,241,0.7);
    background: rgba(99,102,241,0.2);
    box-shadow: 0 0 16px rgba(99,102,241,0.35);
}
#profileBtn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
#profileBtn .fa-user {
    font-size: 0.9rem;
    color: #a5b4fc;
}

/* ─────────────────────────────────────────
   SHARE STRIP
───────────────────────────────────────── */
.prof-share-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 16px;
}
.prof-share-strip > .fa-link {
    color: #6366f1;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.prof-share-url {
    flex: 1;
    font-size: 0.82rem;
    color: #94a3b8;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
}
.prof-copy-btn {
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #94a3b8;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.prof-copy-btn:hover {
    background: rgba(99,102,241,0.15);
    color: #a5b4fc;
    border-color: rgba(99,102,241,0.4);
}
.prof-copy-btn.copied {
    background: rgba(34,197,94,0.12);
    color: #22c55e;
    border-color: rgba(34,197,94,0.3);
}

/* ─────────────────────────────────────────
   AVATAR PICKER
───────────────────────────────────────── */
.prof-avatar-picker-card {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    margin-bottom: 16px;
    animation: modalPop 0.3s cubic-bezier(0.16,1,0.3,1);
}
.prof-section-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.prof-section-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.prof-section-header h3 i {
    color: #6366f1;
}

.prof-avatar-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px 8px;
}
.prof-av-tab {
    flex: 1;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: transparent;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.prof-av-tab.active {
    background: rgba(99,102,241,0.15);
    border-color: rgba(99,102,241,0.4);
    color: #a5b4fc;
}

.prof-avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 8px 16px 16px;
}
@media (max-width: 400px) {
    .prof-avatar-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 8px 10px 12px; }
}
.prof-av-card {
    aspect-ratio: 1;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.prof-av-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.prof-av-card:hover {
    border-color: rgba(99,102,241,0.4);
    transform: scale(1.05);
}
.prof-av-card:hover img { transform: scale(1.08); }
.prof-av-card.selected {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.3), 0 4px 16px rgba(99,102,241,0.25);
}
.prof-av-card.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: 3px;
    right: 4px;
    font-size: 0.55rem;
    background: #6366f1;
    color: white;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 14px;
    text-align: center;
}
.prof-av-card-img-fail {
    font-size: 1.2rem;
    color: #6366f1;
    opacity: 0.6;
}

.prof-accent-row {
    padding: 0 16px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.prof-accent-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    flex-shrink: 0;
}
.prof-accent-dots {
    display: flex;
    gap: 8px;
}
.prof-accent-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
}
.prof-accent-dot:hover { transform: scale(1.15); }
.prof-accent-dot.active {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.prof-av-save-row {
    padding: 0 16px 16px;
    display: flex;
    gap: 10px;
}
.prof-av-save-row button { flex: 1; }

/* ─────────────────────────────────────────
   PROFILE INFO CARD
───────────────────────────────────────── */
.prof-info-card {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    margin-bottom: 16px;
}
.prof-info-card .prof-section-header {
    padding: 18px 20px 14px;
}

.prof-info-grid {
    padding: 4px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.prof-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    gap: 10px;
}
.prof-info-row:last-child { border-bottom: none; }
.prof-info-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    min-width: 130px;
}
.prof-info-label i {
    width: 14px;
    text-align: center;
}
.prof-info-val {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

/* Edit form */
.prof-edit-form-wrap {
    padding: 4px 20px 20px;
}
.prof-form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}
.prof-optional {
    color: #475569;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}
.prof-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.prof-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.prof-form-actions button { flex: 1; }

/* ─────────────────────────────────────────
   HEATMAP (Profile context)
───────────────────────────────────────── */
.prof-heatmap-card {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    margin-bottom: 16px;
}
.prof-heatmap-card .prof-section-header {
    padding: 18px 20px 14px;
}
.prof-heatmap-inner {
    padding: 0 20px 20px;
}
/* Full-width GitHub-style heatmap */
.prof-heatmap-grid {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    gap: 4px;
    margin-top: 8px;
}
@media (max-width: 480px) {
    .prof-heatmap-grid { grid-template-columns: repeat(10, 1fr); }
}
.prof-heatmap-grid .heatmap-day {
    aspect-ratio: 1;
    border-radius: 3px;
    background: var(--heat-0);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: default;
}
.prof-heatmap-grid .heatmap-day:hover {
    transform: scale(1.3);
    z-index: 2;
    position: relative;
}
.prof-heatmap-grid .heatmap-day.level-1 { background: var(--heat-1); }
.prof-heatmap-grid .heatmap-day.level-2 { background: var(--heat-2); box-shadow: 0 0 6px rgba(16,185,129,0.3); }
.prof-heatmap-grid .heatmap-day.level-3 { background: var(--heat-3); box-shadow: 0 0 10px rgba(52,211,153,0.45); }

.prof-streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #f87171;
    white-space: nowrap;
}

/* ─────────────────────────────────────────
   VS PANEL (public profile view)
───────────────────────────────────────── */
.prof-vs-card {
    background: linear-gradient(145deg, #0f172a, #1a1040);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    margin-bottom: 16px;
}
.prof-vs-card .prof-section-header {
    border-color: rgba(99,102,241,0.15);
}

/* ─────────────────────────────────────────
   PUBLIC PROFILE BANNER (not your profile)
───────────────────────────────────────── */
.prof-public-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 14px;
    padding: 13px 18px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #94a3b8;
}
.prof-public-banner i { color: #6366f1; }
.prof-public-banner strong { color: #e2e8f0; }

/* ─────────────────────────────────────────
   DANGER ZONE (logout)
───────────────────────────────────────── */
.prof-danger-zone {
    background: rgba(239,68,68,0.03);
    border: 1px solid rgba(239,68,68,0.12);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    margin-bottom: 16px;
}
.prof-danger-zone .prof-section-header {
    border-color: rgba(239,68,68,0.12);
}
.prof-danger-zone .prof-section-header h3 i {
    color: #ef4444;
}
.prof-danger-wrap {
    padding: 4px 20px 20px;
}
.prof-logout-btn {
    width: 100%;
    padding: 13px 20px;
    border-radius: 12px;
    border: 1px solid rgba(239,68,68,0.25);
    background: rgba(239,68,68,0.08);
    color: #f87171;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}
.prof-logout-btn:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.4);
    color: white;
}

/* ─────────────────────────────────────────
   PROFILE COMPLETE MINI-MODAL
───────────────────────────────────────── */
#profileCompleteModal {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 8000;
    width: calc(100% - 40px);
    max-width: 400px;
    background: #18181b;
    border: 1px solid rgba(99,102,241,0.4);
    border-radius: 20px;
    padding: 22px 22px 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(99,102,241,0.15), 0 0 40px rgba(99,102,241,0.1);
    animation: completeModalIn 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
    display: none;
}
#profileCompleteModal.show {
    display: block;
}
@keyframes completeModalIn {
    from { opacity: 0; transform: translateX(-50%) translateY(30px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0);     }
}
.pcm-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}
.pcm-avatar-preview {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: conic-gradient(#6366f1, #8b5cf6, #ec4899, #6366f1);
    padding: 2px;
    flex-shrink: 0;
}
.pcm-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #0f172a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #6366f1;
}
.pcm-avatar-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.pcm-text { flex: 1; }
.pcm-title {
    font-size: 1rem;
    font-weight: 800;
    color: white;
    margin: 0 0 4px 0;
}
.pcm-sub {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}
.pcm-actions {
    display: flex;
    gap: 10px;
}
.pcm-actions button { flex: 1; }

/* ─────────────────────────────────────────
   PROFILE LOADING STATE
───────────────────────────────────────── */
.prof-skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    border-radius: 6px;
    animation: shimmer 1.5s infinite;
    margin-bottom: 10px;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─────────────────────────────────────────
   MOBILE RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 480px) {
    .prof-hero { padding: 28px 18px 24px; }
    .prof-avatar-ring { width: 82px; height: 82px; }
    .prof-hero-name { font-size: 1.3rem; }
    .prof-hero-stats { max-width: 100%; }
    .prof-stat-val { font-size: 1.1rem; }
    .prof-form-row { grid-template-columns: 1fr; }
    .prof-info-label { min-width: 110px; }
    .prof-info-val { max-width: 140px; }
    .prof-avatar-grid { grid-template-columns: repeat(5, 1fr); gap: 5px; padding: 6px 10px 12px; }
    .pcm-header { gap: 10px; }
    .prof-share-strip { padding: 12px 14px; }
}
/* ═══════════════════════════════════════════════════
   NEW ADDITIONS — appended, nothing above changed
═══════════════════════════════════════════════════ */

/* ── AVATAR PICKER: premium ring-card style ── */
.prof-avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px 16px 16px;
}
.prof-av-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.prof-av-card:hover { transform: translateY(-3px); }
.prof-av-ring-preview {
    width: 60px; height: 60px;
    border-radius: 50%;
    padding: 2.5px;
    background: conic-gradient(#334155, #475569, #334155);
    transition: all 0.2s ease;
}
.prof-av-ring-preview.selected-ring {
    background: conic-gradient(#6366f1,#8b5cf6,#ec4899,#6366f1) !important;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.5), 0 4px 16px rgba(99,102,241,0.35) !important;
    animation: ringRotate 4s linear infinite;
}
.prof-av-card:hover .prof-av-ring-preview { box-shadow: 0 0 0 2px rgba(99,102,241,0.4), 0 6px 18px rgba(99,102,241,0.25); }
.prof-av-inner {
    width: 100%; height: 100%;
    border-radius: 50%; background: #0f172a;
    overflow: hidden; display: flex;
    align-items: center; justify-content: center;
}
.prof-av-inner img { width:100%; height:100%; object-fit:cover; border-radius:50%; display:block; }
.prof-av-name {
    font-size: 0.66rem; font-weight: 700; color: #64748b;
    text-align: center; max-width: 68px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: color 0.18s;
}
.prof-av-card.selected .prof-av-name, .prof-av-card:hover .prof-av-name { color: #a5b4fc; }

/* ── Surprise Me button ── */
.prof-surprise-row { padding: 0 16px 8px; display: flex; justify-content: center; }
.prof-surprise-btn {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 18px; border-radius: 20px;
    border: 1px dashed rgba(139,92,246,0.4);
    background: rgba(139,92,246,0.06); color: #c4b5fd;
    font-size: 0.8rem; font-weight: 700; cursor: pointer;
    font-family: inherit; transition: all 0.2s ease;
}
.prof-surprise-btn:hover { background: rgba(139,92,246,0.14); border-color: rgba(139,92,246,0.6); color: white; transform: scale(1.03); }

/* ── Frame picker section (inside avatar picker) ── */
.prof-frame-section-header {
    padding: 12px 16px 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: space-between;
}
.prof-frame-section-header h4 { margin:0; font-size:0.85rem; font-weight:700; color:#94a3b8; display:flex; align-items:center; gap:7px; }
.prof-frame-section-header h4 i { color:#fbbf24; }
.prof-frame-count { font-size:0.72rem; color:#475569; font-weight:600; }
.prof-frame-grid {
    display: grid; grid-template-columns: repeat(2,1fr);
    gap: 8px; padding: 4px 16px 14px;
    max-height: 320px; overflow-y: auto; scrollbar-width: none;
}
.prof-frame-grid::-webkit-scrollbar { display:none; }
.prof-frame-card {
    position:relative; background:rgba(255,255,255,0.025);
    border:1px solid rgba(255,255,255,0.07);
    border-radius:14px; padding:14px 12px 12px;
    display:flex; flex-direction:column; align-items:center;
    gap:5px; text-align:center; min-height:130px; transition:all 0.22s ease;
}
.prof-frame-card.earned { cursor:pointer; border-color:rgba(99,102,241,0.18); background:rgba(99,102,241,0.04); }
.prof-frame-card.earned:hover { border-color:rgba(99,102,241,0.4); background:rgba(99,102,241,0.1); transform:translateY(-2px); box-shadow:0 8px 24px rgba(99,102,241,0.18); }
.prof-frame-card.active { border-color:#6366f1 !important; background:rgba(99,102,241,0.14) !important; box-shadow:0 0 0 2px rgba(99,102,241,0.3),0 8px 24px rgba(99,102,241,0.2) !important; }
.prof-frame-card.locked { opacity:0.5; cursor:not-allowed; }
.pfc-ring-preview { width:50px; height:50px; border-radius:50%; padding:3px; flex-shrink:0; }
.pfc-ring-preview.pfc-animated { animation: ringRotate 4s linear infinite; }
.pfc-ring-inner { width:100%; height:100%; border-radius:50%; background:#0f172a; display:flex; align-items:center; justify-content:center; font-size:0.85rem; }
.pfc-name { font-size:0.76rem; font-weight:800; color:#e2e8f0; line-height:1.2; }
.pfc-desc { font-size:0.66rem; color:#64748b; line-height:1.4; }
.pfc-prog-wrap { width:100%; display:flex; align-items:center; gap:5px; }
.pfc-prog-bar { flex:1; height:3px; background:rgba(255,255,255,0.06); border-radius:2px; overflow:hidden; }
.pfc-prog-fill { height:100%; background:linear-gradient(90deg,#6366f1,#8b5cf6); border-radius:2px; transition:width 0.5s ease; }
.pfc-prog-label { font-size:0.6rem; color:#64748b; font-weight:700; white-space:nowrap; }
.pfc-status { font-size:0.66rem; font-weight:800; display:flex; align-items:center; gap:4px; }
.pfc-status.earned { color:#4ade80; }
.pfc-status.locked { color:#475569; }
.pfc-rare-tag { position:absolute; top:7px; right:7px; font-size:0.56rem; font-weight:800; color:#fbbf24; background:rgba(251,191,36,0.15); border:1px solid rgba(251,191,36,0.3); border-radius:5px; padding:2px 5px; display:flex; align-items:center; gap:3px; }

/* ── WhatsApp share button ── */
.prof-wa-btn {
    padding: 7px 12px; border-radius: 8px;
    border: 1px solid rgba(37,211,102,0.3);
    background: rgba(37,211,102,0.08); color: #4ade80;
    font-size: 0.78rem; cursor: pointer; font-family: inherit;
    transition: all 0.2s ease; flex-shrink: 0;
    display: flex; align-items: center; gap: 5px; font-weight: 700;
}
.prof-wa-btn:hover { background: rgba(37,211,102,0.15); color: #86efac; border-color: rgba(37,211,102,0.5); }

/* ── Contributor Badge ── */
.contrib-badge-outer { position:relative; display:inline-flex; align-items:center; justify-content:center; }
.contrib-badge-aura { position:absolute; inset:-10px; border-radius:24px; animation:auraBreath 3s ease-in-out infinite; pointer-events:none; }
@keyframes auraBreath { 0%,100%{opacity:0.4;transform:scale(0.92);filter:blur(8px);} 50%{opacity:1;transform:scale(1.1);filter:blur(14px);} }
.contrib-badge-pill {
    display:inline-flex; align-items:center; gap:6px;
    padding:5px 14px 5px 10px; border-radius:20px;
    font-size:0.75rem; font-weight:800; color:white;
    text-shadow:0 1px 4px rgba(0,0,0,0.4); letter-spacing:0.5px;
    position:relative; z-index:1;
    animation:badgeFloat 4s ease-in-out infinite;
}
@keyframes badgeFloat { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-2px);} }
.contrib-badge-pill i { font-size:0.78rem; }

/* ── Rank History on Profile Page ── */
.prof-rank-history-card {
    background:#18181b; border:1px solid #27272a;
    border-radius:20px; padding:0; overflow:hidden; margin-bottom:16px;
}
.prof-rank-history-card .prof-section-header { padding:18px 20px 14px; }
.prof-rank-history-inner { padding:0 20px 20px; }
.prof-rank-stats {
    display:flex; gap:0;
    border:1px solid rgba(255,255,255,0.06); border-radius:14px;
    overflow:hidden; background:rgba(255,255,255,0.025);
    margin:8px 0 16px;
}
.prof-rank-stat {
    flex:1; padding:12px 10px;
    display:flex; flex-direction:column; align-items:center; gap:4px;
    border-right:1px solid rgba(255,255,255,0.06);
}
.prof-rank-stat:last-child { border-right:none; }
.prof-rank-stat-val { font-size:1.2rem; font-weight:800; color:white; line-height:1; }
.prof-rank-stat-key { font-size:0.6rem; font-weight:700; color:#64748b; text-transform:uppercase; letter-spacing:0.8px; }

/* ── H2H section on profile page (visitor view) ── */
.prof-h2h-card {
    background: linear-gradient(145deg,#0d1321,#1a1040,#0f172a);
    border: 1px solid rgba(99,102,241,0.22);
    border-radius: 22px; overflow: hidden; margin-bottom: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}
.prof-h2h-card-header {
    padding:16px 20px 12px; border-bottom:1px solid rgba(255,255,255,0.06);
    display:flex; align-items:center; justify-content:space-between;
}
.prof-h2h-card-header h3 { margin:0; font-size:0.9rem; font-weight:700; color:#e2e8f0; display:flex; align-items:center; gap:8px; }
.prof-h2h-card-header h3 i { color:#ef4444; }
.prof-h2h-card-body { padding:20px; }
.prof-h2h-heroes { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.prof-h2h-hero { flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; }
.prof-h2h-ring { width:68px; height:68px; border-radius:50%; padding:3px; overflow:hidden; }
.prof-h2h-ring-them { background:conic-gradient(#fbbf24,#f59e0b,#fbbf24); box-shadow:0 0 18px rgba(251,191,36,0.4); }
.prof-h2h-ring-you  { background:conic-gradient(#6366f1,#8b5cf6,#6366f1); box-shadow:0 0 18px rgba(99,102,241,0.4); animation:ringRotate 6s linear infinite; }
.prof-h2h-ring > * { width:100%; height:100%; border-radius:50%; background:#0d1321; overflow:hidden; display:flex; align-items:center; justify-content:center; font-size:1.4rem; color:#6366f1; }
.prof-h2h-ring img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.prof-h2h-hero-name { font-size:0.8rem; font-weight:700; color:#e2e8f0; text-align:center; max-width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.prof-h2h-hero-score { font-size:1.4rem; font-weight:800; line-height:1; }
.prof-h2h-vs-orb { width:42px; height:42px; border-radius:50%; border:1.5px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.03); display:flex; align-items:center; justify-content:center; font-size:0.76rem; font-weight:900; font-style:italic; color:#475569; flex-shrink:0; }
.prof-h2h-msg { background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.07); border-radius:12px; padding:12px 16px; font-size:0.84rem; color:#cbd5e1; line-height:1.5; text-align:center; margin-bottom:16px; }
.prof-h2h-subjects { display:flex; flex-direction:column; gap:7px; }
.prof-h2h-row { display:flex; align-items:center; gap:8px; }
.prof-h2h-side { display:flex; align-items:center; gap:6px; flex:1; }
.prof-h2h-side-them { flex-direction:row-reverse; }
.prof-h2h-pct { font-size:0.7rem; font-weight:800; min-width:32px; text-align:center; }
.prof-h2h-track { flex:1; height:4px; background:rgba(255,255,255,0.07); border-radius:2px; overflow:hidden; }
.prof-h2h-fill { height:100%; border-radius:2px; }
.prof-h2h-fill-them { background:linear-gradient(90deg,#f59e0b,#fbbf24); }
.prof-h2h-fill-you  { background:linear-gradient(90deg,#6366f1,#8b5cf6); }
.prof-h2h-subname { font-size:0.66rem; font-weight:700; color:#64748b; text-align:center; min-width:48px; position:relative; display:flex; align-items:center; justify-content:center; gap:3px; }
.prof-h2h-win-dot { width:5px; height:5px; border-radius:50%; flex-shrink:0; }
.prof-h2h-win-dot.you  { background:#6366f1; box-shadow:0 0 4px rgba(99,102,241,0.8); }
.prof-h2h-win-dot.them { background:#fbbf24; box-shadow:0 0 4px rgba(251,191,36,0.8); }

/* ── Visit Profile button inside player modal ── */
.pm-visit-profile-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; width: calc(100% - 40px); margin: 10px 20px 0;
    padding: 13px; border-radius: 14px;
    border: 1px solid rgba(99,102,241,0.35);
    background: rgba(99,102,241,0.1); color: #a5b4fc;
    font-size: 0.88rem; font-weight: 700; cursor: pointer;
    font-family: inherit; transition: all 0.2s ease;
}
.pm-visit-profile-btn:hover { background:rgba(99,102,241,0.2); border-color:rgba(99,102,241,0.6); color:white; transform:translateY(-1px); box-shadow:0 6px 20px rgba(99,102,241,0.25); }

/* ── Edit mode fix: use hidden class instead of style.display ── */
#profPage-edit-mode { display: block; }
#profPage-edit-mode.hidden { display: none !important; }

/* Mobile tweaks for new elements */
@media (max-width: 480px) {
    .prof-avatar-grid { grid-template-columns: repeat(4,1fr); gap:8px; padding:8px 12px 12px; }
    .prof-av-ring-preview { width:52px; height:52px; }
    .prof-frame-grid { grid-template-columns: repeat(2,1fr); }
}

/* ═══════════════════════════════════════════════════════════════
   VISITOR COUNTER — shown only to profile owner inside hero
═══════════════════════════════════════════════════════════════ */
.prof-visitor-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    background: rgba(99,102,241,0.07);
    border: 1px solid rgba(99,102,241,0.18);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #a5b4fc;
    position: relative;
    z-index: 1;
    transition: background 0.2s;
}
.prof-visitor-wrap i { color: #6366f1; font-size: 0.8rem; }
.prof-visitor-wrap #profPage-visitor-count {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
}
.prof-visitor-wrap.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   SHOUTOUT WALL
═══════════════════════════════════════════════════════════════ */
.prof-shoutout-card {
    background: linear-gradient(145deg, #0f172a, #131929);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 22px;
    overflow: hidden;
    margin-bottom: 16px;
}
.prof-shoutout-card .prof-section-header h3 i {
    color: #a5b4fc;
}

/* ── Write form ── */
.prof-shoutout-form {
    padding: 0 16px 12px;
}
.prof-shoutout-form.hidden { display: none !important; }
.shoutout-input-wrap {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.shoutout-input-wrap:focus-within {
    border-color: rgba(99,102,241,0.45);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
#prof-shoutout-input {
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 12px 14px 8px;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    min-height: 72px;
    box-shadow: none;
    outline: none;
}
#prof-shoutout-input:focus {
    border: none;
    background: transparent;
    box-shadow: none;
}
#prof-shoutout-input::placeholder { color: rgba(255,255,255,0.25); }
.shoutout-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.shoutout-char-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    font-variant-numeric: tabular-nums;
}
.shoutout-send-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 10px;
    border: 1px solid rgba(99,102,241,0.4);
    background: rgba(99,102,241,0.12);
    color: #a5b4fc;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}
.shoutout-send-btn:hover:not(:disabled) {
    background: rgba(99,102,241,0.22);
    border-color: rgba(99,102,241,0.65);
    color: white;
    transform: translateY(-1px);
}
.shoutout-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Login prompt ── */
.shoutout-login-prompt {
    margin: 0 16px 14px;
    padding: 11px 14px;
    background: rgba(255,255,255,0.025);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 12px;
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.shoutout-login-prompt.hidden { display: none !important; }
.shoutout-login-prompt i { color: #6366f1; }

/* ── Card list ── */
#prof-shoutout-list {
    padding: 4px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: none;
}
#prof-shoutout-list::-webkit-scrollbar { display: none; }

.shoutout-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 12px 14px;
    transition: background 0.18s, border-color 0.18s;
}
.shoutout-card:hover { background: rgba(255,255,255,0.05); border-color: rgba(99,102,241,0.2); }
.shoutout-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.shoutout-author {
    font-size: 0.78rem;
    font-weight: 800;
    color: #a5b4fc;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shoutout-date {
    font-size: 0.68rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    flex-shrink: 0;
}
.shoutout-msg {
    margin: 0;
    font-size: 0.86rem;
    color: #cbd5e1;
    line-height: 1.5;
    word-break: break-word;
}
.shoutout-delete-btn {
    background: none;
    border: none;
    padding: 4px 7px;
    border-radius: 7px;
    color: #475569;
    cursor: pointer;
    font-size: 0.75rem;
    transition: color 0.18s, background 0.18s;
    flex-shrink: 0;
}
.shoutout-delete-btn:hover:not(:disabled) {
    color: #ef4444;
    background: rgba(239,68,68,0.1);
}
.shoutout-delete-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Empty / error states ── */
.shoutout-empty {
    text-align: center;
    padding: 24px 16px;
    color: #475569;
}
.shoutout-empty i { font-size: 1.8rem; margin-bottom: 8px; display: block; color: #334155; }
.shoutout-empty p  { margin: 0; font-size: 0.82rem; }
.shoutout-error    { color: #ef4444; font-size: 0.8rem; text-align: center; padding: 16px; }
.shoutout-skeleton {
    height: 64px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    border-radius: 14px;
    animation: skeletonShimmer 1.4s infinite;
}
@keyframes skeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Mobile tweaks ── */
@media (max-width: 480px) {
    .prof-visitor-wrap { font-size: 0.72rem; padding: 6px 13px; }
    #prof-shoutout-list { max-height: 320px; }
}

/* ──────────────────────────────────────────────────────────────────
   PLAYER MODAL — Premium dark restyle matching site aesthetic
────────────────────────────────────────────────────────────────── */

/* Modal overlay */
#playerModal {
    background: rgba(0, 0, 0, 0.80) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* Modal card */
.player-modal-card {
    background: linear-gradient(160deg, #0c0f1e 0%, #111330 45%, #0c0f1e 100%) !important;
    border: 1px solid rgba(99, 102, 241, 0.25) !important;
    border-radius: 28px !important;
    overflow: hidden !important;
    max-height: 92vh !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.08) inset,
        0 32px 80px rgba(0, 0, 0, 0.75),
        0 0 120px rgba(99, 102, 241, 0.08) !important;
    position: relative;
}

/* Ambient glow behind card */
.player-modal-card::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Header */
.player-modal-header {
    background: rgba(0, 0, 0, 0.35) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    padding: 22px 24px 18px !important;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.player-header-glow-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.07) 0%, transparent 100%);
    pointer-events: none;
}

/* Avatar ring */
.pm-avatar-ring {
    box-shadow: 0 0 36px rgba(99, 102, 241, 0.5), 0 8px 24px rgba(0, 0, 0, 0.6) !important;
    animation: ringRotate 6s linear infinite;
}

/* Pills */
.pm-rank-pill {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 4px 11px !important;
    font-size: 0.72rem !important;
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.4) !important;
}

.pm-score-pill {
    background: rgba(99, 102, 241, 0.15) !important;
    border: 1px solid rgba(99, 102, 241, 0.38) !important;
    color: #a5b4fc !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
}

/* Tab bar */
.pm-tabs {
    background: rgba(0, 0, 0, 0.28) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 8px 20px 0 !important;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.pm-tab {
    color: #64748b !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
}

.pm-tab.active { color: #e2e8f0 !important; }

.pm-tab-indicator {
    background: linear-gradient(90deg, #6366f1, #8b5cf6) !important;
    height: 2px !important;
    bottom: 0 !important;
    border-radius: 2px 2px 0 0 !important;
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.7) !important;
}

/* ── H2H PANE: SCROLLABLE ── */
.pm-pane {
    overflow-y: auto !important;
    flex: 1 !important;
    min-height: 0 !important;          /* critical for flex child scroll */
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    z-index: 1;
}
.pm-pane::-webkit-scrollbar { display: none; }

/* ── VS HERO BLOCK ── */
.h2h-vs-header {
    background: rgba(255, 255, 255, 0.025) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 20px !important;
    margin: 20px 20px 0 !important;
    padding: 22px 16px 18px !important;
    position: relative;
    overflow: hidden;
}

.h2h-vs-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.06) 0%, transparent 40%, rgba(99, 102, 241, 0.06) 100%);
    pointer-events: none;
}

/* Avatar circles */
.h2h-avatar {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.4rem !important;
    background: rgba(251, 191, 36, 0.08) !important;
    border: 2.5px solid rgba(251, 191, 36, 0.45) !important;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2), 0 6px 16px rgba(0, 0, 0, 0.4) !important;
    color: #fbbf24 !important;
    flex-shrink: 0 !important;
}
.h2h-avatar img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.h2h-avatar-you {
    background: rgba(99, 102, 241, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.25), 0 6px 16px rgba(0, 0, 0, 0.4) !important;
    color: #a5b4fc !important;
    animation: ringRotate 8s linear infinite !important;
}

/* VS orb */
.h2h-vs-orb {
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5) !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.h2h-vs-ring { display: none !important; }
.h2h-vs-text {
    font-size: 0.86rem !important;
    font-weight: 900 !important;
    letter-spacing: 1.5px !important;
    background: linear-gradient(135deg, #fbbf24, #ec4899, #6366f1) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Score numbers */
.h2h-player-score {
    font-size: 1.55rem !important;
    font-weight: 900 !important;
    letter-spacing: -1px !important;
    line-height: 1 !important;
}
.h2h-score-them { color: #fbbf24 !important; text-shadow: 0 0 20px rgba(251, 191, 36, 0.55) !important; }
.h2h-score-you  { color: #a5b4fc !important; text-shadow: 0 0 20px rgba(139, 92, 246, 0.55) !important; }
.h2h-player-name {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #e2e8f0 !important;
    text-align: center !important;
    max-width: 84px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── OVERALL PROGRESS TRACK ── */
.h2h-row-wrap { padding: 16px 20px 0 !important; }
.h2h-row-label {
    display: block !important;
    font-size: 0.6rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.8px !important;
    color: #475569 !important;
    margin-bottom: 8px !important;
}
.h2h-dual-track {
    height: 10px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.06) !important;
    display: flex !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}
.h2h-track-gap { width: 2px !important; flex-shrink: 0 !important; background: rgba(0, 0, 0, 0.7) !important; }
.h2h-fill-them {
    height: 100% !important;
    background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
    transition: width 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    border-radius: 10px 0 0 10px !important;
    box-shadow: 4px 0 10px rgba(251, 191, 36, 0.5) !important;
}
.h2h-fill-you {
    height: 100% !important;
    background: linear-gradient(90deg, #6366f1, #8b5cf6) !important;
    transition: width 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    border-radius: 0 10px 10px 0 !important;
    box-shadow: -4px 0 10px rgba(99, 102, 241, 0.5) !important;
}

/* ── SUBJECT BARS — NEW DESIGN ── */
#h2h-subject-bars {
    padding: 14px 20px 4px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    /* NO max-height here — the pane itself scrolls */
}

.h2h-subject-row {
    background: rgba(255, 255, 255, 0.025) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 14px !important;
    padding: 11px 14px !important;
    transition: background 0.18s, border-color 0.18s !important;
}
.h2h-subject-row:hover {
    background: rgba(99, 102, 241, 0.06) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
}

.h2h-sub-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.h2h-sub-name {
    font-size: 0.74rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.h2h-win-badge {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.h2h-win-badge.you {
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}
.h2h-win-badge.them {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.28);
}
.h2h-draw-badge {
    font-size: 0.6rem;
    font-weight: 700;
    color: #475569;
}

.h2h-sub-bars {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.h2h-sub-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.h2h-sub-pct {
    font-size: 0.68rem;
    font-weight: 800;
    min-width: 32px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.them-pct { color: #fbbf24; }
.you-pct  { color: #a5b4fc; }

.h2h-sub-track {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    overflow: hidden;
}
.h2h-sub-fill {
    height: 100%;
    border-radius: 4px;
    width: 0%;
}
.fill-them { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.fill-you  { background: linear-gradient(90deg, #6366f1, #8b5cf6); }

/* ── MESSAGE BOX ── */
.h2h-message-box {
    background: rgba(255, 255, 255, 0.025) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 16px !important;
    padding: 14px 18px !important;
    margin: 14px 20px 0 !important;
    font-size: 0.87rem !important;
    color: #cbd5e1 !important;
    line-height: 1.65 !important;
    text-align: center !important;
}

/* ── VISIT PROFILE BUTTON ── */
.pm-visit-profile-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: calc(100% - 40px) !important;
    margin: 16px 20px 24px !important;
    padding: 15px !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(139, 92, 246, 0.10)) !important;
    border: 1px solid rgba(99, 102, 241, 0.38) !important;
    color: #a5b4fc !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px !important;
    cursor: pointer !important;
    font-family: inherit !important;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    position: relative;
    overflow: hidden;
}
.pm-visit-profile-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    opacity: 0;
    transition: opacity 0.2s;
}
.pm-visit-profile-btn:hover::after { opacity: 1; }
.pm-visit-profile-btn:hover {
    border-color: rgba(99, 102, 241, 0.65) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.3) !important;
}
.pm-visit-profile-btn:active { transform: scale(0.98) !important; }


/* ──────────────────────────────────────────────────────────────────
   TROPHY CABINET — show ALL trophies (locked + unlocked)
────────────────────────────────────────────────────────────────── */

#profPage-trophy-section {
    display: block !important; /* ensure it's never hidden for owner */
}

.expanded-trophy-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    padding: 4px 0 8px !important;
}

/* Base trophy item — ALWAYS visible */
.trophy-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 14px 8px 12px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    background: rgba(255, 255, 255, 0.025) !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.22s ease !important;
    cursor: default !important;
}

/* Locked trophies — clearly visible but greyed */
.trophy-item.locked {
    opacity: 0.42 !important;
    filter: grayscale(0.6) !important;
}
.trophy-item.locked:hover {
    opacity: 0.60 !important;
    filter: grayscale(0.3) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Unlocked trophies — full glow */
.trophy-item.unlocked {
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.08), rgba(251, 191, 36, 0.03)) !important;
    border: 1px solid rgba(251, 191, 36, 0.3) !important;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.1) !important;
    opacity: 1 !important;
    filter: none !important;
}
.trophy-item.unlocked:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 28px rgba(251, 191, 36, 0.18) !important;
    border-color: rgba(251, 191, 36, 0.45) !important;
}

/* Icon wrapper */
.trophy-icon-wrap {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trophy-icon {
    font-size: 1.4rem !important;
    color: var(--gold) !important;
    position: relative;
    z-index: 1;
}
.trophy-item.locked .trophy-icon { color: #475569 !important; }

/* Glow behind unlocked icon */
.trophy-glow {
    position: absolute;
    inset: -4px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.35) 0%, transparent 70%);
    border-radius: 50%;
    animation: trophyPulse 2.5s ease-in-out infinite;
}
@keyframes trophyPulse {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50%       { opacity: 1;   transform: scale(1.15); }
}

/* Lock overlay for locked */
.trophy-lock-overlay {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.trophy-lock-overlay i { font-size: 0.5rem; color: #64748b; }

/* Trophy name */
.trophy-name {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    color: #cbd5e1 !important;
    line-height: 1.3 !important;
}
.trophy-item.locked .trophy-name { color: #475569 !important; }

/* Earned tag */
.trophy-earned-tag {
    font-size: 0.58rem;
    font-weight: 800;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 10px;
    padding: 2px 7px;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

/* Progress bar for locked trophies */
.trophy-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 2px;
}
.trophy-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 3px;
    transition: width 0.8s ease;
}


/* ──────────────────────────────────────────────────────────────────
   SHOUTOUT — visitor POV improvements
────────────────────────────────────────────────────────────────── */

/* The write form — highlight for visitors */
.prof-shoutout-form:not(.hidden) {
    background: rgba(99, 102, 241, 0.04);
    border-radius: 0 0 0 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}

.shoutout-input-wrap {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    border-radius: 14px !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}
.shoutout-input-wrap:focus-within {
    border-color: rgba(99, 102, 241, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

.shoutout-send-btn {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.12)) !important;
    border: 1px solid rgba(99, 102, 241, 0.4) !important;
    color: #a5b4fc !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    padding: 8px 18px !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.shoutout-send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.22)) !important;
    border-color: rgba(99, 102, 241, 0.65) !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 18px rgba(99, 102, 241, 0.28) !important;
}

/* Shoutout card hover */
.shoutout-card {
    border-radius: 14px !important;
    transition: background 0.18s, border-color 0.18s, transform 0.18s !important;
}
.shoutout-card:hover {
    background: rgba(99, 102, 241, 0.06) !important;
    border-color: rgba(99, 102, 241, 0.22) !important;
    transform: translateX(3px) !important;
}

/* Shoutout card wrapper */
.prof-shoutout-card {
    background: linear-gradient(145deg, #0e1422, #131940 60%, #0e1422) !important;
    border: 1px solid rgba(99, 102, 241, 0.18) !important;
    border-radius: 22px !important;
    overflow: hidden !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PUBLIC PROFILE LANDING — .ppl-* styles
   Used by _buildPPL_skeleton / _buildPPL_content in profile-achievements.js
   These were missing from the codebase, causing the "infinite loader" bug.
═══════════════════════════════════════════════════════════════════ */

#public-profile-landing {
    position: fixed;
    inset: 0;
    background: #0f172a;
    z-index: 100;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#public-profile-landing::-webkit-scrollbar { display: none; }

/* ── Nav ── */
.ppl-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ppl-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 800;
    color: white;
}
.ppl-nav-brand img { border-radius: 8px; }
.ppl-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.13);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.ppl-login-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.55);
    color: white;
}

/* ── Stage ── */
.ppl-stage {
    min-height: calc(100vh - 57px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 24px 16px 48px;
    gap: 16px;
}

/* ── Card ── */
.ppl-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(160deg, #111827 0%, #1a1040 60%, #111827 100%);
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 28px;
    padding: 32px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.08) inset;
    position: relative;
    overflow: hidden;
}
.ppl-card::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.14) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ── View tag ── */
.ppl-view-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* ── Avatar ring ── */
.ppl-avatar-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    padding: 3px;
    margin-bottom: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.ppl-avatar-ring.frame-animated {
    animation: ringRotate 5s linear infinite;
}
.ppl-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #0f172a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #6366f1;
}
.ppl-avatar-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.ppl-av-fallback { font-size: 2rem; color: #6366f1; }

/* ── Name ── */
.ppl-name {
    margin: 0 0 12px;
    font-size: 1.55rem;
    font-weight: 800;
    color: white;
    text-align: center;
    line-height: 1.2;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

/* ── Badges ── */
.ppl-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.ppl-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 800;
}
.ppl-badge-level {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
}
.ppl-badge-batch {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* ── Institution ── */
.ppl-institution {
    margin: 0 0 20px;
    font-size: 0.82rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.ppl-institution i { color: #475569; }

/* ── Stats row ── */
.ppl-stats-row {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}
.ppl-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    gap: 4px;
}
.ppl-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.ppl-stat-val {
    font-size: 1.55rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}
.ppl-stat-unit {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    margin-left: 1px;
}
.ppl-stat-key {
    font-size: 0.66rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Progress section ── */
.ppl-progress-section {
    width: 100%;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.ppl-prog-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
}
.ppl-prog-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    overflow: hidden;
}
.ppl-prog-fill {
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Frame badge ── */
.ppl-frame-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

/* ── WhatsApp button ── */
.ppl-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}
.ppl-wa-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px;
    border-radius: 14px;
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.28);
    color: #4ade80;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}
.ppl-wa-btn:hover {
    background: rgba(37, 211, 102, 0.18);
    border-color: rgba(37, 211, 102, 0.5);
    color: #86efac;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.18);
}

/* ── CTA box ── */
.ppl-cta-box {
    width: 100%;
    max-width: 420px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 20px;
    padding: 20px 24px;
    text-align: center;
}
.ppl-cta-title {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #e2e8f0;
}
.ppl-cta-sub {
    margin: 0 0 16px;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
}
.ppl-cta-btn {
    width: 100%;
    text-decoration: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ── Error / not-found card ── */
.ppl-error-card {
    text-align: center;
    padding: 40px 24px;
    gap: 12px;
}
.ppl-error-icon {
    font-size: 2.5rem;
    color: #6366f1;
    margin-bottom: 8px;
    display: block;
}
.ppl-error-card h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
}
.ppl-error-card p {
    margin: 0 0 16px;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}

/* ── Skeleton shimmer ── */
.ppl-sk-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.11) 50%,
        rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: pplShimmer 1.5s infinite;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}
.ppl-sk-line {
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.09) 50%,
        rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: pplShimmer 1.5s infinite;
    margin-bottom: 12px;
    width: 100%;
    position: relative;
    z-index: 1;
}
.ppl-sk-line.lg {
    width: 55%;
    height: 20px;
    margin: 0 auto 16px;
    border-radius: 10px;
}
.ppl-sk-line.sm {
    width: 38%;
    margin: 0 auto 10px;
}
@keyframes pplShimmer {
    0%   { background-position:  200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .ppl-stage        { padding: 16px 12px 40px; }
    .ppl-card         { padding: 24px 18px 20px; border-radius: 22px; }
    .ppl-name         { font-size: 1.3rem; }
    .ppl-avatar-ring  { width: 86px; height: 86px; }
    .ppl-cta-box      { padding: 16px 18px; }
    .ppl-stat-val     { font-size: 1.35rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   HEAD TO HEAD — Premium redesign
   .h2h-* classes used by buildVsHtml() in script.js
═══════════════════════════════════════════════════════════════════ */

.h2h-card {
    background: linear-gradient(160deg, #0f172a 0%, #1a1040 50%, #0f172a 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.06) inset;
    position: relative;
}
.h2h-card::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ── Header ── */
.h2h-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 0;
    position: relative;
    z-index: 1;
}
.h2h-header-icon {
    font-size: 1rem;
    color: #fbbf24;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
}
.h2h-header-title {
    font-size: 0.75rem;
    font-weight: 900;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ── Avatars row ── */
.h2h-avatars {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 0;
    position: relative;
    z-index: 1;
}
.h2h-player {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}
.h2h-avatar-wrap {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    padding: 3px;
    flex-shrink: 0;
}
.h2h-avatar-them {
    background: conic-gradient(#b45309, #fbbf24, #f59e0b, #fbbf24, #b45309);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.35);
}
.h2h-avatar-them > * {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #0f172a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
}
.h2h-avatar-me {
    background: conic-gradient(#6366f1, #8b5cf6, #a78bfa, #8b5cf6, #6366f1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.45);
}
.h2h-avatar-me > * {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #0f172a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
}
.h2h-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.h2h-player-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #e2e8f0;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.h2h-player-pct {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1px;
}
.h2h-pct-them { color: #fbbf24; text-shadow: 0 0 20px rgba(251, 191, 36, 0.4); }
.h2h-pct-me   { color: #a5b4fc; text-shadow: 0 0 20px rgba(165, 180, 252, 0.4); }
.h2h-player-hours {
    font-size: 0.68rem;
    font-weight: 600;
    color: #475569;
}

/* ── VS badge ── */
.h2h-vs-badge {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 900;
    font-style: italic;
    color: #475569;
    letter-spacing: 1px;
}

/* ── Comparison bar ── */
.h2h-bar-wrap {
    display: flex;
    align-items: center;
    margin: 20px 20px 0;
    height: 8px;
    border-radius: 8px;
    overflow: hidden;
    gap: 2px;
    position: relative;
    z-index: 1;
}
.h2h-bar-them {
    height: 100%;
    background: linear-gradient(90deg, #b45309, #fbbf24);
    border-radius: 8px 0 0 8px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
    min-width: 4px;
}
.h2h-bar-divider {
    width: 2px;
    height: 100%;
    background: #0f172a;
    flex-shrink: 0;
}
.h2h-bar-me {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 0 8px 8px 0;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
    min-width: 4px;
    flex: 1;
}

/* ── Status pill ── */
.h2h-status-pill {
    margin: 14px 20px 0;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.h2h-status-pill i { font-size: 0.85rem; flex-shrink: 0; }
.h2h-status-msg {
    font-size: 0.74rem;
    color: #64748b;
    flex-basis: 100%;
    margin-top: 2px;
    font-weight: 500;
    line-height: 1.4;
}

/* ── Subject breakdown ── */
.h2h-subjects {
    margin: 16px 20px 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 14px 16px;
    position: relative;
    z-index: 1;
}
.h2h-subjects-label {
    font-size: 0.68rem;
    font-weight: 900;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.h2h-sub-row { margin-bottom: 10px; }
.h2h-sub-row:last-child { margin-bottom: 0; }
.h2h-sub-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.71rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 5px;
}
.h2h-sub-track {
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}
.h2h-sub-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Visit profile button ── */
.h2h-visit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 40px);
    margin: 14px 20px 20px;
    padding: 13px;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}
.h2h-visit-btn:hover {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.5);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2);
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .h2h-player-pct { font-size: 1.6rem; }
    .h2h-avatar-wrap { width: 56px; height: 56px; }
    .h2h-visit-btn { font-size: 0.78rem; padding: 11px; }
}