/*
 * DeFoxo Crest - Elite Player Card Styles
 * Scope: public profile roster cards (team-player-card / pc-*)
 */

:root {
  --pc-fd: 'Orbitron', 'Courier New', monospace;
  --pc-fm: 'JetBrains Mono', 'Courier New', monospace;
  --pc-fb: 'Manrope', system-ui, sans-serif;

  --pc-ember: #7f1d1d;
  --pc-crimson: #dc2626;
  --pc-fire: #f97316;
  --pc-flame: #fb923c;
  --pc-gold: #f59e0b;
  --pc-success: #22c55e;
  --pc-t1: #f0f0ff;
  --pc-t2: #8f8fb2;
  --pc-t3: #555573;
  --pc-t4: #3a3a54;
  --pc-glow-md: 0 0 12px rgba(249, 115, 22, 0.38), 0 0 30px rgba(220, 38, 38, 0.16);
  --pc-snap: cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pc-holo {
  0% { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}
@keyframes pc-scan {
  0% { top: -100%; opacity: 0; }
  6% { opacity: 1; }
  94% { opacity: 1; }
  100% { top: 110%; opacity: 0; }
}
@keyframes pc-ring { to { transform: rotate(360deg); } }
@keyframes pc-pulse {
  0%, 100% { box-shadow: 0 4px 32px rgba(249, 115, 22, 0.1), 0 24px 64px rgba(0, 0, 0, 0.7); }
  50% { box-shadow: 0 4px 48px rgba(249, 115, 22, 0.22), 0 24px 64px rgba(0, 0, 0, 0.85); }
}
@keyframes pc-online {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(3); opacity: 0; }
}
@keyframes pc-xp {
  from { width: 0; }
  to { width: var(--xp, 75%); }
}
@keyframes pc-corner {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
@keyframes pc-flicker {
  0%, 92%, 96%, 100% { opacity: 1; }
  94% { opacity: 0.6; }
}

.team-player-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 18px;
  padding: 0;
  text-align: center;
  background: rgba(6, 6, 10, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: pc-pulse 7s ease-in-out infinite;
  transition: transform 0.32s var(--pc-snap), box-shadow 0.32s;
  -webkit-font-smoothing: antialiased;
}
.team-player-card::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: 19px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    var(--pc-ember) 0%,
    var(--pc-fire) 25%,
    var(--pc-gold) 40%,
    var(--pc-crimson) 60%,
    var(--pc-flame) 80%,
    var(--pc-ember) 100%
  );
  background-size: 400% 400%;
  opacity: 0.18;
  transition: opacity 0.35s;
}
.team-player-card:hover::before {
  opacity: 1;
  animation: pc-holo 4s linear infinite;
}
.team-player-card:hover {
  transform: translateY(-10px) scale(1.025);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.88), 0 0 60px rgba(249, 115, 22, 0.18), var(--pc-glow-md);
}

.team-player-card.mvp {
  animation: pc-pulse 3.5s ease-in-out infinite;
  border-color: rgba(245, 158, 11, 0.22);
}
.team-player-card.mvp::before { opacity: 0.28; }

.pc-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  z-index: 20;
  pointer-events: none;
  top: -100%;
  opacity: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(249, 115, 22, 0.6) 30%, rgba(255, 251, 235, 1) 50%, rgba(249, 115, 22, 0.6) 70%, transparent 100%);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.8), 0 0 24px rgba(249, 115, 22, 0.4);
}
.team-player-card:hover .pc-scan { animation: pc-scan 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

.pc-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  z-index: 15;
  pointer-events: none;
  animation: pc-corner 3s ease-in-out infinite;
}
.pc-corner-tl { top: 8px; left: 8px; border-top: 1.5px solid var(--pc-fire); border-left: 1.5px solid var(--pc-fire); }
.pc-corner-tr { top: 8px; right: 8px; border-top: 1.5px solid var(--pc-fire); border-right: 1.5px solid var(--pc-fire); animation-delay: 0.75s; }
.pc-corner-bl { bottom: 8px; left: 8px; border-bottom: 1.5px solid var(--pc-fire); border-left: 1.5px solid var(--pc-fire); animation-delay: 1.5s; }
.pc-corner-br { bottom: 8px; right: 8px; border-bottom: 1.5px solid var(--pc-fire); border-right: 1.5px solid var(--pc-fire); animation-delay: 2.25s; }

.pc-inner {
  position: relative;
  z-index: 1;
  background: rgba(6, 6, 10, 0.97);
  border-radius: 17px;
  overflow: hidden;
}

.pc-banner {
  height: 80px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(100, 20, 20, 0.8) 0%, rgba(30, 15, 5, 0.9) 60%, rgba(10, 10, 20, 0.95) 100%);
}
.pc-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: linear-gradient(rgba(249, 115, 22, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(249, 115, 22, 0.06) 1px, transparent 1px);
  background-size: 18px 18px;
}
.pc-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.7) 30%, rgba(255, 247, 237, 0.9) 50%, rgba(249, 115, 22, 0.7) 70%, transparent);
  animation: pc-flicker 8s ease-in-out infinite;
}
.pc-banner-glow {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 120px;
  height: 60px;
  background: radial-gradient(ellipse, rgba(249, 115, 22, 0.4) 0%, transparent 70%);
  filter: blur(12px);
}
.pc-rank {
  position: absolute;
  top: 10px;
  left: 11px;
  z-index: 10;
  font-family: var(--pc-fd);
  font-size: 0.46rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: var(--pc-flame);
}
.pc-rank.gold {
  background: rgba(180, 90, 0, 0.25);
  border-color: var(--pc-gold);
  color: var(--pc-gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}
.pc-tourn {
  position: absolute;
  top: 10px;
  right: 11px;
  z-index: 10;
  font-family: var(--pc-fm);
  font-size: 0.4rem;
  letter-spacing: 0.07em;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--pc-t4);
}

.pc-avatar-zone {
  position: relative;
  width: 86px;
  height: 86px;
  margin: -43px auto 0;
  z-index: 5;
}
.pc-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  z-index: 1;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 160deg,
    rgba(127, 29, 29, 0.6) 180deg,
    rgba(249, 115, 22, 0.9) 220deg,
    rgba(251, 146, 60, 1) 250deg,
    rgba(245, 158, 11, 0.8) 268deg,
    rgba(255, 247, 237, 0.9) 280deg,
    rgba(249, 115, 22, 0.7) 300deg,
    transparent 330deg,
    transparent 360deg
  );
  animation: pc-ring 5s linear infinite;
}
.team-player-card:hover .pc-ring { animation-duration: 1.8s; }
.team-player-card:not(:hover) .pc-ring { opacity: 0.45; }

.pc-ring-mask {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 2;
  background: rgba(6, 6, 10, 0.97);
  transform: scale(0.88);
}
.pc-avatar {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 50%;
  background: linear-gradient(135deg, #16161f 0%, #111119 100%);
  border: 2px solid rgba(249, 115, 22, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  overflow: hidden;
}
.pc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.team-player-card:hover .pc-avatar {
  border-color: var(--pc-fire);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.4), 0 0 40px rgba(220, 38, 38, 0.2);
}
.pc-online-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  z-index: 6;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--pc-success);
  border: 2.5px solid rgba(6, 6, 10, 0.97);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}
.pc-online-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(34, 197, 94, 0.5);
  animation: pc-online 2s ease-out infinite;
}

.pc-body { padding: 14px 16px 0; }
.pc-ign {
  font-family: var(--pc-fm);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--pc-t1);
  letter-spacing: 0.07em;
  line-height: 1.1;
  margin-bottom: 2px;
  transition: color 0.2s, letter-spacing 0.2s;
}
.team-player-card:hover .pc-ign { color: var(--pc-flame); letter-spacing: 0.12em; }
.pc-realname {
  font-size: 0.62rem;
  color: var(--pc-t3);
  margin-bottom: 9px;
  font-family: var(--pc-fb);
}
.pc-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 9px;
  flex-wrap: wrap;
}
.pc-flag { font-size: 0.88rem; line-height: 1; }
.pc-gametag {
  font-family: var(--pc-fm);
  font-size: 0.48rem;
  letter-spacing: 0.07em;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(249, 115, 22, 0.07);
  border: 1px solid rgba(249, 115, 22, 0.18);
  color: var(--pc-t3);
}
.pc-role-row { margin-bottom: 10px; }
.role {
  display: inline-flex;
  align-items: center;
  font-family: var(--pc-fm);
  font-size: 0.59rem;
  padding: 3px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.r-igl { background: rgba(249, 115, 22, 0.14); color: var(--pc-flame); border: 1px solid rgba(249, 115, 22, 0.24); }
.r-fragger { background: rgba(220, 38, 38, 0.12); color: #fca5a5; border: 1px solid rgba(220, 38, 38, 0.22); }
.r-support { background: rgba(56, 189, 248, 0.1); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.22); }
.r-sniper { background: rgba(34, 197, 94, 0.1); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.22); }
.r-coach { background: rgba(245, 158, 11, 0.1); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.22); }
.r-entry { background: rgba(168, 85, 247, 0.1); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.22); }

.pc-xp-wrap { margin: 0 0 12px; }
.pc-xp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--pc-fm);
  font-size: 0.44rem;
  letter-spacing: 0.09em;
  color: var(--pc-t4);
  margin-bottom: 5px;
}
.pc-xp-head span:last-child { color: var(--pc-flame); font-size: 0.5rem; }
.pc-xp-track {
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
}
.pc-xp-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--pc-ember) 0%, var(--pc-crimson) 30%, var(--pc-fire) 65%, var(--pc-flame) 85%, var(--pc-gold) 100%);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.5);
  animation: pc-xp 1.6s var(--pc-snap) forwards;
  width: var(--xp, 0%);
}

.pc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 0 0 17px 17px;
  overflow: hidden;
}
.pc-stat {
  padding: 11px 4px 13px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.pc-stat:last-child { border-right: none; }
.pc-sv {
  font-family: var(--pc-fm);
  font-size: 0.96rem;
  color: var(--pc-flame);
  font-weight: 700;
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}
.pc-sl {
  font-family: var(--pc-fd);
  font-size: 0.39rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pc-t4);
  display: block;
}

/* Advanced interaction layer */
.team-player-card {
  transform-style: preserve-3d;
  will-change: transform;
}
.team-player-card.pc-in {
  animation: pc-in 0.75s var(--pc-snap) both;
}
@keyframes pc-in {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pc-shine {
  position: absolute;
  inset: -15%;
  z-index: 12;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    transparent 10%,
    rgba(255, 255, 255, 0.06) 28%,
    rgba(255, 255, 255, 0.15) 33%,
    transparent 43%
  );
  transform: translateX(-120%) rotate(8deg);
  transition: transform 0.75s var(--pc-snap);
}
.team-player-card:hover .pc-shine {
  transform: translateX(125%) rotate(8deg);
}

.pc-avatar-fallback {
  font-family: var(--pc-fd);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--pc-flame);
  text-transform: uppercase;
}

.pc-stat {
  transition: background 0.2s ease;
  position: relative;
}
.pc-stat:hover {
  background: rgba(249, 115, 22, 0.05);
}
.pc-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.35), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.pc-stat:hover::before {
  opacity: 1;
}

.pc-role-row .role {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

@media (max-width: 900px) {
  .team-player-card {
    border-radius: 16px;
  }
  .pc-banner {
    height: 74px;
  }
  .pc-avatar-zone {
    width: 80px;
    height: 80px;
    margin-top: -40px;
  }
  .pc-avatar {
    font-size: 1.9rem;
  }
  .pc-body {
    padding: 13px 14px 0;
  }
}

html[data-theme="light"] {
  --pc-ember: #cf5e1b;
  --pc-crimson: #cf3d2d;
  --pc-fire: #d97706;
  --pc-flame: #ea580c;
  --pc-gold: #d97706;
  --pc-t1: #2d1608;
  --pc-t2: #6b4c3a;
  --pc-t3: #8a6b59;
  --pc-t4: #a18475;
  --pc-glow-md: 0 0 12px rgba(217, 119, 6, 0.16), 0 0 28px rgba(207, 61, 45, 0.1);
}

html[data-theme="light"] .team-player-card {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(91, 58, 29, 0.12);
  animation: none;
}

html[data-theme="light"] .team-player-card:hover {
  box-shadow: 0 28px 60px rgba(91, 58, 29, 0.14), 0 0 30px rgba(217, 119, 6, 0.08), var(--pc-glow-md);
}

html[data-theme="light"] .pc-inner,
html[data-theme="light"] .pc-ring-mask {
  background: rgba(255, 252, 246, 0.98);
}

html[data-theme="light"] .pc-banner {
  background: linear-gradient(135deg, rgba(255, 225, 193, 0.95) 0%, rgba(255, 246, 236, 0.98) 64%, rgba(249, 115, 22, 0.1) 100%);
}

html[data-theme="light"] .pc-rank,
html[data-theme="light"] .pc-tourn {
  background: rgba(255, 250, 242, 0.92);
}

html[data-theme="light"] .pc-online-dot {
  border-color: rgba(255, 252, 246, 0.98);
}

html[data-theme="light"] .pc-gametag {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.18);
}

html[data-theme="light"] .pc-xp-track {
  background: rgba(91, 58, 29, 0.08);
  box-shadow: inset 0 0 4px rgba(91, 58, 29, 0.08);
}

html[data-theme="light"] .pc-stats,
html[data-theme="light"] .pc-stat {
  border-color: rgba(91, 58, 29, 0.08);
}

html[data-theme="light"] .pc-stat:hover {
  background: rgba(217, 119, 6, 0.05);
}

@media (max-width: 520px) {
  .team-player-card:hover {
    transform: translateY(-5px) scale(1.01);
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-player-card,
  .pc-ring,
  .pc-online-dot::before,
  .pc-xp-fill,
  .pc-scan,
  .pc-shine {
    animation: none !important;
    transition: none !important;
  }
}

/* font role enforcement */
.pc-name,
.pc-role,
.pc-highlight,
.pc-rank{
  font-family:var(--pc-fd);
  font-weight:700;
}

.pc-real,
.pc-bio,
.pc-card-meta{
  font-family:var(--pc-fb);
  font-weight:500;
  font-size:0.86rem;
  line-height:1.64;
}

.pc-tourn,
.pc-xp-head span:last-child,
.pc-mini,
.pc-chip,
.pc-stat-label{
  font-family:var(--pc-fm);
  font-weight:600;
  line-height:1.42;
}

.pc-rank{
  font-size:0.58rem;
}

.pc-tourn{
  font-size:0.52rem;
}

.pc-xp-head span:last-child,
.pc-mini,
.pc-chip,
.pc-stat-label{
  font-size:0.62rem;
}

@media (max-width: 767px) {
  .pc-real,
  .pc-bio,
  .pc-card-meta{
    font-size:0.82rem;
    line-height:1.58;
  }

  .pc-rank{
    font-size:0.54rem;
  }

  .pc-tourn{
    font-size:0.5rem;
  }

  .pc-xp-head span:last-child,
  .pc-mini,
  .pc-chip,
  .pc-stat-label{
    font-size:0.58rem;
  }
}


/* Final player-card visibility and polish pass */
.team-player-card{
  background:linear-gradient(180deg, rgba(9,9,14,.98), rgba(5,5,9,.99));
  border-color:rgba(255,255,255,.08);
}

.pc-banner{
  background:linear-gradient(135deg, rgba(112,28,18,.94) 0%, rgba(42,22,14,.92) 56%, rgba(10,10,18,.98) 100%);
}

.pc-rank,
.pc-tourn{
  background:rgba(10,10,16,.86);
}

.pc-rank{
  font-size:.52rem;
  letter-spacing:.1em;
}

.pc-tourn{
  font-size:.48rem;
  color:var(--pc-t2);
}

.pc-ign{
  color:var(--pc-t1);
}

.pc-realname{
  font-size:.7rem;
  color:#b8b4d0;
  line-height:1.6;
}

.pc-gametag{
  font-size:.52rem;
  color:#c8c4db;
  background:rgba(249,115,22,.1);
  border-color:rgba(249,115,22,.24);
}

.pc-xp-head{
  font-size:.5rem;
  color:#918ca8;
}

.pc-xp-head span:last-child{
  font-size:.58rem;
}

.pc-sv{
  font-size:1.04rem;
}

.pc-sl{
  font-size:.46rem;
  color:#8d87a6;
}

html[data-theme="light"] .team-player-card{
  background:linear-gradient(180deg, rgba(255,255,255,.99), rgba(255,249,242,.99));
  border-color:rgba(91,58,29,.14);
}

html[data-theme="light"] .pc-banner{
  background:linear-gradient(135deg, rgba(255,229,204,.98) 0%, rgba(255,244,234,.98) 58%, rgba(248,159,79,.14) 100%);
}

html[data-theme="light"] .pc-rank,
html[data-theme="light"] .pc-tourn{
  background:rgba(255,248,240,.95);
}

html[data-theme="light"] .pc-realname{
  color:#6b4c3a;
}

html[data-theme="light"] .pc-gametag{
  color:#7b5b47;
  background:rgba(217,119,6,.1);
  border-color:rgba(217,119,6,.2);
}

html[data-theme="light"] .pc-xp-head{
  color:#8f7768;
}

html[data-theme="light"] .pc-sl{
  color:#927a6d;
}

@media (max-width: 767px){
  .pc-realname{
    font-size:.68rem;
  }

  .pc-gametag{
    font-size:.5rem;
  }

  .pc-sl{
    font-size:.44rem;
  }
}
