/* ═══════════════════════════════════════════════════════════════════
   H2H PREMIUM REDESIGN  ·  h2h-premium.css
   Add this <link> AFTER profile.css in index.html
   ────────────────────────────────────────────────────────────────────
   Covers:
   1. Player Modal (#playerModal → .player-modal-card → #ptab-h2h)
   2. Profile Page H2H card (.h2h-card from buildVsHtml)
   Zero JS changes · Zero feature removal · Surgical CSS overrides only
═══════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────
   SECTION 1 ── PLAYER MODAL SHELL
───────────────────────────────────────────────────────────────── */

/* Overlay */
#playerModal {
    background: rgba(2, 6, 15, 0.92) !important;
    backdrop-filter: blur(24px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
}

/* Card */
.player-modal-card {
    background: #060c1a !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    border-radius: 28px !important;
    max-width: 480px !important;
    max-height: 92vh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 0 80px rgba(99, 102, 241, 0.14),
        0 48px 120px rgba(0, 0, 0, 0.85) !important;
}

/* Ambient top glow */
.player-modal-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0; left: 50%; transform: translateX(-50%) !important;
    width: 480px; height: 240px !important;
    background: radial-gradient(ellipse at 50% 0%,
        rgba(99, 102, 241, 0.18) 0%,
        rgba(139, 92, 246, 0.06) 40%,
        transparent 70%) !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

/* ── HEADER ── */
.player-modal-header {
    padding: 26px 24px 20px !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    position: relative !important;
    z-index: 1 !important;
    flex-shrink: 0 !important;
}

.player-header-glow-bg {
    position: absolute !important; inset: 0 !important;
    background:
        radial-gradient(ellipse at 20% 60%, rgba(99, 102, 241, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 0%,  rgba(251, 191, 36,  0.07) 0%, transparent 50%) !important;
    pointer-events: none !important;
}

/* Close button */
.pm-close-btn {
    width: 30px !important; height: 30px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: #475569 !important;
    font-size: 0.78rem !important;
    transition: all 0.22s ease !important;
}
.pm-close-btn:hover {
    background: rgba(239, 68, 68, 0.14) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
    transform: rotate(90deg) !important;
}

/* Header avatar ring */
.pm-avatar-ring {
    width: 68px !important; height: 68px !important;
    border-radius: 50% !important; padding: 3px !important;
    background: conic-gradient(#fbbf24, #f97316, #fbbf24) !important;
    box-shadow: 0 0 28px rgba(251, 191, 36, 0.45), 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    animation: h2hRingGold 4s linear infinite !important;
    position: relative !important; z-index: 1 !important;
    flex-shrink: 0 !important;
}
@keyframes h2hRingGold { to { filter: hue-rotate(30deg) brightness(1.1); } }

.pm-avatar-inner {
    width: 100% !important; height: 100% !important;
    border-radius: 50% !important;
    background: #0b1221 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    font-size: 1.6rem !important; color: #fbbf24 !important;
    overflow: hidden !important;
}
.pm-avatar-inner img {
    width: 100% !important; height: 100% !important;
    object-fit: cover !important; border-radius: 50% !important; display: block !important;
}

/* Name */
.pm-player-name {
    font-size: 1.18rem !important; font-weight: 800 !important;
    color: #ffffff !important; letter-spacing: -0.4px !important;
    margin: 0 0 10px !important;
}

/* Rank pill */
.pm-rank-pill {
    background: linear-gradient(135deg, #92400e, #fbbf24) !important;
    color: #000 !important; font-weight: 900 !important;
    border: none !important; border-radius: 7px !important;
    padding: 4px 11px !important; font-size: 0.72rem !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 3px 14px rgba(251, 191, 36, 0.4) !important;
}

/* Score pill */
.pm-score-pill {
    background: rgba(99, 102, 241, 0.1) !important;
    border: 1px solid rgba(99, 102, 241, 0.32) !important;
    color: #a5b4fc !important; font-weight: 800 !important;
    border-radius: 7px !important; padding: 4px 11px !important; font-size: 0.72rem !important;
}

/* ── TAB BAR ── */
.pm-tabs {
    background: rgba(0, 0, 0, 0.32) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 0 4px !important;
    flex-shrink: 0 !important; position: relative !important; z-index: 1 !important;
}
.pm-tab {
    padding: 13px 10px 11px !important;
    color: #475569 !important; font-size: 0.76rem !important;
    font-weight: 700 !important; letter-spacing: 0.4px !important;
    transition: color 0.2s !important;
}
.pm-tab.active { color: #f1f5f9 !important; }
.pm-tab.active i { color: #818cf8 !important; }
.pm-tab i { transition: transform 0.25s ease, color 0.2s !important; }
.pm-tab:hover i { transform: translateY(-2px) !important; color: #e2e8f0 !important; }

.pm-tab-indicator {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #c084fc) !important;
    height: 2.5px !important; bottom: 0 !important;
    border-radius: 2px 2px 0 0 !important;
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.75) !important;
    transition: left 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* ── H2H PANE: scrollable container ── */
#ptab-h2h {
    overflow-y: auto !important;
    flex: 1 !important; min-height: 0 !important;
    scrollbar-width: none !important; -ms-overflow-style: none !important;
    padding: 0 !important;
    animation: h2hPaneIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
#ptab-h2h::-webkit-scrollbar { display: none !important; }
@keyframes h2hPaneIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────────────────────────
   SECTION 2 ── MODAL H2H: VS HEROES BLOCK
───────────────────────────────────────────────────────────────── */

/* The hero section inside the pane */
.h2h-vs-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 22px 20px 20px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.016) !important;
    position: relative !important;
}

/* Gradient separator */
.h2h-vs-header::after {
    content: '' !important;
    position: absolute !important; bottom: 0; left: 14px; right: 14px !important;
    height: 1px !important;
    background: linear-gradient(90deg,
        transparent,
        rgba(251, 191, 36, 0.22),
        rgba(255, 255, 255, 0.08),
        rgba(99, 102, 241, 0.22),
        transparent) !important;
}

/* Sides */
.h2h-side {
    flex: 1 !important; display: flex !important;
    flex-direction: column !important; align-items: center !important;
    gap: 7px !important; text-align: center !important;
}

/* Modal h2h avatars */
.h2h-avatar {
    width: 68px !important; height: 68px !important;
    border-radius: 50% !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    font-size: 1.5rem !important;
    position: relative !important; overflow: hidden !important;
    transition: box-shadow 0.3s ease !important;
}
.h2h-avatar img {
    width: 100% !important; height: 100% !important;
    object-fit: cover !important; border-radius: 50% !important;
    position: absolute !important; inset: 0 !important; z-index: 1 !important;
}

.h2h-avatar-them {
    background: conic-gradient(#92400e, #fbbf24, #f59e0b, #fbbf24, #92400e) !important;
    box-shadow:
        0 0 0 3px rgba(251, 191, 36, 0.18),
        0 0 28px rgba(251, 191, 36, 0.4),
        0 10px 28px rgba(0, 0, 0, 0.5) !important;
    animation: h2hGlowGold 2.5s ease-in-out infinite !important;
    padding: 3px !important;
    color: #fbbf24 !important;
}
.h2h-avatar-them::before {
    content: '' !important;
    position: absolute !important; inset: 3px !important;
    border-radius: 50% !important; background: #0b1221 !important; z-index: 0 !important;
}
.h2h-avatar-them > i { position: relative !important; z-index: 1 !important; }

.h2h-avatar-you {
    background: conic-gradient(#4338ca, #6366f1, #a78bfa, #6366f1, #4338ca) !important;
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.18),
        0 0 28px rgba(99, 102, 241, 0.4),
        0 10px 28px rgba(0, 0, 0, 0.5) !important;
    animation: h2hSpinRing 7s linear infinite !important;
    padding: 3px !important;
    color: #a5b4fc !important;
    border: none !important;
}
.h2h-avatar-you::before {
    content: '' !important;
    position: absolute !important; inset: 3px !important;
    border-radius: 50% !important; background: #0b1221 !important; z-index: 0 !important;
}
.h2h-avatar-you > i { position: relative !important; z-index: 1 !important; }

@keyframes h2hGlowGold {
    0%, 100% { box-shadow: 0 0 0 3px rgba(251,191,36,0.18), 0 0 20px rgba(251,191,36,0.3), 0 10px 28px rgba(0,0,0,0.5); }
    50%       { box-shadow: 0 0 0 3px rgba(251,191,36,0.35), 0 0 40px rgba(251,191,36,0.6), 0 10px 28px rgba(0,0,0,0.5); }
}
@keyframes h2hSpinRing { to { filter: hue-rotate(360deg); } }

/* Player names (modal) */
.h2h-player-name {
    font-size: 0.8rem !important; font-weight: 700 !important;
    color: #e2e8f0 !important;
    max-width: 88px !important; overflow: hidden !important;
    text-overflow: ellipsis !important; white-space: nowrap !important;
}

/* Score numbers */
.h2h-player-score {
    font-size: 2.2rem !important; font-weight: 900 !important;
    line-height: 1 !important; letter-spacing: -2.5px !important;
    font-variant-numeric: tabular-nums !important;
}
.h2h-score-them {
    color: #fbbf24 !important;
    text-shadow:
        0 0 20px rgba(251, 191, 36, 0.6),
        0 0 50px rgba(251, 191, 36, 0.2) !important;
}
.h2h-score-you {
    color: #a5b4fc !important;
    text-shadow:
        0 0 20px rgba(165, 180, 252, 0.6),
        0 0 50px rgba(99, 102, 241, 0.25) !important;
}

/* VS Orb */
.h2h-vs-orb {
    width: 52px !important; height: 52px !important;
    position: relative !important; flex-shrink: 0 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
}
.h2h-vs-ring {
    position: absolute !important; inset: 0 !important;
    border-radius: 50% !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.025) !important;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.6) inset !important;
}
.h2h-vs-text {
    position: relative !important; z-index: 2 !important;
    font-size: 0.82rem !important; font-weight: 900 !important;
    font-style: italic !important; letter-spacing: 2px !important;
    background: linear-gradient(135deg, #fbbf24 0%, #ec4899 50%, #818cf8 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* ─────────────────────────────────────────────────────────────────
   SECTION 3 ── MODAL H2H: OVERALL PROGRESS TRACK
───────────────────────────────────────────────────────────────── */

.h2h-row-wrap {
    padding: 20px 20px 0 !important; margin: 0 !important;
}
.h2h-row-label {
    display: block !important; font-size: 0.56rem !important;
    font-weight: 900 !important; text-transform: uppercase !important;
    letter-spacing: 2.5px !important; color: #2d3a4e !important;
    margin-bottom: 9px !important;
}
.h2h-dual-track {
    height: 14px !important; border-radius: 14px !important;
    overflow: hidden !important; background: rgba(255,255,255,0.04) !important;
    display: flex !important;
    box-shadow:
        inset 0 2px 10px rgba(0, 0, 0, 0.55),
        inset 0 -1px 0 rgba(255, 255, 255, 0.03) !important;
}
.h2h-fill-them {
    height: 100% !important;
    background: linear-gradient(90deg, #78350f, #d97706, #fbbf24, #fde68a) !important;
    border-radius: 14px 0 0 14px !important;
    box-shadow: 6px 0 20px rgba(251, 191, 36, 0.55) !important;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    min-width: 7px !important;
}
.h2h-track-gap {
    width: 3px !important; background: #050b16 !important; flex-shrink: 0 !important;
}
.h2h-fill-you {
    height: 100% !important;
    background: linear-gradient(90deg, #312e81, #4f46e5, #818cf8, #c7d2fe) !important;
    border-radius: 0 14px 14px 0 !important;
    box-shadow: -6px 0 20px rgba(99, 102, 241, 0.55) !important;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    flex: 1 !important; min-width: 7px !important;
}

/* ─────────────────────────────────────────────────────────────────
   SECTION 4 ── MODAL H2H: SUBJECT BARS
───────────────────────────────────────────────────────────────── */

#h2h-subject-bars {
    padding: 16px 16px 4px !important;
    display: flex !important; flex-direction: column !important;
    gap: 8px !important;
}

/* Each subject row */
.h2h-subject-row {
    background: rgba(255, 255, 255, 0.022) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 14px !important;
    padding: 12px 14px !important;
    transition: background 0.18s, border-color 0.18s, transform 0.2s !important;
    cursor: default !important;
}
.h2h-subject-row:hover {
    background: rgba(99, 102, 241, 0.048) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
    transform: translateX(3px) !important;
}

/* Subject name + badge row */
.h2h-sub-label {
    display: flex !important; align-items: center !important;
    justify-content: space-between !important; margin-bottom: 9px !important;
}
.h2h-sub-name {
    font-size: 0.7rem !important; font-weight: 800 !important;
    color: #64748b !important; text-transform: uppercase !important;
    letter-spacing: 0.9px !important;
}

/* Win badges */
.h2h-win-badge {
    font-size: 0.58rem !important; font-weight: 900 !important;
    padding: 2px 8px !important; border-radius: 20px !important;
    text-transform: uppercase !important; letter-spacing: 0.5px !important;
}
.h2h-win-badge.you {
    background: rgba(99, 102, 241, 0.14) !important;
    color: #a5b4fc !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
}
.h2h-win-badge.them {
    background: rgba(251, 191, 36, 0.1) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.28) !important;
}
.h2h-draw-badge {
    font-size: 0.58rem !important; font-weight: 700 !important;
    color: #334155 !important; background: rgba(255,255,255,0.04) !important;
    padding: 2px 8px !important; border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* Bar rows */
.h2h-sub-bars { display: flex !important; flex-direction: column !important; gap: 5px !important; }
.h2h-sub-bar-row {
    display: flex !important; align-items: center !important; gap: 8px !important;
}
.h2h-sub-pct {
    font-size: 0.68rem !important; font-weight: 800 !important;
    min-width: 30px !important; text-align: right !important;
    font-variant-numeric: tabular-nums !important;
}
.them-pct { color: #fbbf24 !important; }
.you-pct  { color: #818cf8 !important; }

.h2h-sub-track {
    flex: 1 !important; height: 5px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    border-radius: 4px !important; overflow: hidden !important;
}
.h2h-sub-fill { height: 100% !important; border-radius: 4px !important; }
.fill-them {
    background: linear-gradient(90deg, #b45309, #fbbf24) !important;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.45) !important;
}
.fill-you {
    background: linear-gradient(90deg, #4338ca, #818cf8) !important;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.45) !important;
}

/* Win dots (used inside sub name in profile H2H) */
.h2h-win-dot { width: 5px !important; height: 5px !important; border-radius: 50% !important; }
.h2h-win-dot.them { background: #fbbf24 !important; box-shadow: 0 0 5px rgba(251,191,36,0.7) !important; }
.h2h-win-dot.you  { background: #6366f1 !important; box-shadow: 0 0 5px rgba(99,102,241,0.7) !important; }

/* ─────────────────────────────────────────────────────────────────
   SECTION 5 ── MODAL H2H: MESSAGE BOX + VISIT BUTTON
───────────────────────────────────────────────────────────────── */

.h2h-message-box {
    margin: 14px 16px 0 !important;
    padding: 16px 18px !important;
    background: rgba(255, 255, 255, 0.022) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
    font-size: 0.86rem !important; color: #94a3b8 !important;
    line-height: 1.65 !important; text-align: center !important;
    position: relative !important; overflow: hidden !important;
}
.h2h-message-box::before {
    content: '' !important; position: absolute !important;
    top: 0; left: 0; right: 0; height: 1px !important;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(251, 191, 36, 0.35) 30%,
        rgba(99, 102, 241, 0.35) 70%,
        transparent 100%) !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% - 32px) !important;
    margin: 14px 16px 22px !important;
    padding: 14px !important; border-radius: 14px !important;
    background: rgba(99, 102, 241, 0.07) !important;
    border: 1px solid rgba(99, 102, 241, 0.26) !important;
    color: #a5b4fc !important; font-size: 0.87rem !important;
    font-weight: 700 !important; cursor: pointer !important;
    font-family: inherit !important; letter-spacing: 0.2px !important;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    position: relative !important; overflow: hidden !important;
}
.pm-visit-profile-btn::before {
    content: '' !important; position: absolute !important; inset: 0 !important;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.15),
        rgba(139, 92, 246, 0.08)) !important;
    opacity: 0 !important; transition: opacity 0.2s !important;
}
.pm-visit-profile-btn:hover {
    border-color: rgba(99, 102, 241, 0.6) !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3) !important;
}
.pm-visit-profile-btn:hover::before { opacity: 1 !important; }
.pm-visit-profile-btn:active { transform: scale(0.97) translateY(0) !important; }


/* ═══════════════════════════════════════════════════════════════
   SECTION 6 ── PROFILE PAGE H2H CARD  (.h2h-card)
   Built by buildVsHtml() — completely separate element from modal
═══════════════════════════════════════════════════════════════ */

/* The VS section wrapper */
#profPage-vs-section { border-radius: 24px !important; overflow: hidden !important; }

/* Main card */
.h2h-card {
    background: linear-gradient(165deg,
        #060c1a 0%, #0b1030 40%,
        #08103a 60%, #060c1a 100%) !important;
    border: 1px solid rgba(99, 102, 241, 0.22) !important;
    border-radius: 24px !important; overflow: hidden !important;
    position: relative !important;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 28px 70px rgba(0,0,0,0.6),
        0 0 100px rgba(99,102,241,0.07) !important;
}

/* Background ambient */
.h2h-card::before {
    content: '' !important; position: absolute !important;
    top: -60px; left: 50%; transform: translateX(-50%) !important;
    width: 400px; height: 300px !important;
    background: radial-gradient(ellipse,
        rgba(99,102,241,0.12) 0%,
        transparent 65%) !important;
    border-radius: 50% !important;
    pointer-events: none !important; z-index: 0 !important;
}

/* ── Card header ── */
.h2h-header {
    display: flex !important; align-items: center !important; gap: 10px !important;
    padding: 18px 20px 0 !important;
    position: relative !important; z-index: 1 !important;
}
.h2h-header-icon {
    font-size: 0.95rem !important; color: #fbbf24 !important;
    filter: drop-shadow(0 0 8px rgba(251,191,36,0.65)) !important;
}
.h2h-header-title {
    font-size: 0.64rem !important; font-weight: 900 !important;
    color: #2d3a4e !important; text-transform: uppercase !important;
    letter-spacing: 2.5px !important;
}

/* ── Avatars row ── */
.h2h-avatars {
    display: flex !important; align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 20px 16px !important;
    position: relative !important; z-index: 1 !important;
}
.h2h-player {
    flex: 1 !important; display: flex !important;
    flex-direction: column !important; align-items: center !important;
    gap: 6px !important; text-align: center !important;
}
.h2h-avatar-wrap {
    width: 72px !important; height: 72px !important;
    border-radius: 50% !important; padding: 3px !important;
    flex-shrink: 0 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
}
.h2h-avatar-them {
    background: conic-gradient(#78350f, #d97706, #fbbf24, #f59e0b, #78350f) !important;
    box-shadow: 0 0 28px rgba(251,191,36,0.42), 0 10px 28px rgba(0,0,0,0.45) !important;
}
.h2h-avatar-them > * {
    width: 100% !important; height: 100% !important; border-radius: 50% !important;
    background: #080e1c !important; overflow: hidden !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    color: #fbbf24 !important; font-size: 1.5rem !important;
}
.h2h-avatar-me {
    background: conic-gradient(#312e81, #6366f1, #a78bfa, #6366f1, #312e81) !important;
    box-shadow: 0 0 28px rgba(99,102,241,0.45), 0 10px 28px rgba(0,0,0,0.45) !important;
    animation: h2hSpinRing 7s linear infinite !important;
}
.h2h-avatar-me > * {
    width: 100% !important; height: 100% !important; border-radius: 50% !important;
    background: #080e1c !important; overflow: hidden !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    color: #a5b4fc !important; font-size: 1.5rem !important;
}
.h2h-avatar-wrap img {
    width: 100% !important; height: 100% !important;
    object-fit: cover !important; border-radius: 50% !important; display: block !important;
}

/* Player names (profile h2h) */
.h2h-player-name {
    font-size: 0.78rem !important; font-weight: 700 !important;
    color: #e2e8f0 !important; max-width: 100px !important;
    overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important;
}

/* Percentage scores */
.h2h-player-pct {
    font-size: 2.1rem !important; font-weight: 900 !important;
    line-height: 1 !important; letter-spacing: -2px !important;
    font-variant-numeric: tabular-nums !important;
}
.h2h-pct-them {
    color: #fbbf24 !important;
    text-shadow: 0 0 24px rgba(251,191,36,0.55), 0 0 50px rgba(251,191,36,0.18) !important;
}
.h2h-pct-me {
    color: #a5b4fc !important;
    text-shadow: 0 0 24px rgba(165,180,252,0.55), 0 0 50px rgba(99,102,241,0.18) !important;
}
.h2h-player-hours {
    font-size: 0.66rem !important; font-weight: 600 !important; color: #334155 !important;
}

/* VS Badge (profile h2h) */
.h2h-vs-badge {
    width: 46px !important; height: 46px !important; flex-shrink: 0 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    background: rgba(255,255,255,0.03) !important;
    border: 1.5px solid rgba(255,255,255,0.07) !important;
    border-radius: 50% !important;
    font-size: 0.74rem !important; font-weight: 900 !important;
    font-style: italic !important; letter-spacing: 1px !important;
    background: linear-gradient(135deg, #fbbf24, #ec4899, #818cf8) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* ── Comparison bar (profile h2h) ── */
.h2h-bar-wrap {
    display: flex !important; align-items: center !important;
    margin: 4px 20px 0 !important;
    height: 12px !important; border-radius: 12px !important;
    overflow: hidden !important; gap: 2px !important;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.5) !important;
    background: rgba(255,255,255,0.04) !important;
    position: relative !important; z-index: 1 !important;
}
.h2h-bar-them {
    height: 100% !important;
    background: linear-gradient(90deg, #78350f, #f59e0b, #fbbf24) !important;
    border-radius: 12px 0 0 12px !important;
    transition: width 0.9s cubic-bezier(0.34,1.56,0.64,1) !important;
    box-shadow: 5px 0 16px rgba(251,191,36,0.5) !important;
    min-width: 6px !important;
}
.h2h-bar-divider { width: 3px !important; background: #060c1a !important; flex-shrink: 0 !important; }
.h2h-bar-me {
    height: 100% !important;
    background: linear-gradient(90deg, #4338ca, #6366f1, #a5b4fc) !important;
    border-radius: 0 12px 12px 0 !important;
    transition: width 0.9s cubic-bezier(0.34,1.56,0.64,1) !important;
    box-shadow: -5px 0 16px rgba(99,102,241,0.5) !important;
    flex: 1 !important; min-width: 6px !important;
}

/* ── Status pill (profile h2h) ── */
.h2h-status-pill {
    margin: 14px 20px 0 !important;
    padding: 12px 16px !important; border-radius: 14px !important;
    border: 1px solid !important;
    display: flex !important; align-items: center !important;
    gap: 9px !important; flex-wrap: wrap !important;
    position: relative !important; z-index: 1 !important;
    background: rgba(255,255,255,0.018) !important;
}
.h2h-status-pill i { font-size: 0.88rem !important; flex-shrink: 0 !important; }
.h2h-status-msg {
    font-size: 0.73rem !important; color: #475569 !important;
    flex-basis: 100% !important; font-weight: 500 !important;
    line-height: 1.45 !important; margin-top: 1px !important;
}

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

/* ── Visit button (profile h2h) ── */
.h2h-visit-btn {
    display: flex !important; align-items: center !important;
    justify-content: center !important; gap: 8px !important;
    width: calc(100% - 40px) !important; margin: 14px 20px 20px !important;
    padding: 13px !important; border-radius: 14px !important;
    background: rgba(99,102,241,0.07) !important;
    border: 1px solid rgba(99,102,241,0.24) !important;
    color: #a5b4fc !important; font-size: 0.85rem !important;
    font-weight: 700 !important; cursor: pointer !important;
    transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1) !important;
    position: relative !important; z-index: 1 !important;
    font-family: inherit !important;
}
.h2h-visit-btn:hover {
    background: rgba(99,102,241,0.18) !important;
    border-color: rgba(99,102,241,0.52) !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(99,102,241,0.28) !important;
}
.h2h-visit-btn:active { transform: scale(0.97) !important; }

/* ═══════════════════════════════════════════════════════════════
   SECTION 7 ── MOBILE OVERRIDES
═══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    /* Modal slides up from bottom on mobile */
    #playerModal {
        align-items: flex-end !important;
        padding: 0 !important;
    }
    .player-modal-card {
        border-radius: 24px 24px 0 0 !important;
        max-height: 88vh !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Tighter hero on small screens */
    .h2h-vs-header { padding: 18px 16px 16px !important; }
    .h2h-avatar     { width: 56px !important; height: 56px !important; }
    .h2h-player-score { font-size: 1.75rem !important; }

    /* Subject bars */
    #h2h-subject-bars { padding: 12px 12px 4px !important; }
    .h2h-sub-name { font-size: 0.64rem !important; }

    /* Message + button */
    .h2h-message-box { margin: 10px 12px 0 !important; font-size: 0.82rem !important; }
    .pm-visit-profile-btn { margin: 12px 12px 18px !important; width: calc(100% - 24px) !important; }

    /* Profile h2h */
    .h2h-avatars { padding: 14px 16px 12px !important; }
    .h2h-avatar-wrap { width: 60px !important; height: 60px !important; }
    .h2h-player-pct { font-size: 1.7rem !important; }
    .h2h-visit-btn { margin: 12px 16px 18px !important; width: calc(100% - 32px) !important; }
}
