:root {
  --navy-950: #071229;
  --navy-800: #0a1f44;
  --blue-700: #123c9e;
  --cyan-400: #2fc2f0;
  --paper: #f7f9fc;
  --slate-500: #64748b;
  --slate-200: #e2e6ec;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #eef1f6;
  font-family: 'Inter', -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--navy-950);
}
a { text-decoration: none; }

/* ===================== Page chrome ===================== */
.site-header {
  background: linear-gradient(90deg, var(--navy-950), var(--blue-700));
  color: #fff;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-header img { height: 48px; }
.site-header h1 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .03em;
  margin: 0;
  text-transform: uppercase;
}
.site-header .sub { font-size: 12px; color: #bcd2f5; letter-spacing: .08em; }

.page-wrap { max-width: 1240px; margin: 0 auto; padding: 24px 20px 60px; }

.filter-bar {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(10,31,68,.06);
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.filter-bar input, .filter-bar select {
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}
.filter-bar input[type=text] { flex: 1; min-width: 220px; }
.filter-bar select { min-width: 160px; }
.filter-bar .clear-btn {
  border: 1px solid var(--slate-200);
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--slate-500);
}

.result-count { color: var(--slate-500); font-size: 13px; margin: 4px 2px 14px; }

/* ===================== Micro-card grid ===================== */
.micro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.micro-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(10,31,68,.08);
  transition: transform .15s ease, box-shadow .15s ease;
  color: inherit;
  display: block;
}
.micro-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(10,31,68,.16); }
.micro-thumb {
  width: 100%; aspect-ratio: 3/3.5; background: #d9dde3; position: relative; overflow: hidden;
}
.micro-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.micro-jersey {
  position: absolute; top: 8px; left: 8px;
  background: var(--navy-950); color: var(--cyan-400);
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 13px;
  padding: 2px 8px; border-radius: 4px;
}
.micro-body { padding: 10px 12px 12px; }
.micro-name {
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 15px;
  color: var(--navy-950); text-transform: uppercase; line-height: 1.15;
  margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.micro-meta { font-size: 12px; color: var(--slate-500); }
.micro-team {
  display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 600;
  color: var(--blue-700); background: #e8f0ff; padding: 2px 8px; border-radius: 20px;
}

.pagination-wrap { display: flex; justify-content: center; margin-top: 28px; gap: 6px; flex-wrap: wrap; }
.pagination-wrap a, .pagination-wrap span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; border-radius: 8px; font-size: 13px;
  color: var(--navy-800); background: #fff; border: 1px solid var(--slate-200); cursor: pointer;
}
.pagination-wrap a.active { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

.empty-state { text-align: center; color: var(--slate-500); padding: 60px 0; }

/* ===================== Player card (detail + PDF source) ===================== */
.card-page-actions {
  max-width: 1000px; margin: 0 auto 18px; padding: 0 20px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: 14px;
  padding: 11px 18px; border-radius: 9px; border: none; cursor: pointer;
}
.btn-primary { background: linear-gradient(90deg, var(--blue-700), var(--navy-950)); color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--slate-200); color: var(--navy-800); }

.card-stage {
  overflow: auto;
  padding: 10px 0 30px;
  display: flex;
  justify-content: center;
}
.card-scale-wrap {
  position: relative;
}

.dcl-card {
  position: relative;
  width: 1000px;
  height: 640px;
  padding: 9px;
  background: linear-gradient(135deg, var(--blue-700), var(--navy-950) 70%);
  clip-path: polygon(0 0, calc(100% - 64px) 0, 100% 64px, 100% 100%, 64px 100%, 0 calc(100% - 64px));
  display: flex;
  box-shadow: 0 30px 60px rgba(10,31,68,.25);
}
.dcl-card-inner {
  position: relative;
  width: 100%; height: 100%;
  background: var(--paper);
  clip-path: polygon(0 0, calc(100% - 58px) 0, 100% 58px, 100% 100%, 58px 100%, 0 calc(100% - 58px));
  display: flex;
  overflow: hidden;
}
.dcl-card-inner::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(10,31,68,.03) 0 2px, transparent 2px 40px);
  pointer-events: none;
}

.photo-panel { position: relative; width: 380px; flex-shrink: 0; padding: 26px 26px 0; display: flex; }
.photo-frame {
  position: relative; width: 100%; background: #d9dde3;
  clip-path: polygon(0 0, calc(100% - 46px) 0, 100% 46px, 100% 100%, 0 100%);
  overflow: hidden; border: 3px solid var(--navy-800);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-frame .no-photo {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: #9aa4b2; font-size: 14px; text-align: center; padding: 20px;
}
.photo-stripes { position: absolute; top: 14px; right: 14px; display: flex; gap: 5px; }
.photo-stripes span { width: 6px; height: 34px; background: var(--cyan-400); transform: skewX(-18deg); }
.photo-stripes span:nth-child(1) { opacity: .55 }
.photo-stripes span:nth-child(2) { opacity: .75 }

.jersey-ribbon {
  position: absolute; left: -20px; bottom: 32px; width: 300px;
  padding: 14px 20px 14px 46px;
  background: linear-gradient(100deg, var(--navy-800), var(--blue-700) 70%);
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0% 100%);
  color: #fff;
}
.jersey-ribbon .label { font-weight: 600; font-size: 13px; letter-spacing: .14em; color: var(--cyan-400); text-transform: uppercase; }
.jersey-ribbon .num { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 34px; line-height: 1; margin-top: 2px; }

.info-panel { flex: 1; padding: 30px 46px 30px 34px; display: flex; flex-direction: column; }
.info-header { display: flex; justify-content: flex-end; align-items: flex-start; min-height: 78px; }
.league-logo { height: 78px; max-width: 240px; object-fit: contain; }
.league-name-fallback { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 22px; color: var(--navy-800); text-align: right; }
.league-name-fallback .sub { display: block; font-size: 11px; font-weight: 500; letter-spacing: .1em; color: var(--slate-500); }

.player-name { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 54px; line-height: 1.02; color: var(--navy-950); text-transform: uppercase; margin-top: 16px; }
.name-divider { width: 100%; height: 3px; margin: 14px 0 20px; background: linear-gradient(90deg, var(--navy-800) 0 120px, var(--slate-200) 120px 100%); position: relative; }
.name-divider::after { content: ""; position: absolute; left: 120px; top: -3.5px; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan-400); }

.info-rows { display: flex; flex-direction: column; }
.info-row { display: flex; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1px dashed var(--slate-200); }
.info-row:last-child { border-bottom: none; }
.info-icon { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--blue-700); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--blue-700); }
.info-icon svg { width: 20px; height: 20px; }
.info-label { font-weight: 700; font-size: 14px; letter-spacing: .05em; color: var(--navy-800); text-transform: uppercase; width: 180px; flex-shrink: 0; }
.info-colon { color: #b7bfc9; font-weight: 700; width: 10px; }
.info-value { font-weight: 700; font-size: 17px; color: var(--navy-950); }

@media (max-width: 640px) {
  .site-header h1 { font-size: 17px; }
  .player-name { font-size: 40px; }
}
