/* ==========================================================================
   AUTHENTIC EA SPORTS FC / FIFA ULTIMATE TEAM (FUT) CARD ARCHITECTURE
   ========================================================================== */

/* Alpine Cloak to avoid flash of unstyled content */
[x-cloak] { display: none !important; }

/* FUT Shield Geometry with 3D Holographic Physics & Fluid Container Scaling */
.fut-card-shield {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.54;
  container-type: inline-size;
  container-name: futcard;
  clip-path: polygon(
    8% 0%, 92% 0%,
    100% 5%, 100% 93%,
    50% 100%,
    0% 93%, 0% 5%
  );
  transform-style: preserve-3d;
  will-change: transform;
  transform: perspective(1000px) rotateX(var(--card-rotate-x, 0deg)) rotateY(var(--card-rotate-y, 0deg)) scale3d(var(--card-scale, 1), var(--card-scale, 1), var(--card-scale, 1));
  transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.4, 1), box-shadow 0.25s ease;
  user-select: none;
  cursor: grab;
  display: flex;
  flex-direction: column;
  padding: 4px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.9);
}

.fut-card-shield:active {
  cursor: grabbing;
}

.fut-card-shield:hover {
  z-index: 25;
}

/* Dynamic Specular Glare (Foil Glare that sweeps across the card) */
.fut-card-glare {
  position: absolute;
  inset: 0;
  clip-path: polygon(
    8% 0%, 92% 0%,
    100% 5%, 100% 93%,
    50% 100%,
    0% 93%, 0% 5%
  );
  background: radial-gradient(
    circle 180px at var(--glare-x, 50%) var(--glare-y, 50%),
    rgba(255, 255, 255, var(--glare-opacity, 0)) 0%,
    rgba(255, 255, 255, calc(var(--glare-opacity, 0) * 0.45)) 25%,
    rgba(254, 240, 138, calc(var(--glare-opacity, 0) * 0.25)) 50%,
    transparent 75%
  );
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 15;
  transition: opacity 0.2s ease-out;
}

/* Inner Shield Container with metallic border offset & bevels */
.fut-card-inner {
  width: 100%;
  height: 100%;
  clip-path: polygon(
    8% 0%, 92% 0%,
    100% 5%, 100% 93%,
    50% 100%,
    0% 93%, 0% 5%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1px;
  padding: 2px 3px 6px 3px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.9);
}

/* --- TIER 1: BRONZE CARD (Brushed Copper & Deep Volcanic Bronze) --- */
.fut-tier-bronze {
  background: linear-gradient(135deg, 
    #ffedd5 0%, 
    #fed7aa 15%, 
    #d97706 35%, 
    #92400e 55%, 
    #451a03 75%, 
    #b45309 90%, 
    #78350f 100%
  );
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.85));
  box-shadow: inset 0 0 10px rgba(254, 215, 170, 0.6);
}
.fut-tier-bronze .fut-card-inner {
  background: 
    radial-gradient(ellipse at 50% 22%, #7c2d12 0%, #431407 50%, #1c0903 85%, #0d0401 100%),
    repeating-linear-gradient(45deg, transparent 0px, transparent 4px, rgba(0,0,0,0.3) 4px, rgba(0,0,0,0.3) 8px),
    repeating-linear-gradient(-45deg, transparent 0px, transparent 4px, rgba(217, 119, 6, 0.08) 4px, rgba(217, 119, 6, 0.08) 8px);
  border: 1px solid rgba(217, 119, 6, 0.5);
}
.fut-tier-bronze .fut-val { color: #ffedd5; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 1px #000; }
.fut-tier-bronze .fut-lbl { color: #fdba74; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95); opacity: 1; }
.fut-tier-bronze .fut-ribbon {
  background: linear-gradient(90deg, rgba(20, 10, 4, 0.98), rgba(124, 45, 18, 0.95), rgba(20, 10, 4, 0.98));
  border-top: 1.5px solid #d97706;
  border-bottom: 1.5px solid #d97706;
}

/* --- TIER 2: SILVER CARD (Liquid Platinum & Mercury Chrome) --- */
.fut-tier-silver {
  background: linear-gradient(135deg, 
    #ffffff 0%, 
    #f1f5f9 15%, 
    #cbd5e1 32%, 
    #94a3b8 50%, 
    #ffffff 68%, 
    #64748b 85%, 
    #1e293b 100%
  );
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 15px rgba(203, 213, 225, 0.4));
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.7);
}
.fut-tier-silver .fut-card-inner {
  background: 
    radial-gradient(ellipse at 50% 22%, #475569 0%, #1e293b 50%, #090d16 85%, #030508 100%),
    repeating-linear-gradient(135deg, transparent 0px, transparent 6px, rgba(255,255,255,0.1) 6px, rgba(255,255,255,0.1) 8px),
    repeating-linear-gradient(-45deg, transparent 0px, transparent 6px, rgba(0,0,0,0.2) 6px, rgba(0,0,0,0.2) 8px);
  border: 1px solid rgba(255, 255, 255, 0.45);
}
.fut-tier-silver .fut-val { color: #ffffff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 1px #000; }
.fut-tier-silver .fut-lbl { color: #cbd5e1; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95); opacity: 1; }
.fut-tier-silver .fut-ribbon {
  background: linear-gradient(90deg, rgba(10, 14, 20, 0.98), rgba(51, 65, 85, 0.95), rgba(10, 14, 20, 0.98));
  border-top: 1.5px solid #cbd5e1;
  border-bottom: 1.5px solid #cbd5e1;
}

/* --- TIER 3: GOLD CARD (24K Championship Luminous Gold Foil & Conic Starburst) --- */
.fut-tier-gold {
  background: linear-gradient(135deg, 
    #ffffff 0%, 
    #fffbeb 12%, 
    #fde047 26%, 
    #f59e0b 45%, 
    #b45309 65%, 
    #fef08a 82%, 
    #78350f 92%,
    #451a03 100%
  );
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 24px rgba(245, 158, 11, 0.5));
  box-shadow: inset 0 0 14px rgba(254, 240, 138, 0.8);
}
.fut-tier-gold .fut-card-inner {
  background: 
    radial-gradient(ellipse at 50% 25%, #78350f 0%, #451a03 45%, #180802 85%, #080201 100%),
    repeating-conic-gradient(from 0deg at 50% 28%, rgba(254, 240, 138, 0.18) 0deg 10deg, transparent 10deg 20deg),
    repeating-linear-gradient(45deg, transparent 0px, transparent 4px, rgba(0, 0, 0, 0.35) 4px, rgba(0, 0, 0, 0.35) 8px);
  border: 1px solid rgba(254, 240, 138, 0.6);
}
.fut-tier-gold .fut-val { color: #ffffff; text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95), 0 0 2px #000; }
.fut-tier-gold .fut-lbl { color: #fde047; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95); opacity: 1; }
.fut-tier-gold .fut-ribbon {
  background: linear-gradient(90deg, rgba(30, 12, 2, 0.98), rgba(180, 83, 9, 0.95), rgba(30, 12, 2, 0.98));
  border-top: 1.5px solid #fde047;
  border-bottom: 1.5px solid #fde047;
}

/* --- TIER 4: SPECIAL / TOTW / IN-FORM (88+ OVR) (Cosmic Obsidian & Electric Neon) --- */
.fut-tier-special {
  background: linear-gradient(135deg, 
    #38bdf8 0%, 
    #818cf8 20%, 
    #c084fc 40%, 
    #06b6d4 65%, 
    #3b82f6 85%, 
    #1e1b4b 100%
  );
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 28px rgba(56, 189, 248, 0.7));
  animation: special-electric-pulse 3s infinite alternate ease-in-out;
}
.fut-tier-special .fut-card-inner {
  background: 
    radial-gradient(ellipse at 50% 25%, #1e1b4b 0%, #0f172a 45%, #020617 100%),
    repeating-linear-gradient(60deg, transparent 0px, transparent 10px, rgba(56, 189, 248, 0.16) 10px, rgba(56, 189, 248, 0.16) 12px),
    repeating-linear-gradient(-60deg, transparent 0px, transparent 10px, rgba(192, 132, 252, 0.16) 10px, rgba(192, 132, 252, 0.16) 12px);
  border: 1.5px solid rgba(56, 189, 248, 0.65);
}
.fut-tier-special .fut-val { color: #38bdf8; text-shadow: 0 0 10px rgba(56, 189, 248, 0.9), 0 2px 4px rgba(0, 0, 0, 0.95); }
.fut-tier-special .fut-lbl { color: #a5f3fc; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95); opacity: 1; }
.fut-tier-special .fut-ribbon {
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.98), rgba(49, 46, 129, 0.95), rgba(3, 7, 18, 0.98));
  border-top: 1.5px solid #38bdf8;
  border-bottom: 1.5px solid #c084fc;
}

@keyframes special-electric-pulse {
  0% { filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.55)) drop-shadow(0 12px 28px rgba(0, 0, 0, 0.9)); }
  50% { filter: drop-shadow(0 0 32px rgba(168, 85, 247, 0.85)) drop-shadow(0 14px 34px rgba(0, 0, 0, 0.95)); }
  100% { filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.55)) drop-shadow(0 12px 28px rgba(0, 0, 0, 0.9)); }
}

/* --- TIER 5: LEGEND / ICON (92+ OVR) (Royal White Carrara Marble & 24K Gold Leaf) --- */
.fut-tier-icon {
  background: linear-gradient(135deg, 
    #ffffff 0%, 
    #fef08a 18%, 
    #d97706 40%, 
    #ffffff 65%, 
    #d97706 85%, 
    #78350f 100%
  );
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 35px rgba(251, 191, 36, 0.85));
  animation: icon-radiance 3.5s infinite ease-in-out;
}
.fut-tier-icon .fut-card-inner {
  background: 
    radial-gradient(ellipse at 50% 20%, #ffffff 0%, #f1f5f9 40%, #e2e8f0 75%, #cbd5e1 100%),
    repeating-conic-gradient(from 45deg at 50% 28%, rgba(217, 119, 6, 0.16) 0deg 12deg, transparent 12deg 24deg),
    repeating-linear-gradient(45deg, transparent 0px, transparent 4px, rgba(217, 119, 6, 0.08) 4px, rgba(217, 119, 6, 0.08) 8px);
  border: 1.5px solid #d97706;
}
.fut-tier-icon .fut-val { color: #78350f; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); }
.fut-tier-icon .fut-lbl { color: #92400e; text-shadow: none; font-weight: 900; }
.fut-tier-icon .fut-ribbon {
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.98), rgba(254, 240, 138, 0.95), rgba(248, 250, 252, 0.98));
  border-top: 2px solid #d97706;
  border-bottom: 2px solid #d97706;
}
.fut-tier-icon .fut-player-name { color: #451a03 !important; text-shadow: none !important; }
.fut-tier-icon .fut-stat-row {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 119, 6, 0.5);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes icon-radiance {
  0%, 100% { filter: drop-shadow(0 0 25px rgba(251, 191, 36, 0.6)) drop-shadow(0 14px 30px rgba(0,0,0,0.9)); }
  50% { filter: drop-shadow(0 0 42px rgba(253, 224, 71, 0.95)) drop-shadow(0 16px 36px rgba(0,0,0,0.95)); }
}

/* Card Top Section: Left Badges & Right Portrait */
.fut-top-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  height: 42%;
  min-height: 42%;
  max-height: 42%;
  position: relative;
  flex-shrink: 0;
}

.fut-badge-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 28%;
  z-index: 2;
  margin-top: 1px;
}

/* Big OVR Rating (EA FC Authentic Condensed Athletic Number) */
.fut-ovr-big {
  font-family: 'Teko', sans-serif !important;
  font-size: clamp(1.6rem, 18cqw, 2.35rem) !important;
  line-height: 0.82 !important;
  font-weight: 700 !important;
  letter-spacing: -1px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 2px #000;
}

/* Position Badge */
.fut-pos-badge {
  font-family: 'Chakra Petch', sans-serif !important;
  font-size: clamp(0.6rem, 6.2cqw, 0.8rem) !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  margin-top: 1px;
}

.fut-flag-icon {
  font-size: clamp(0.85rem, 9cqw, 1.15rem);
  line-height: 1;
  margin-top: 2px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

/* Player Portrait Area */
.fut-portrait-wrap {
  position: absolute;
  right: -5%;
  top: 0;
  width: 78%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1;
  overflow: hidden;
}

.fut-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: contrast(1.08) brightness(1.03);
  mask-image: linear-gradient(to bottom, black 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 72%, transparent 100%);
}

/* Player Name Chamfer Ribbon */
.fut-name-banner {
  width: 94%;
  text-align: center;
  padding: 2px 3px;
  margin: 1px auto 2px auto;
  z-index: 3;
  flex-shrink: 0;
  clip-path: polygon(4% 0%, 96% 0%, 100% 50%, 96% 100%, 4% 100%, 0% 50%);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
}

.fut-player-name {
  font-family: 'Chakra Petch', 'Oswald', sans-serif !important;
  font-size: clamp(0.66rem, 6.8cqw, 0.88rem) !important;
  font-weight: 800 !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  line-height: 1.2;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

/* Bottom 6-Stat Matrix - 100% Visible & Fluid */
.fut-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px 3px;
  width: 92%;
  margin: 1px auto 0 auto;
  z-index: 3;
  flex-shrink: 0;
}

.fut-stat-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(4, 7, 15, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 5px;
  padding: 1px 2px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.fut-val {
  font-family: 'Teko', sans-serif !important;
  font-weight: 600 !important;
  font-size: clamp(0.82rem, 8.8cqw, 1.22rem) !important;
  line-height: 0.88 !important;
  letter-spacing: -0.5px;
}

.fut-lbl {
  font-family: 'Chakra Petch', sans-serif !important;
  font-size: clamp(0.48rem, 4.8cqw, 0.62rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1 !important;
}

/* ==========================================================================
   STADIUM UI & BACKGROUND ELEMENTS
   ========================================================================== */

.stadium-bg {
  background-color: #020617 !important;
  background-image: 
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(16, 185, 129, 0.35) 0%, transparent 70%),
    radial-gradient(ellipse 900px 500px at 85% -10%, rgba(14, 165, 233, 0.3) 0%, transparent 70%),
    radial-gradient(circle at 50% 25%, rgba(245, 158, 11, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 50% 100%, rgba(6, 78, 59, 0.45) 0%, transparent 65%) !important;
  background-attachment: fixed !important;
}

/* Atmospheric Stadium Floodlight Beam Effect */
.stadium-lights-cone {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 240px;
  background: radial-gradient(ellipse at 50% -20%, rgba(255, 255, 255, 0.08) 0%, rgba(16, 185, 129, 0.04) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.pitch-container {
  background-color: #14532d;
  background-image: 
    repeating-linear-gradient(
      to bottom,
      rgba(22, 101, 52, 0.95) 0px,
      rgba(22, 101, 52, 0.95) 45px,
      rgba(21, 128, 61, 0.92) 45px,
      rgba(21, 128, 61, 0.92) 90px
    ),
    url('/static/images/pitch.svg');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: repeat-y, no-repeat;
  border-radius: 28px;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.85), 0 20px 40px rgba(0, 0, 0, 0.8);
  border: 4px solid rgba(34, 197, 94, 0.4);
  position: relative;
  min-height: 680px;
}

/* Tactical Formation Node Spot */
.formation-spot-ring {
  border: 2px dashed rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
  border-radius: 20px;
  transition: all 0.25s ease;
}
.formation-spot-ring:hover {
  border-color: #34d399;
  box-shadow: 0 0 25px rgba(52, 211, 153, 0.6);
  transform: scale(1.02);
}

/* Broadcast League Table Styling */
.broadcast-podium-gold {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.08) 50%, transparent 100%) !important;
  border-left: 4px solid #fbbf24 !important;
  box-shadow: inset 0 0 25px rgba(245, 158, 11, 0.12) !important;
}

.broadcast-podium-silver {
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.15) 0%, rgba(148, 163, 184, 0.05) 50%, transparent 100%) !important;
  border-left: 4px solid #cbd5e1 !important;
}

.broadcast-podium-bronze {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.15) 0%, rgba(180, 83, 9, 0.05) 50%, transparent 100%) !important;
  border-left: 4px solid #d97706 !important;
}

/* Tactile 3D Button Style */
.btn-tactile {
  transition: all 0.15s cubic-bezier(0.2, 0.8, 0.4, 1);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.3);
}
.btn-tactile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.4), 0 12px 20px rgba(0, 0, 0, 0.35);
}
.btn-tactile:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* 3D Gold Booster Pack in Shop */
.pack-3d-foil {
  position: relative;
  width: 230px;
  height: 320px;
  background: linear-gradient(145deg, #fef08a 0%, #f59e0b 25%, #d97706 50%, #b45309 75%, #451a03 100%);
  border-radius: 18px;
  box-shadow: 
    0 25px 50px -12px rgba(245, 158, 11, 0.45),
    0 15px 30px rgba(0, 0, 0, 0.8),
    inset 0 2px 6px rgba(255, 255, 255, 0.8),
    inset 0 -2px 6px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  overflow: hidden;
}

.pack-3d-foil:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 
    0 35px 60px -15px rgba(245, 158, 11, 0.6),
    0 20px 35px rgba(0, 0, 0, 0.9),
    inset 0 2px 8px rgba(255, 255, 255, 0.95);
}

/* Pack Crimped Top and Bottom Seals */
.pack-crimp-top, .pack-crimp-bottom {
  width: 100%;
  height: 12px;
  background: repeating-linear-gradient(90deg, #b45309 0px, #b45309 3px, #fde047 3px, #fde047 6px);
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

/* Pack Luminous Ray Sweep */
.pack-light-sweep {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 35%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 65%
  );
  transform: rotate(25deg);
  animation: pack-light-sweep 4s infinite linear;
  pointer-events: none;
}

@keyframes pack-light-sweep {
  0% { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(100%) rotate(25deg); }
}

/* Drag & Drop Ghost */
.sortable-ghost {
  opacity: 0.25 !important;
  transform: scale(0.92) !important;
  filter: grayscale(1) !important;
}

.sortable-chosen {
  opacity: 0.95 !important;
  transform: scale(1.05) !important;
}

/* 3D Card Flip Mechanics */
.perspective-1000 {
  perspective: 1000px;
}

.fut-flip-card-wrapper {
  perspective: 1000px;
  position: relative;
}

.fut-card-flipper, .card-flipper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.52;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.fut-card-flipper.is-flipped, .card-flipper.is-flipped {
  transform: rotateY(180deg);
}

.fut-card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.fut-card-front {
  z-index: 2;
  transform: rotateY(0deg);
}

.fut-card-back-actions {
  transform: rotateY(180deg);
  z-index: 1;
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.card-back {
  background: linear-gradient(135deg, #1e1b4b, #312e81, #0f172a);
  border: 3px solid #fbbf24;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  clip-path: polygon(6% 0%, 94% 0%, 100% 4%, 100% 94%, 50% 100%, 0% 94%, 0% 4%);
}

.card-front {
  transform: rotateY(180deg);
}

/* Card active in Swap Mode */
.card-swap-active .fut-card-shield {
  box-shadow: 0 0 0 3px #fbbf24, 0 0 25px rgba(251, 191, 36, 0.8) !important;
  transform: scale(1.04);
  animation: swap-pulse 1.2s infinite ease-in-out;
}

@keyframes swap-pulse {
  0%, 100% { box-shadow: 0 0 0 3px #fbbf24, 0 0 15px rgba(251, 191, 36, 0.6); }
  50% { box-shadow: 0 0 0 5px #f59e0b, 0 0 28px rgba(245, 158, 11, 0.9); }
}

.card-swap-target {
  cursor: pointer;
}
.card-swap-target:hover .fut-card-shield {
  box-shadow: 0 0 0 3px #34d399, 0 0 15px rgba(52, 211, 153, 0.5) !important;
}

/* Pack Shake */
@keyframes pack-shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-2px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake-animation {
  animation: pack-shake 0.45s infinite;
}

.gold-shimmer-btn {
  background: linear-gradient(90deg, #d97706, #fbbf24, #f59e0b, #d97706);
  background-size: 300% 100%;
  animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* ==========================================================================
   BROADCAST UI PANELS & TELEMETRY WIDGETS
   ========================================================================== */

.fut-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(2, 6, 23, 0.96) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.fut-panel-gold {
  background: linear-gradient(180deg, rgba(30, 15, 4, 0.92) 0%, rgba(10, 5, 2, 0.98) 100%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.9), 0 0 25px rgba(245, 158, 11, 0.2), inset 0 1px 0 rgba(254, 240, 138, 0.4) !important;
  border-radius: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.font-broadcast {
  font-family: 'Chakra Petch', sans-serif !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.font-teko {
  font-family: 'Teko', sans-serif !important;
}

.font-oswald {
  font-family: 'Oswald', sans-serif !important;
}

/* ==========================================================================
   EA SPORTS FC BROADCAST SCOREBUG HEADER & NAVIGATION HUD
   ========================================================================== */

.fut-broadcast-header {
  background: linear-gradient(180deg, #0b1120 0%, #030712 100%) !important;
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(254, 240, 138, 0.35) !important;
}

.fut-scorebug-chip {
  clip-path: polygon(6px 0%, calc(100% - 6px) 0%, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0% calc(100% - 6px), 0% 6px);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(6, 78, 59, 0.6) 100%);
  border: 1px solid rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.fut-coin-treasury {
  clip-path: polygon(6px 0%, calc(100% - 6px) 0%, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0% calc(100% - 6px), 0% 6px);
  background: linear-gradient(135deg, rgba(30, 15, 4, 0.95) 0%, rgba(15, 8, 2, 0.98) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(254, 240, 138, 0.4);
}

.fut-nav-pill {
  font-family: 'Chakra Petch', sans-serif !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  clip-path: polygon(5px 0%, calc(100% - 5px) 0%, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0% calc(100% - 5px), 0% 5px);
}

.fut-nav-pill.active {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.25) 0%, rgba(180, 83, 9, 0.65) 100%);
  border-top: 2px solid #fbbf24;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.fut-mobile-hud {
  background: linear-gradient(180deg, rgba(11, 17, 32, 0.98) 0%, rgba(3, 7, 18, 0.99) 100%) !important;
  border-top: 1.5px solid rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(254, 240, 138, 0.2) !important;
}

.fut-mobile-tab.active {
  color: #fbbf24 !important;
  position: relative;
}

.fut-mobile-tab.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: #fbbf24;
  box-shadow: 0 0 10px #fbbf24;
  border-radius: 9999px;
}
