/* ==========================================================================
   OSZ Player Preview — assets/css/osz-player-preview.css (v2)
   Dark club aesthetic per player-preview mockup. All rules scoped .osz-pp
   v2: atmospheric hero, dual-crest match cards, career table fixed
   (explicit colors defeat theme bleed; no horizontal overflow on desktop)
   ========================================================================== */

.osz-pp {
  --osz-pp-bg: #0c0c0c;
  --osz-pp-panel: #141414;
  --osz-pp-panel-2: #1d1d1d;
  --osz-pp-border: #2a2a2a;
  --osz-pp-red: #d0021b;
  --osz-pp-red-deep: #7a0110;
  --osz-pp-text: #f5f5f5;
  --osz-pp-muted: #9a9a9a;

  background: var(--osz-pp-bg);
  color: var(--osz-pp-text);
  font-size: 16px;
  line-height: 1.5;
}

.osz-pp *,
.osz-pp *::before,
.osz-pp *::after {
  box-sizing: border-box;
}

.osz-pp a {
  text-decoration: none;
}

/* Inline SVG icons */
.osz-pp .osz-pp-icon {
  display: inline-flex;
  color: var(--osz-pp-red);
}
.osz-pp .osz-pp-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}
.osz-pp .osz-pp-icon-sm svg {
  width: 14px;
  height: 14px;
}

/* ── Hero ──────────────────────────────────────────────────── */

.osz-pp-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 380px;
  padding: 56px 48px;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse 60% 90% at 85% 40%,
      rgba(150, 5, 20, 0.55) 0%,
      rgba(150, 5, 20, 0) 65%
    ),
    radial-gradient(
      ellipse 50% 70% at 70% 100%,
      rgba(90, 3, 12, 0.6) 0%,
      rgba(90, 3, 12, 0) 70%
    ),
    linear-gradient(100deg, #0a0a0a 0%, #150607 55%, #2b090c 100%);
  border-bottom: 3px solid var(--osz-pp-red);
}

.osz-pp-hero-text {
  position: relative;
  z-index: 2;
}

.osz-pp-hero-name {
  margin: 0 0 28px;
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  font-weight: 900;
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--osz-pp-text);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.osz-pp-hero-name span {
  display: block;
}

.osz-pp-hero-stats {
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
}

.osz-pp-hero-stat {
  display: flex;
  align-items: center;
  gap: 12px;
}

.osz-pp-hero-stat-body {
  display: flex;
  flex-direction: column;
}

.osz-pp-hero-stat-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--osz-pp-text);
}

.osz-pp-hero-stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--osz-pp-muted);
}

.osz-pp-hero-photo {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.osz-pp-hero-photo img {
  display: block;
  max-height: 340px;
  width: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.7));
}

/* ── Body layout ───────────────────────────────────────────── */

.osz-pp-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  padding: 32px 40px 48px;
}

/* ── Sidebar ───────────────────────────────────────────────── */

.osz-pp-side {
  background: var(--osz-pp-panel);
  border: 1px solid var(--osz-pp-border);
  padding: 14px;
  align-self: start;
}

.osz-pp-side-photo {
  position: relative;
  z-index: 1;
}

.osz-pp-side-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.osz-pp-side-name {
  position: relative;
  z-index: 2;
  margin: -54px 0 8px;
  padding: 12px 14px;
  /* Solid fallback where backdrop-filter is unsupported */
  background: linear-gradient(
    100deg,
    rgba(208, 2, 27, 0.92),
    rgba(122, 1, 16, 0.92)
  );
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

@supports (
  (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))
) {
  .osz-pp-side-name {
    background: linear-gradient(
      100deg,
      rgba(208, 2, 27, 0.55),
      rgba(122, 1, 16, 0.5)
    );
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
  }
}

.osz-pp-side-name span {
  display: block;
}

.osz-pp-bio {
  list-style: none;
  margin: 0;
  padding: 0;
}

.osz-pp-bio-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--osz-pp-border);
  font-size: 0.85rem;
}

.osz-pp-bio-label {
  color: var(--osz-pp-muted);
}
.osz-pp-bio-value {
  font-weight: 700;
  text-align: right;
  color: var(--osz-pp-text);
}

.osz-pp-signature {
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--osz-pp-text);
  background: #000;
}

.osz-pp-signature img {
  display: block;
  width: 100%;
  height: 100px !important;
  object-fit: contain;
}

.osz-pp-signature-ph {
  display: block;
  width: 100%;
  height: auto;
  min-height: 64px;
  opacity: 0.85;
}

/* ── Main column / sections ────────────────────────────────── */

.osz-pp-main {
  min-width: 0;
}

.osz-pp-section {
  background: var(--osz-pp-panel);
  border: 1px solid var(--osz-pp-border);
  padding: 22px 24px;
  margin-bottom: 24px;
}

.osz-pp-heading {
  margin: 0 0 18px;
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--osz-pp-text);
}

.osz-pp-heading span {
  color: var(--osz-pp-red);
}

.osz-pp-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.osz-pp-link {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--osz-pp-red);
  white-space: nowrap;
}

.osz-pp-link:hover {
  color: var(--osz-pp-text);
}

/* ── Stat tiles ────────────────────────────────────────────── */

.osz-pp-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.osz-pp-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--osz-pp-panel-2);
  border: 1px solid var(--osz-pp-border);
  padding: 18px 12px;
  text-align: center;
}

.osz-pp-tile-num {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--osz-pp-text);
}

.osz-pp-tile-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--osz-pp-muted);
}

/* ── Match cards (dual crest) ──────────────────────────────── */

.osz-pp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.osz-pp-match {
  background: var(--osz-pp-panel-2);
  border: 1px solid var(--osz-pp-border);
  padding: 16px 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.osz-pp-match-crests {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 2px;
}

.osz-pp-match-crest {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.osz-pp-match-crest img {
  max-width: 40px;
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.osz-pp-match-crest svg {
  width: 30px;
  height: 30px;
  color: var(--osz-pp-muted);
}

.osz-pp-match-vs {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--osz-pp-muted);
}

.osz-pp-match-score {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--osz-pp-text);
}

.osz-pp-match-teams {
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  color: var(--osz-pp-text);
}

.osz-pp-match-date {
  font-size: 0.7rem;
  color: var(--osz-pp-muted);
}

.osz-pp-match-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--osz-pp-border);
  font-size: 0.7rem;
}

.osz-pp-match-goals {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: var(--osz-pp-text);
}

.osz-pp-match-goals-none {
  color: var(--osz-pp-muted);
}

.osz-pp-match-link {
  color: var(--osz-pp-red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.osz-pp-match-link:hover {
  color: var(--osz-pp-text);
}

/* Milestones wrap each card with a label */
.osz-pp-milestone {
  display: flex;
  flex-direction: column;
}

.osz-pp-milestone-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
  margin-bottom: 8px;
  color: var(--osz-pp-text);
}

.osz-pp-milestone .osz-pp-match {
  flex: 1;
}

/* ── Career table ──────────────────────────────────────────── */
/* Explicit colors on every cell + link defeat theme bleed.     */

.osz-pp-table-wrap {
  overflow-x: auto;
}

.osz-pp-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--osz-pp-text);
  font-size: 0.84rem;
  background: var(--osz-pp-panel) !important;
}

.osz-pp-table th,
.osz-pp-table td {
  padding: 12px 10px;
  text-align: center;
  border: 1px solid var(--osz-pp-border) !important;
  color: var(--osz-pp-text) !important;
  background: var(--osz-pp-panel) !important;
  white-space: nowrap;
}

.osz-pp-table th:last-child,
.osz-pp-table td:last-child {
  border-right: none !important;
}

.osz-pp-table th {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--osz-pp-muted) !important;
  background: var(--osz-pp-panel-2) !important;
  border-bottom: 1px solid var(--osz-pp-text) !important;
}

.osz-pp-table td {
  font-weight: 700;
}

.osz-pp-table a {
  color: var(--osz-pp-text) !important;
}

/* ── Teammates ─────────────────────────────────────────────── */

.osz-pp-mates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.osz-pp-mate {
  background: var(--osz-pp-panel-2);
  border: 1px solid var(--osz-pp-border);
  padding: 10px 10px 12px;
  text-align: center;
  color: var(--osz-pp-text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

.osz-pp-mate:hover {
  border-color: var(--osz-pp-red);
  transform: translateY(-2px);
}

.osz-pp-mate-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  object-position: top;
}

.osz-pp-mate-name {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--osz-pp-text);
}

.osz-pp-mate-count {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--osz-pp-text);
}

.osz-pp-mate-count em {
  font-style: normal;
  color: var(--osz-pp-red);
  text-transform: uppercase;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}

/* ── Buttons / CTA ─────────────────────────────────────────── */

.osz-pp-cta {
  text-align: center;
  padding: 8px 0 4px;
}

.osz-pp-btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--osz-pp-red);
  color: #fff !important;
  transition: background 0.15s ease;
}

.osz-pp-btn-primary {
  background: var(--osz-pp-red);
}
.osz-pp-btn-primary:hover {
  background: #a00114;
}

.osz-pp-btn-ghost {
  background: transparent;
  padding: 7px 14px;
  border-color: var(--osz-pp-text);
  font-size: 0.68rem;
}

.osz-pp-btn-ghost:hover {
  background: var(--osz-pp-red);
  border-color: var(--osz-pp-red);
}

/* ── Full-profile back bar ─────────────────────────────────── */

.osz-pp-fullbar {
  padding: 12px 0;
}

.osz-pp-fullbar-back {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d0021b;
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 900px) {
  .osz-pp-body {
    grid-template-columns: 1fr;
    padding: 24px 20px 40px;
  }
  .osz-pp-side {
    max-width: 380px;
  }
  .osz-pp-hero {
    padding: 40px 24px;
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
  }
  .osz-pp-hero-photo {
    align-self: center;
  }
  .osz-pp-table th,
  .osz-pp-table td {
    padding: 10px 8px;
  }
}

@media (max-width: 520px) {
  .osz-pp-hero-stats {
    gap: 22px;
  }
  .osz-pp-cards {
    grid-template-columns: 1fr 1fr;
  }
  .osz-pp-mates {
    grid-template-columns: 1fr 1fr;
  }
}
