/* ═══════════════════════════════════════════════════════════
   Global Palamós Stats v5
   Rèplica exacta de l'estil "Cádiz CF" — panells nets, sense
   gradients, amb els colors del Global Palamós (blau marí / daurat)
   ═══════════════════════════════════════════════════════════ */

:root{
  --gp-navy:   #0d2b55;   /* color principal del club, substitueix el negre del Cádiz */
  --gp-gold:   #f5c518;   /* accent daurat del club */
  --gp-green:  #1a9e50;
  --gp-red:    #d63031;
  --gp-text:   #1a1a1a;
  --gp-muted:  #6b7280;
  --gp-border: #ececec;
  --gp-bg-box: #f2f3f5;
  --gp-white:  #ffffff;
}

#gps-root{
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--gp-text);
  width: 100%;
  -webkit-font-smoothing: antialiased;
}
#gps-root *, #gps-root *::before, #gps-root *::after{ box-sizing: border-box; }

/* ── Skeleton ── */
.gps-skeleton{ display:flex; gap:24px; }
.gps-sk-header{ display:none; }
.gps-sk-body{ flex:1; height:420px; background:#f0f0f0; border-radius:8px; animation: gps-pulse 1.3s ease infinite; }
@keyframes gps-pulse{ 0%,100%{opacity:1} 50%{opacity:.55} }

/* ── Rows / Grid layout ── */
.gps-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.gps-row:last-child{ margin-bottom: 0; }
.gps-col{ min-width: 0; }
.gps-panel-wide{ width: 100%; }

/* ── Panel base (la tarjeta blanca neta) ── */
.gps-panel{
  background: var(--gp-white);
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  border: 1px solid #f0f0f0;
  height: 100%;
}

.gps-panel-title{
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--gp-text) !important;
  margin: 0 0 22px !important;
  padding: 0 !important;
  border: none !important;
}

.gps-sub-title{
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--gp-text) !important;
  margin: 4px 0 14px !important;
  padding: 0 !important;
  border: none !important;
}

/* ── Total partits ── */
.gps-pj-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.gps-pj-lbl{ font-size: 14px; color: var(--gp-text); }
.gps-pj-val{ font-size: 14px; font-weight: 600; color: var(--gp-muted); }

/* ── V/E/D boxes ── */
.gps-ved-grid{
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.gps-ved-box{
  background: var(--gp-bg-box);
  border-radius: 10px;
  padding: 16px 8px;
  text-align: center;
}
.gps-ved-num{
  display: block;
  font-size: 30px;
  font-weight: 700;
  color: var(--gp-text);
  line-height: 1;
}
.gps-ved-lbl{
  display: block;
  font-size: 12px;
  color: var(--gp-muted);
  margin-top: 6px;
}

/* ── Gols bar ── */
.gps-goals-row{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.gps-goals-side{
  font-size: 22px;
  font-weight: 700;
  color: var(--gp-text);
  min-width: 28px;
}
.gps-goals-track{
  flex: 1;
  height: 7px;
  background: #e6e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.gps-goals-fill{
  height: 100%;
  background: var(--gp-gold);
  border-radius: 4px;
}
.gps-goals-legend{
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: var(--gp-muted);
  margin-bottom: 26px;
}
.gps-dot{ display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.gps-dot-a{ background: var(--gp-gold); }
.gps-dot-r{ background: #cfd2d8; }

/* ── Línies inferiors (Gols com a local, etc.) ── */
.gps-line-rows{ }
.gps-line-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--gp-border);
  font-size: 14px;
  color: var(--gp-text);
}
.gps-line-row strong{ font-weight: 700; }

/* ══ CLASSIFICACIÓ ══════════════════════════════════════════ */
.gps-cl-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.gps-cl-table thead tr{
  border-bottom: 1px solid var(--gp-border);
}
.gps-cl-table th{
  padding: 0 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gp-muted);
  text-align: right;
}
.gps-cl-th-club{ text-align: left !important; }
.gps-cl-table td{
  padding: 14px 8px;
  border-bottom: 1px solid var(--gp-border);
  text-align: right;
  color: var(--gp-text);
  vertical-align: middle;
}
.gps-cl-table tbody tr:last-child td{ border-bottom: none; }

.gps-cl-pos{ text-align: left !important; color: var(--gp-muted); font-size: 13px; width: 22px; }
.gps-cl-club{
  text-align: left !important;
  font-weight: 500;
}
.gps-cl-club span{ vertical-align: middle; }
.gps-cl-club .gps-logo,
.gps-cl-club .gps-logo-init{
  margin-right: 10px;
  vertical-align: middle;
}
.gps-cl-pts{ font-weight: 700; }
.gps-cl-sec{ color: var(--gp-muted); }

/* Fila destacada — el nostre equip (com el "Cádiz CF" fosc a la imatge) */
.gps-cl-us td{
  background: var(--gp-navy) !important;
  color: var(--gp-white) !important;
  font-weight: 700;
}
.gps-cl-us .gps-cl-pos{ color: var(--gp-gold) !important; }
.gps-cl-us .gps-cl-club{ color: var(--gp-white) !important; }
.gps-cl-us .gps-cl-pts{ color: var(--gp-gold) !important; }
.gps-cl-us .gps-cl-sec{ color: rgba(255,255,255,.75) !important; }
.gps-cl-us td:first-child{ border-radius: 8px 0 0 8px; }
.gps-cl-us td:last-child{ border-radius: 0 8px 8px 0; }

.gps-cl-legend{
  display: flex;
  gap: 20px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--gp-muted);
}
.gps-cl-legend b{ color: var(--gp-text); }

/* ══ PROPER PARTIT ═══════════════════════════════════════════ */
.gps-pp-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.gps-pp-team{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gp-text);
  flex: 1;
}
.gps-pp-mid{ text-align: center; flex-shrink: 0; }
.gps-pp-vs{
  font-size: 14px;
  font-weight: 700;
  color: var(--gp-muted);
}
.gps-pp-time{
  font-size: 22px;
  font-weight: 700;
  color: var(--gp-navy);
}
.gps-pp-date{
  font-size: 12px;
  color: var(--gp-muted);
  margin-top: 2px;
}
.gps-pp-venue{
  text-align: center;
  font-size: 12px;
  color: var(--gp-muted);
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--gp-border);
}

/* ══ ÚLTIMS RESULTATS ════════════════════════════════════════ */
.gps-rs-table{ width: 100%; border-collapse: collapse; font-size: 13px; }
.gps-rs-table td{ padding: 10px 6px; border-bottom: 1px solid var(--gp-border); }
.gps-rs-table tr:last-child td{ border-bottom: none; }
.gps-rs-date{ color: var(--gp-muted); font-size: 12px; width: 50px; }
.gps-rs-team{ font-weight: 500; }
.gps-rs-team .gps-logo, .gps-rs-team .gps-logo-init{ margin-right: 8px; vertical-align: middle; }
.gps-rs-score{ font-weight: 700; text-align: center; }
.gps-rs-pill{
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 11px; font-weight: 700; color: #fff;
  float: right;
}
.gps-rs-w{ background: var(--gp-green); }
.gps-rs-d{ background: var(--gp-muted); }
.gps-rs-l{ background: var(--gp-red); }

/* ── Logos ── */
.gps-logo{ object-fit: contain; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px #eee; flex-shrink: 0; }
.gps-logo-init{ border-radius: 50%; background: var(--gp-navy); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

.gps-empty{ color: var(--gp-muted); font-size: 14px; }

/* ══ RESPONSIVE ══════════════════════════════════════════════ */
@media (max-width: 860px){
  .gps-row{ grid-template-columns: 1fr; }
  .gps-panel{ padding: 22px 20px; }
}
