/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GamiPress × FluentCommunity Bridge — Stylesheet
   Designed to feel native to FluentCommunity's clean
   modern UI. Uses FC's own spacing/color conventions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

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

:root {
  --gpfc-accent:   #7c3aed;
  --gpfc-accent2:  color-mix(in srgb, var(--gpfc-accent) 70%, white);
  --gpfc-surface:  #ffffff;
  --gpfc-bg:       #f6f7fb;
  --gpfc-border:   #e8eaed;
  --gpfc-text:     #1a1a2e;
  --gpfc-muted:    #6b7280;
  --gpfc-radius:   12px;
  --gpfc-shadow:   0 2px 12px rgba(0,0,0,.08);
  --gpfc-font:     'Outfit', system-ui, sans-serif;
}

/* ══════════════════════════════
   SIDEBAR WIDGET
══════════════════════════════ */
.gpfc-widget {
  font-family: var(--gpfc-font) !important;
  margin-bottom: 16px !important;
}

.gpfc-widget-title {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-family: var(--gpfc-font) !important;
  font-size: .8rem !important;
  font-weight: 600 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  color: var(--gpfc-muted) !important;
}

.gpfc-widget-title-icon { opacity: .7; font-size: .9rem; }

.gpfc-widget-body {
  padding: 4px 0 0 !important;
}

/* Points row */
.gpfc-stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--gpfc-accent) 8%, white), color-mix(in srgb, var(--gpfc-accent) 4%, white));
  border: 1px solid color-mix(in srgb, var(--gpfc-accent) 15%, transparent);
  border-radius: var(--gpfc-radius);
  margin-bottom: 12px;
}
.gpfc-stat-icon {
  width: 38px; height: 38px;
  background: color-mix(in srgb, var(--gpfc-accent) 12%, white);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.gpfc-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gpfc-accent);
  line-height: 1;
  font-family: var(--gpfc-font);
}
.gpfc-stat-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gpfc-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Rank section */
.gpfc-rank-section {
  margin-bottom: 12px;
  background: var(--gpfc-bg);
  border: 1px solid var(--gpfc-border);
  border-radius: var(--gpfc-radius);
  padding: 12px 14px;
}
.gpfc-rank-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.gpfc-rank-thumb img,
.gpfc-rank-thumb svg {
  width: 44px !important;
  height: 44px !important;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid color-mix(in srgb, var(--gpfc-accent) 25%, transparent);
}
.gpfc-rank-name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--gpfc-text);
  font-family: var(--gpfc-font);
}
.gpfc-rank-next {
  font-size: .75rem;
  color: var(--gpfc-muted);
  margin-top: 2px;
}
.gpfc-rank-top { color: var(--gpfc-accent) !important; font-weight: 600; }

/* Progress bar */
.gpfc-progress-wrap {}
.gpfc-progress-track {
  height: 7px;
  background: var(--gpfc-border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 5px;
}
.gpfc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gpfc-accent), color-mix(in srgb, var(--gpfc-accent) 70%, #a78bfa));
  border-radius: 99px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.gpfc-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  color: var(--gpfc-muted);
}
.gpfc-progress-pct {
  font-weight: 700;
  color: var(--gpfc-accent);
}

/* Badges */
.gpfc-badges-section {
  margin-top: 4px;
}
.gpfc-badges-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gpfc-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.gpfc-badges-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.gpfc-badge-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--gpfc-border);
  background: var(--gpfc-bg);
  display: flex; align-items: center; justify-content: center;
  cursor: default;
  transition: transform .15s, border-color .15s;
}
.gpfc-badge-item:hover {
  transform: scale(1.12);
  border-color: var(--gpfc-accent);
}
.gpfc-badge-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.gpfc-badge-fallback { font-size: 1.1rem; }

/* ══════════════════════════════
   HEADER CHIP
══════════════════════════════ */
.gpfc-header-chip-wrap {
  display: flex !important;
  align-items: center;
}
.gpfc-header-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: color-mix(in srgb, var(--gpfc-accent) 10%, white);
  border: 1.5px solid color-mix(in srgb, var(--gpfc-accent) 25%, transparent);
  border-radius: 99px;
  padding: 5px 12px 5px 8px;
  font-family: var(--gpfc-font);
  font-size: .8rem;
  line-height: 1;
  cursor: default;
  user-select: none;
  white-space: nowrap;
  transition: background .2s;
}
.gpfc-header-chip:hover {
  background: color-mix(in srgb, var(--gpfc-accent) 18%, white);
}
.gpfc-chip-icon   { font-size: .9rem; }
.gpfc-chip-points { font-weight: 700; color: var(--gpfc-accent); font-size: .85rem; }
.gpfc-chip-label  { color: var(--gpfc-muted); font-size: .75rem; }
.gpfc-chip-sep    { color: var(--gpfc-border); margin: 0 2px; }
.gpfc-chip-rank   { color: var(--gpfc-muted); font-size: .75rem; font-style: italic; }

/* ══════════════════════════════
   LEADERBOARD
══════════════════════════════ */
.gpfc-lb-wrap {
  font-family: var(--gpfc-font);
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 40px;
}

.gpfc-lb-header {
  padding: 32px 0 20px;
  text-align: center;
}
.gpfc-lb-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gpfc-text);
  margin: 0 0 4px;
}
.gpfc-lb-subtitle {
  font-size: .9rem;
  color: var(--gpfc-muted);
  margin: 0;
}

/* Podium */
.gpfc-lb-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 32px;
  padding: 0 10px;
}
.gpfc-podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 120px;
}
.gpfc-podium-medal { font-size: 1.6rem; line-height: 1; }
.gpfc-podium-avatar img {
  width: 52px !important; height: 52px !important;
  border-radius: 50% !important;
  border: 3px solid var(--gpfc-accent) !important;
  object-fit: cover !important;
}
.gpfc-podium-me .gpfc-podium-avatar img {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245,158,11,.25);
}
.gpfc-podium-name {
  font-weight: 700;
  font-size: .85rem;
  color: var(--gpfc-text);
  text-align: center;
  max-width: 110px;
  word-break: break-word;
  white-space: normal;
  line-height: 1.2;
}
.gpfc-podium-rank { font-size: .7rem; color: var(--gpfc-muted); text-align: center; }
.gpfc-podium-pts  { font-size: .8rem; font-weight: 700; color: var(--gpfc-accent); }
.gpfc-podium-block {
  width: 100%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--gpfc-accent) 30%, white), color-mix(in srgb, var(--gpfc-accent) 10%, white));
  border-radius: 10px 10px 0 0;
  border: 1.5px solid color-mix(in srgb, var(--gpfc-accent) 25%, transparent);
  border-bottom: none;
  margin-top: 6px;
}
.gpfc-podium-pos-1 .gpfc-podium-block { background: linear-gradient(180deg, color-mix(in srgb,var(--gpfc-accent) 50%,white), color-mix(in srgb,var(--gpfc-accent) 20%,white)); }

/* Table */
.gpfc-lb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}
.gpfc-lb-table thead th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gpfc-muted);
  font-weight: 600;
  padding: 0 14px 6px;
  text-align: left;
}
.gpfc-lb-row td {
  background: var(--gpfc-surface);
  padding: 10px 14px;
  border-top: 1px solid var(--gpfc-border);
  border-bottom: 1px solid var(--gpfc-border);
  font-size: .875rem;
}
.gpfc-lb-row td:first-child {
  border-left: 1px solid var(--gpfc-border);
  border-radius: 10px 0 0 10px;
}
.gpfc-lb-row td:last-child {
  border-right: 1px solid var(--gpfc-border);
  border-radius: 0 10px 10px 0;
}
.gpfc-lb-row--me td {
  background: color-mix(in srgb, var(--gpfc-accent) 6%, white);
  border-color: color-mix(in srgb, var(--gpfc-accent) 25%, transparent) !important;
}
.gpfc-lb-row:hover td {
  background: var(--gpfc-bg);
}
.gpfc-lb-pos  { text-align: center; width: 44px; }
.gpfc-lb-medal { font-size: 1.2rem; }
.gpfc-lb-num  { font-weight: 700; color: var(--gpfc-muted); font-size: .8rem; }
.gpfc-lb-user { display: flex; align-items: center; gap: 10px; }
.gpfc-lb-avatar img {
  width: 32px !important; height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}
.gpfc-lb-username {
  display: flex; align-items: center; gap: 7px;
  font-weight: 600;
}
.gpfc-lb-you {
  font-size: .65rem; font-weight: 700;
  padding: 2px 6px; border-radius: 99px;
  background: color-mix(in srgb, var(--gpfc-accent) 15%, white);
  color: var(--gpfc-accent);
  text-transform: uppercase; letter-spacing: .05em;
}
.gpfc-lb-rank-cell { color: var(--gpfc-muted); font-size: .82rem; }
.gpfc-lb-pts { font-weight: 700; color: var(--gpfc-accent); }
.gpfc-lb-prog { min-width: 100px; }
.gpfc-mini-bar {
  height: 5px;
  background: var(--gpfc-border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 3px;
}
.gpfc-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gpfc-accent), color-mix(in srgb, var(--gpfc-accent) 60%, #a78bfa));
  border-radius: 99px;
}
.gpfc-lb-prog small { font-size: .72rem; color: var(--gpfc-muted); }
.gpfc-lb-empty {
  text-align: center; padding: 40px;
  color: var(--gpfc-muted); font-size: .9rem;
}

/* ══════════════════════════════
   JS-INJECTED PROFILE WIDGET
══════════════════════════════ */
.gpfc-profile-widget {
  font-family: var(--gpfc-font);
  background: #fff;
  border: 1px solid var(--gpfc-border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--gpfc-shadow);
}
.gpfc-pw-title {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--gpfc-muted); margin-bottom: 14px;
}
.gpfc-pw-points {
  display: flex; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--gpfc-accent) 8%, white);
  border: 1px solid color-mix(in srgb, var(--gpfc-accent) 18%, transparent);
  border-radius: 10px; padding: 11px 14px; margin-bottom: 12px;
}
.gpfc-pw-points-icon {
  font-size: 1.3rem; width: 36px; height: 36px;
  background: color-mix(in srgb, var(--gpfc-accent) 12%, white);
  border-radius: 9px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.gpfc-pw-points-val { font-size: 1.35rem; font-weight: 700; color: var(--gpfc-accent); line-height: 1; }
.gpfc-pw-points-lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gpfc-muted); font-weight: 600; margin-top: 2px; }
.gpfc-pw-rank {
  display: flex; align-items: center; gap: 10px;
  background: var(--gpfc-bg); border: 1px solid var(--gpfc-border);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
}
.gpfc-pw-rank-img img { width: 42px !important; height: 42px !important; object-fit: contain !important; border-radius: 8px; border: 2px solid color-mix(in srgb, var(--gpfc-accent) 25%, transparent); }
.gpfc-pw-rank-name { font-weight: 700; font-size: .9rem; color: var(--gpfc-text); }
.gpfc-pw-rank-next { font-size: .72rem; color: var(--gpfc-muted); margin-top: 2px; }
.gpfc-pw-prog-wrap { margin-bottom: 12px; }
.gpfc-pw-prog-track { height: 6px; background: var(--gpfc-border); border-radius: 99px; overflow: hidden; margin-bottom: 5px; }
.gpfc-pw-prog-fill { height: 100%; background: linear-gradient(90deg, var(--gpfc-accent), color-mix(in srgb, var(--gpfc-accent) 65%, #a78bfa)); border-radius: 99px; transition: width .8s ease; }
.gpfc-pw-prog-labels { display: flex; justify-content: space-between; font-size: .68rem; color: var(--gpfc-muted); }
.gpfc-pw-prog-pct { font-weight: 700; color: var(--gpfc-accent); }
.gpfc-pw-badges-lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gpfc-muted); font-weight: 600; margin-bottom: 8px; }
.gpfc-pw-badges { display: grid; grid-template-columns: repeat(6,1fr); gap: 5px; }
.gpfc-pw-badge {
  aspect-ratio: 1; border-radius: 7px; border: 1.5px solid var(--gpfc-border);
  background: var(--gpfc-bg); display: flex; align-items: center;
  justify-content: center; overflow: hidden; font-size: 1rem; cursor: default;
  transition: transform .15s, border-color .15s;
}
.gpfc-pw-badge:hover { transform: scale(1.12); border-color: var(--gpfc-accent); }
.gpfc-pw-badge img { width: 100% !important; height: 100% !important; object-fit: cover !important; }

/* ══════════════════════════════
   FEED AUTHOR BADGE
══════════════════════════════ */
.gpfc-author-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--gpfc-font);
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--gpfc-accent) 10%, white);
  border: 1px solid color-mix(in srgb, var(--gpfc-accent) 20%, transparent);
  color: var(--gpfc-accent);
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}
.gpfc-author-badge-icon { font-size: .75rem; }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */

/* Override Kadence theme — it hides table columns on mobile */
.gpfc-lb-wrap table,
.gpfc-lb-wrap thead,
.gpfc-lb-wrap tbody,
.gpfc-lb-wrap tr,
.gpfc-lb-wrap th,
.gpfc-lb-wrap td { display: revert !important; }

.gpfc-lb-wrap .gpfc-lb-table { display: table !important; width: 100% !important; }
.gpfc-lb-wrap .gpfc-lb-table thead { display: table-header-group !important; }
.gpfc-lb-wrap .gpfc-lb-table tbody { display: table-row-group !important; }
.gpfc-lb-wrap .gpfc-lb-table tr { display: table-row !important; }
.gpfc-lb-wrap .gpfc-lb-table th,
.gpfc-lb-wrap .gpfc-lb-table td { display: table-cell !important; visibility: visible !important; opacity: 1 !important; }

@media (max-width: 600px) {
  .gpfc-lb-podium { gap: 6px; }
  .gpfc-podium-item { flex: 0 0 90px; }
  .gpfc-badges-grid { grid-template-columns: repeat(4, 1fr); }

  /* Tighten table for mobile */
  .gpfc-lb-wrap .gpfc-lb-table thead th,
  .gpfc-lb-wrap .gpfc-lb-row td { padding: 8px 6px !important; font-size: .78rem !important; }
  .gpfc-lb-pos { width: 28px; }
  .gpfc-lb-avatar img { width: 24px !important; height: 24px !important; }
  .gpfc-lb-username { font-size: .78rem; }
}
