/* The player card header from the game (front/roulette user-statistic .profile-hero + app-card-backdrop),
   drawn over the real backgrounds rendered from the game's shaders (assets/card-backgrounds/). Used by the
   card backgrounds guide and the news post. */

.pc-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 132px;
  padding: 16px 64px 16px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #004d40 0%, #0092a4 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  text-align: left;
}

.pc-bg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* The same shade the game puts over a background, so the name reads on any of them */
.pc-card.has-bg::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.28) 45%, rgba(0, 0, 0, 0.12) 70%, rgba(0, 0, 0, 0.3) 100%);
}

.pc-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, var(--a, #f5c842), var(--b, #b8860b));
  color: #fff;
  font-size: 26px;
  font-weight: 800;
}

.pc-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.pc-info b {
  overflow: hidden;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-info span {
  font-size: 0.92rem;
  opacity: 0.85;
}

.pc-rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.28);
}

.pc-rank small {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.pc-rank strong {
  color: #f5c842;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.pc-edit {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
}

.pc-edit svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.pc-edit.is-pulse {
  box-shadow: 0 0 0 0 rgba(245, 200, 66, 0.7);
  animation: pcPulse 2.2s ease-out infinite;
}

@keyframes pcPulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 200, 66, 0.7); }
  70% { box-shadow: 0 0 0 14px rgba(245, 200, 66, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 200, 66, 0); }
}

/* Phones: the rank goes under the name, so the card is taller and the scene moves up and to the right */
.pc-card.is-tall {
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  width: 100%;
  max-width: 330px;
  min-height: 240px;
  padding-right: 16px;
}

.pc-card.is-tall .pc-info {
  flex: 1;
  padding-right: 40px;
}

.pc-card.is-tall .pc-rank {
  width: 100%;
  margin: auto 0 0;
}

/* Hero: the desktop card with the phone card leaning on it */
.pc-hero-stage {
  display: grid;
  gap: 16px;
  justify-items: center;
}

.pc-hero-stage .pc-card:not(.is-tall) {
  width: 100%;
}

.pc-hero-stage .pc-card.is-tall {
  max-width: 280px;
  min-height: 210px;
  margin-top: -6px;
  margin-left: auto;
  margin-right: 4%;
  transform: rotate(2deg);
}

/* Room background vs card background */
.pc-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.pc-compare article {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
}

.pc-compare h3 {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
}

.pc-compare p {
  margin: 0;
  color: var(--club-muted);
  line-height: 1.6;
}

.pc-who {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pc-who li {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(245, 200, 66, 0.35);
  background: rgba(245, 200, 66, 0.1);
  color: var(--club-gold-soft);
  font-size: 0.88rem;
  font-weight: 600;
}

.pc-who.is-private li {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--club-text);
}

/* Desktop and phone side by side, one row per live background */
.pc-gallery {
  display: grid;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pc-gallery > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1rem;
  align-items: center;
}

.pc-gallery h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: #fff;
  font-size: 1.05rem;
}

.pc-gallery h3 .price {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

.pc-gallery .pc-card.is-tall {
  min-height: 190px;
}

.pc-shot {
  display: grid;
  gap: 8px;
  width: 100%;
  margin: 0;
}

.pc-shot.is-phone {
  max-width: 330px;
}

.pc-shot figcaption {
  color: var(--club-muted);
  font-size: 0.82rem;
  text-align: center;
}

.split-copy .stat-list + p {
  margin-top: 1rem;
}

/* The cropper: a 2:1 frame with the part a phone shows between the dashed lines */
.pc-crop {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 16px;
  background: #fff;
  color: #12332e;
}

.pc-crop-title {
  margin: 0;
  color: #004d40;
  font-size: 1.05rem;
  font-weight: 800;
}

.pc-crop-frame {
  position: relative;
  overflow: hidden;
  padding-top: 50%;
  border-radius: 10px;
  border: 2px solid rgba(0, 77, 64, 0.25);
  background:
    radial-gradient(circle at 30% 45%, #f5c842 0 9%, transparent 10%),
    radial-gradient(circle at 62% 55%, #ff8a65 0 12%, transparent 13%),
    linear-gradient(180deg, #3a2c7a 0%, #b84a6a 70%, #f39c5a 100%);
}

.pc-crop-frame .guide {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 2px dashed rgba(255, 255, 255, 0.85);
}

.pc-crop-frame .guide.is-left {
  left: 17.5%;
}

.pc-crop-frame .guide.is-right {
  right: 17.5%;
}

.pc-crop-note {
  margin: 0;
  color: #5f736e;
  font-size: 0.85rem;
  text-align: center;
}

.pc-crop-zoom {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5f736e;
  font-size: 0.85rem;
}

.pc-crop-zoom span:last-child {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #d9e3e1;
}

.pc-crop-zoom span:last-child::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 30%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #004d40;
}

.pc-crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.pc-crop-actions span {
  padding: 8px 12px;
  white-space: nowrap;
  border-radius: 6px;
  border: 1px solid #c9d6d3;
  font-size: 0.85rem;
  font-weight: 600;
}

.pc-crop-actions span.is-primary {
  border-color: #3f51b5;
  background: #3f51b5;
  color: #fff;
}

/* Prices on the card: one row per background */
.pc-prices-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}

.pc-prices {
  width: 100%;
  border-collapse: collapse;
  color: var(--club-text);
}

.pc-prices th,
.pc-prices td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--club-line);
  text-align: left;
}

.pc-prices thead th {
  color: var(--club-muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pc-prices td:last-child,
.pc-prices th:last-child {
  text-align: right;
  white-space: nowrap;
}

.pc-prices .kind {
  color: var(--club-muted);
  font-size: 0.88rem;
}

.pc-prices tr.is-picture td {
  border-bottom: 0;
  color: var(--club-gold-soft);
  font-weight: 700;
}

@media (max-width: 900px) {
  .pc-compare {
    grid-template-columns: minmax(0, 1fr);
  }

  .pc-gallery > li {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .pc-gallery .pc-card:not(.is-tall) {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .pc-hero-stage .pc-card.is-tall {
    margin: 0 auto;
    transform: none;
  }

  .pc-card {
    padding-right: 56px;
  }

  .pc-avatar {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  /* The desktop card squeezed onto a phone: the rank badge would push the name off */
  .pc-card:not(.is-tall) .pc-rank {
    display: none;
  }

  .pc-prices th,
  .pc-prices td {
    padding: 8px 10px;
  }

  .pc-prices .kind {
    font-size: 0.8rem;
  }

  .pc-crop-actions span {
    padding: 8px 9px;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pc-edit.is-pulse {
    animation: none;
  }
}

/* A card in a news post (light theme) */
.news-card {
  margin: 1.75rem 0;
}

.news-card figcaption {
  margin-top: 10px;
  color: #5f736e;
  font-size: 0.9rem;
  text-align: center;
}
