/* ═══════════════════════════════════════════════════════════
   PGH PROFILES — Full Redesign
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800;900&family=DM+Sans:wght@400;500;600&display=swap');

.pghp-wrap {
    --pa: #c0392b;
    --pa2: #a93226;
    --dark: #141414;
    --dark2: #1e1e1e;
    --mid: #2c2c2c;
    --border: #e5e7eb;
    --bg: #f4f4f4;
    --white: #ffffff;
    --text: #1a1a1a;
    --muted: #6b7280;
    --green: #16a34a;
    --red: #dc2626;
    --radius: 10px;

    font-family: 'DM Sans', sans-serif;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    color: var(--text);
}

/* ── HERO ──────────────────────────────────────────────── */
.pghp-hero {
    position: relative;
    background: var(--dark);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 0;
}

.pghp-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1a1a 50%, #1a1a1a 100%);
    opacity: .9;
}

.pghp-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.pghp-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    flex-wrap: wrap;
}

.pghp-hero-left {
    display: flex;
    gap: 16px;
    align-items: center;
    flex: 1;
    min-width: 0;
}

/* Avatar */
.pghp-avatar-wrap { position: relative; flex-shrink: 0; }

.pghp-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.15);
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
}

.pghp-trusted-badge {
    position: absolute;
    bottom: 2px; right: 2px;
    background: var(--green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--dark);
}

/* Hero info */
.pghp-display-name {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.1;
}

.pghp-hero-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 10px;
}

.pghp-hero-meta-item { font-size: 13px; color: #aaa; }

.pghp-bio {
    font-size: 14px;
    color: #ccc;
    line-height: 1.5;
    margin: 8px 0 0;
    max-width: 500px;
}

.pghp-now-playing {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    background: rgba(255,255,255,.07);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #ddd;
    border: 1px solid rgba(255,255,255,.1);
}

.pghp-np-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    animation: pghp-pulse 1.5s infinite;
}

@keyframes pghp-pulse { 0%,100%{opacity:1;} 50%{opacity:.4;} }

/* Hero right */
.pghp-hero-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-end;
    flex-shrink: 0;
}

.pghp-stats-row {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius);
    overflow: hidden;
}

.pghp-stat {
    padding: 10px 16px;
    text-align: center;
}

.pghp-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,.1);
}

.pghp-stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 3px;
}

.pghp-stat-num.pghp-stat-green { color: #4ade80; }
.pghp-stat-num.pghp-stat-red   { color: #f87171; }
.pghp-stat-label { font-size: 11px; color: #888; white-space: nowrap; }

/* Completion bar */
.pghp-completion { width: 200px; }
.pghp-completion-label { font-size: 12px; color: #888; margin-bottom: 5px; }
.pghp-completion-bar {
    background: rgba(255,255,255,.1);
    border-radius: 20px;
    height: 6px;
    overflow: hidden;
}
.pghp-completion-fill {
    background: linear-gradient(90deg, var(--pa), #e74c3c);
    height: 100%;
    border-radius: 20px;
    transition: width .4s ease;
}

/* Playstyle badges */
.pghp-playstyle-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.pghp-ps-casual          { background: rgba(59,130,246,.2); color: #93c5fd; border: 1px solid rgba(59,130,246,.3); }
.pghp-ps-competitive     { background: rgba(239,68,68,.2);  color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.pghp-ps-streamer        { background: rgba(168,85,247,.2); color: #d8b4fe; border: 1px solid rgba(168,85,247,.3); }
.pghp-ps-content-creator { background: rgba(234,179,8,.2);  color: #fde047; border: 1px solid rgba(234,179,8,.3); }
.pghp-ps-collector       { background: rgba(34,197,94,.2);  color: #86efac; border: 1px solid rgba(34,197,94,.3); }

/* ── TABS NAV ──────────────────────────────────────────── */
.pghp-tabs-nav-wrap {
    background: var(--white);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.pghp-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.pghp-tabs::-webkit-scrollbar { display: none; }

.pghp-tab {
    background: none;
    border: none;
    padding: 14px 22px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all .15s;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.pghp-tab:hover  { color: var(--text); background: #f9fafb; }
.pghp-tab.active { color: var(--pa); border-bottom-color: var(--pa); background: #fff; }
.pghp-tab-edit   { margin-left: auto; color: var(--pa); }

/* ── TAB CONTENT ───────────────────────────────────────── */
.pghp-tab-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    min-height: 300px;
    overflow: hidden;
}

.pghp-tab-panel { display: none; padding: 16px; box-sizing: border-box; width: 100%; }
.pghp-tab-panel.active { display: block; }

/* ── OVERVIEW GRID ─────────────────────────────────────── */
.pghp-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.pghp-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
}

.pghp-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pa);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.pghp-game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pghp-game-tag {
    background: #f3f4f6;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: all .15s;
}

.pghp-game-tag:hover { background: var(--pa); color: #fff; border-color: var(--pa); }

.pghp-social-links { display: flex; flex-direction: column; gap: 10px; }

.pghp-social-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 7px;
    font-size: 13px;
    transition: background .15s;
}

.pghp-social-item:hover { background: #f3f4f6; }
.pghp-social-icon  { font-size: 16px; flex-shrink: 0; }
.pghp-social-label { font-weight: 600; color: var(--muted); font-size: 11px; text-transform: uppercase; width: 55px; }
.pghp-social-item a {
    color: var(--pa);
    font-weight: 600;
    text-decoration: none;
}
.pghp-social-item a:hover { text-decoration: underline; }
.pghp-social-item a:hover { text-decoration: underline; }

.pghp-empty { font-size: 13px; color: var(--muted); }

/* ── GAMERTAGS ─────────────────────────────────────────── */
.pghp-gamertags-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.pghp-gamertag-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: box-shadow .15s;
}

.pghp-gamertag-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.pghp-gt-platform-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.pghp-gt-icon         { font-size: 18px; }
.pghp-gt-platform-name{ font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.pghp-gt-tag          { font-size: 15px; font-weight: 700; color: var(--text); }

/* ── REPUTATION ────────────────────────────────────────── */
.pghp-rep-hero {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.pghp-rep-big {
    flex: 1;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.pghp-rep-big-pos { border-top: 3px solid var(--green); }
.pghp-rep-big-neg { border-top: 3px solid var(--red); }

.pghp-rep-big-num {
    font-family: 'Outfit', sans-serif;
    font-size: 36px;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
    margin-bottom: 6px;
}

.pghp-rep-big-label { font-size: 13px; color: var(--muted); font-weight: 600; }

.pghp-reviews { display: flex; flex-direction: column; gap: 10px; }

.pghp-review {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    border-left: 4px solid var(--border);
}

.pghp-review-positive { border-left-color: var(--green); }
.pghp-review-negative { border-left-color: var(--red); }

.pghp-review-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.pghp-review-avatar { width: 32px; height: 32px; border-radius: 50%; }
.pghp-review-name   { font-size: 13px; font-weight: 700; }
.pghp-review-date   { font-size: 11px; color: var(--muted); }
.pghp-review-badge  {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: #f3f4f6;
}
.pghp-review-note {
    font-size: 13px;
    color: var(--text);
    font-style: italic;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    margin-top: 4px;
}

/* ── EDIT FORM ─────────────────────────────────────────── */
.pghp-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pghp-edit-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.pghp-edit-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pa);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.pghp-field { margin-bottom: 12px; }

.pghp-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 5px;
}

.pghp-field label small { font-weight: 400; text-transform: none; letter-spacing: 0; }

.pghp-field input[type=text],
.pghp-field input[type=email],
.pghp-field input[type=url],
.pghp-field textarea,
.pghp-field select {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}

.pghp-field input:focus,
.pghp-field textarea:focus,
.pghp-field select:focus { border-color: var(--pa); }

.pghp-field textarea { min-height: 72px; resize: vertical; }

.pghp-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pghp-privacy-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.pghp-privacy-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}

/* ── BUTTONS ───────────────────────────────────────────── */
.pghp-btn {
    display: inline-block;
    padding: 9px 20px;
    background: var(--pa);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: background .15s;
    text-decoration: none;
}

.pghp-btn:hover { background: var(--pa2); }

.pghp-btn-ghost {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text) !important;
}

.pghp-btn-ghost:hover { border-color: var(--pa); color: var(--pa) !important; background: transparent; }

.pghp-rate-btn { display: block; text-align: center; }

.pghp-save-msg {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    min-height: 18px;
}
.pghp-save-msg.ok  { color: var(--green); }
.pghp-save-msg.err { color: var(--red); }

/* ── MODAL ─────────────────────────────────────────────── */
.pghp-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.pghp-modal-inner {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    width: min(460px, 95vw);
    box-shadow: 0 24px 64px rgba(0,0,0,.25);
}

.pghp-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.pghp-modal-head h3 { font-size: 16px; font-weight: 700; margin: 0; }

.pghp-modal-close {
    background: none; border: none; font-size: 18px;
    cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 4px;
}
.pghp-modal-close:hover { background: #f3f4f6; }

.pghp-modal-foot {
    display: flex; gap: 8px; justify-content: flex-end;
    margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border);
}

.pghp-rep-type-row { display: flex; gap: 10px; }

.pghp-rep-type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all .15s;
    text-transform: none;
    letter-spacing: 0;
}

/* ── HOVER CARD ────────────────────────────────────────── */
.pghp-hover-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    min-width: 230px;
    max-width: 280px;
    overflow: hidden;
}

.pghp-card-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
}

.pghp-card-avatar-wrap { position: relative; flex-shrink: 0; }
.pghp-card-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.pghp-card-trusted {
    position: absolute; bottom:0; right:0;
    background: var(--green); color:#fff; font-size:9px; font-weight:700;
    width:14px; height:14px; border-radius:50%; display:flex; align-items:center; justify-content:center;
    border:1px solid #fff;
}
.pghp-card-name    { font-size:14px; font-weight:700; color:var(--dark); margin-bottom:3px; }
.pghp-card-playing { font-size:12px; color:var(--muted); margin:2px 0; }
.pghp-card-rep     { display:flex; gap:8px; font-size:12px; margin:4px 0; }
.pghp-rep-pos-sm   { color:var(--green); font-weight:600; }
.pghp-rep-neg-sm   { color:var(--red);   font-weight:600; }
.pghp-card-link    { font-size:12px; color:var(--pa); font-weight:600; text-decoration:none; }
.pghp-card-link:hover { text-decoration:underline; }

/* ── NOTICE ────────────────────────────────────────────── */
.pghp-notice {
    padding: 16px; background: #fef3c7;
    border: 1px solid #fde68a; border-radius: 7px;
    font-size: 14px; color: #92400e;
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 768px) {
    .pghp-hero-content   { flex-direction: column; padding: 16px; gap: 14px; }
    .pghp-hero-right     { align-items: flex-start; width: 100%; }
    .pghp-stats-row      { width: 100%; }
    .pghp-stat           { padding: 10px 12px; }
    .pghp-stat-num       { font-size: 18px; }
    .pghp-completion     { width: 100%; }
    .pghp-overview-grid  { grid-template-columns: 1fr; }
    .pghp-gamertags-grid { grid-template-columns: repeat(2, 1fr); }
    .pghp-edit-grid      { grid-template-columns: 1fr; }
    .pghp-rep-hero       { flex-direction: column; gap: 8px; }
    .pghp-field-row      { grid-template-columns: 1fr; }

    /* Tabs scroll horizontally on mobile */
    .pghp-tabs-nav-wrap  { position: static; }
    .pghp-tabs           { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .pghp-tab            { padding: 12px 14px; font-size: 12px; white-space: nowrap; }

    .pghp-tab-panel      { padding: 16px; }
}

@media (max-width: 480px) {
    .pghp-hero-left      { flex-direction: row; align-items: center; gap: 12px; }
    .pghp-avatar         { width: 56px; height: 56px; }
    .pghp-hero-meta      { flex-wrap: wrap; gap: 6px; }
    .pghp-display-name   { font-size: 18px; }
    .pghp-bio            { font-size: 13px; }
    .pghp-gamertags-grid { grid-template-columns: 1fr 1fr; }
    .pghp-rep-big-num    { font-size: 26px; }

    /* Tighten stat row on very small screens */
    .pghp-stat           { padding: 8px 10px; }
    .pghp-stat-num       { font-size: 16px; }
    .pghp-stat-label     { font-size: 10px; }
}

/* ── Rich Activity Feed ─────────────────────────────────── */
.pghp-activity-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pghp-activity-item {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    transition: border-color .15s, box-shadow .15s;
}

.pghp-activity-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

/* Source row: badge + pts + time */
.pghp-activity-source-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    flex-wrap: wrap;
}

.pghp-activity-source-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid;
    letter-spacing: .2px;
}

.pghp-activity-pts {
    font-size: 12px;
    font-weight: 800;
    color: #16a34a;
    font-family: 'Outfit', sans-serif;
}

.pghp-activity-time {
    font-size: 11px;
    color: #9ca3af;
    margin-left: auto;
}

/* Title — only clickable element */
.pghp-activity-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    margin-bottom: 5px;
    line-height: 1.4;
}

.pghp-activity-title:hover { color: var(--pa); text-decoration: underline; }

/* Excerpt */
.pghp-activity-excerpt {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 10px;
}

/* Reddit-style image */
.pghp-activity-img-wrap {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    height: 220px;
    background: var(--bg);
}

.pghp-activity-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 8px;
}

@media (max-width: 480px) {
    .pghp-activity-item { padding: 12px 13px; }
    .pghp-activity-title { font-size: 13px; }
    .pghp-activity-excerpt { font-size: 12px; }
    .pghp-activity-img-wrap,
    .pghp-activity-img { height: 180px; }
}

/* ── Avatar Upload ──────────────────────────────────────── */
.pghp-avatar-upload-wrap {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.pghp-avatar-preview-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.pghp-avatar-preview-wrap img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    display: block;
}

.pghp-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    opacity: 0;
    cursor: pointer;
    transition: opacity .2s;
}

.pghp-avatar-preview-wrap:hover .pghp-avatar-overlay { opacity: 1; }

.pghp-avatar-upload-info {
    flex: 1;
    min-width: 180px;
}

.pghp-avatar-upload-info p {
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 10px;
    line-height: 1.5;
}

.pghp-avatar-msg {
    font-size: 12px;
    margin-top: 8px;
    font-weight: 600;
}

.pghp-msg-ok { color: #16a34a; }
.pghp-msg-err { color: #dc2626; }

/* ═══════════════════════════════════════════════════════════
   TRADE BADGE & TRADES TAB
═══════════════════════════════════════════════════════════ */

/* ── Trade badge on profile card ──────────────────────── */
.pghp-card-name-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
}
.pghp-card-rank-icon { font-size: 14px; }
.pghp-card-meta {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}
.pghp-card-sep { color: var(--border); }
.pghp-card-score { font-weight: 700; color: var(--pa); }

.pghp-card-trade-badge {
    display: inline-flex;
    flex-direction: column;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
    gap: 1px;
}
.pghp-card-trade-count {
    font-size: 10px;
    font-weight: 400;
    opacity: .8;
}
.pghp-trade-elite    { background: #fdf2f1; color: #c0392b; }
.pghp-trade-verified { background: #f0fdf4; color: #16a34a; }
.pghp-trade-trusted  { background: #eff6ff; color: #2563eb; }
.pghp-trade-new      { background: #f3f4f6; color: #6b7280; }

.pghp-card-gamertags {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
    font-size: 11px;
    color: var(--muted);
}
.pghp-card-gt strong { color: var(--text); }

.pghp-card-verified {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #16a34a;
    color: #fff;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    border: 2px solid #fff;
}

/* ── Trades tab — summary bar ─────────────────────────── */
.pghp-trade-summary {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 20px;
}

.pghp-trade-badge-display {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.pghp-trade-badge-icon { font-size: 32px; line-height: 1; }

.pghp-trade-badge-label {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 3px;
}

.pghp-trade-badge-stats {
    font-size: 13px;
    color: var(--muted);
}

.pghp-trade-badge-display.pghp-trade-elite    .pghp-trade-badge-label { color: #c0392b; }
.pghp-trade-badge-display.pghp-trade-verified .pghp-trade-badge-label { color: #16a34a; }
.pghp-trade-badge-display.pghp-trade-trusted  .pghp-trade-badge-label { color: #2563eb; }
.pghp-trade-badge-display.pghp-trade-new      .pghp-trade-badge-label { color: #6b7280; }

/* Progress bar to next tier */
.pghp-trade-progress { margin-top: 4px; }
.pghp-trade-progress-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}
.pghp-trade-progress-bar {
    background: var(--bg);
    border-radius: 20px;
    height: 6px;
    overflow: hidden;
}
.pghp-trade-progress-fill {
    background: var(--pa);
    height: 100%;
    border-radius: 20px;
    transition: width .4s ease;
}

/* ── Trade feedback list ──────────────────────────────── */
.pghp-trade-feedback-list { display: flex; flex-direction: column; gap: 10px; }

.pghp-trade-feedback-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.pghp-trade-feedback-item.pghp-review-positive { border-left: 3px solid #16a34a; }
.pghp-trade-feedback-item.pghp-review-negative  { border-left: 3px solid var(--pa); }
.pghp-trade-feedback-item.pghp-review-neutral   { border-left: 3px solid #9ca3af; }

.pghp-review-right {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.pghp-trade-role-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.pghp-role-buyer  { background: #eff6ff; color: #2563eb; }
.pghp-role-seller { background: #f0fdf4; color: #16a34a; }

.pghp-trade-item-ref {
    font-size: 12px;
    color: var(--muted);
    margin: 6px 0 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pghp-trade-cat {
    background: var(--bg);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
}

/* ── Trade badge on profile hero ──────────────────────── */
.pghp-hero-trade-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
}

/* ── Load more trades JS ──────────────────────────────── */
.pghp-load-more-trades { margin-top: 8px; }

@media (max-width: 480px) {
    .pghp-trade-badge-display { gap: 10px; }
    .pghp-trade-badge-icon    { font-size: 24px; }
    .pghp-trade-badge-label   { font-size: 15px; }
    .pghp-review-right        { flex-direction: row; align-items: center; }
}

/* ═══════════════════════════════════════════════════════════
   ENHANCED HOVER CARD
═══════════════════════════════════════════════════════════ */

.pghp-hc {
    width: 260px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    font-family: 'DM Sans', sans-serif;
}

.pghp-hc-header {
    background: #1a1a1a;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pghp-hc-avatar-wrap { position: relative; flex-shrink: 0; }

.pghp-hc-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #333;
    object-fit: cover;
    display: block;
}

.pghp-hc-verified-dot {
    position: absolute;
    bottom: -1px; right: -1px;
    width: 14px; height: 14px;
    background: #16a34a;
    color: #fff;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #1a1a1a;
}

.pghp-hc-user { flex: 1; min-width: 0; }

.pghp-hc-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Outfit', sans-serif;
}

.pghp-hc-rank-icon { font-size: 13px; }

.pghp-hc-score {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.pghp-hc-body { padding: 10px 14px; }

.pghp-hc-trade {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 5px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
}
.pghp-hc-trade-stats {
    font-size: 10px;
    font-weight: 400;
    opacity: .8;
}
.pghp-hc-trade.pghp-trade-elite    { background: #fdf2f1; color: #c0392b; }
.pghp-hc-trade.pghp-trade-verified { background: #f0fdf4; color: #16a34a; }
.pghp-hc-trade.pghp-trade-trusted  { background: #eff6ff; color: #2563eb; }
.pghp-hc-trade.pghp-trade-new      { background: #f3f4f6; color: #6b7280; }

.pghp-hc-playing {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.pghp-hc-gamertags {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
}

.pghp-hc-gt {
    font-size: 11px;
    color: var(--muted);
}
.pghp-hc-gt strong { color: var(--text); }

.pghp-hc-rep {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    flex-wrap: wrap;
}

.pghp-hc-verified {
    font-size: 11px;
    font-weight: 700;
    color: #16a34a;
    background: #f0fdf4;
    padding: 1px 7px;
    border-radius: 10px;
}

.pghp-hc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    gap: 8px;
}

.pghp-hc-profile-btn {
    font-size: 12px;
    font-weight: 700;
    color: var(--pa);
    text-decoration: none;
}
.pghp-hc-profile-btn:hover { text-decoration: underline; }

.pghp-hc-rate-btn {
    font-size: 11px;
    font-weight: 700;
    background: none;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 4px 10px;
    cursor: pointer;
    color: var(--muted);
    transition: all .12s;
}
.pghp-hc-rate-btn:hover { border-color: var(--pa); color: var(--pa); }

/* ── Rate modal enhancements ──────────────────────────── */
.pghp-rep-type-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.pghp-rep-type-btn {
    flex: 1;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all .13s;
    background: var(--bg);
    -webkit-tap-highlight-color: transparent;
}
.pghp-rep-type-btn:has(input:checked) {
    border-color: var(--pa);
    background: #fdf2f1;
    color: var(--pa);
}
.pghp-rep-type-btn input { display: none; }
.pghp-char-count {
    font-size: 11px;
    color: var(--muted);
    text-align: right;
    margin-top: 4px;
}
.pghp-rate-trade-info {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    color: #15803d;
}

/* ── Phone verification ───────────────────────────────── */
.pghp-phone-verified-badge {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #15803d;
}
.pghp-field-desc {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 14px;
    line-height: 1.55;
}

/* ── Toast notification ───────────────────────────────── */
.pghp-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 999999;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.pghp-toast-ok  { border-left: 3px solid #16a34a; }
.pghp-toast-err { border-left: 3px solid #dc2626; }

/* ── Upgrade 3 — Enhanced profile hero ────────────────── */
.pghp-hero-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.pghp-hero-rank-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

.pghp-hero-phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #16a34a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    letter-spacing: .3px;
}

.pghp-hero-score-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.pghp-hero-score {
    font-size: 14px;
    font-weight: 800;
    color: var(--pa);
    font-family: 'Outfit', sans-serif;
}

.pghp-hero-rank-sep { color: rgba(255,255,255,.3); font-size: 12px; }

.pghp-hero-rank-name {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,.8);
}

.pghp-hero-next-rank {
    font-size: 11px;
    color: rgba(255,255,255,.5);
    font-style: italic;
}

@media (max-width: 480px) {
    .pghp-hero-name-row  { gap: 5px; }
    .pghp-hero-rank-icon { font-size: 18px; }
    .pghp-hero-score     { font-size: 13px; }
    .pghp-hero-next-rank { display: none; }
}
