/* Custom FUT Style & Soccer Aesthetics */

@layer utilities {
  .animate-fade-in {
    animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .animate-pop {
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  0% { transform: scale(0.9) translateY(12px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Carbon & Stadium Grid Pattern Overlay */
.stadium-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(rgba(16, 185, 129, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.7) 0%, rgba(10, 15, 29, 0.95) 100%);
  background-size: 24px 24px, 100% 100%;
}

/* Soccer Pitch Visual */
.soccer-pitch {
  background: 
    radial-gradient(ellipse at center, rgba(16, 185, 129, 0.28) 0%, rgba(6, 78, 59, 0.85) 75%, rgba(2, 44, 34, 0.95) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 40px, transparent 40px, transparent 80px);
  position: relative;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.7);
}

.pitch-half-line {
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.pitch-center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110px;
  height: 110px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

.pitch-penalty-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 70px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  pointer-events: none;
}

.pitch-penalty-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 70px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  pointer-events: none;
}

/* Card Rarity Background Styles */
.fut-card {
  position: relative;
  aspect-ratio: 1 / 1.45;
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.6);
}

.fut-card:hover {
  transform: translateY(-4px) scale(1.03);
  z-index: 30;
}

/* Card Types */
.card-tier-icon {
  background: linear-gradient(135deg, #451a03 0%, #78350f 25%, #d97706 50%, #fef3c7 75%, #b45309 100%);
  border: 1.5px solid #fbbf24;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.4), inset 0 0 12px rgba(254, 243, 199, 0.3);
}

.card-tier-special {
  background: linear-gradient(135deg, #022c22 0%, #065f46 30%, #10b981 60%, #6ee7b7 85%, #047857 100%);
  border: 1.5px solid #34d399;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.4), inset 0 0 12px rgba(167, 243, 208, 0.3);
}

.card-tier-gold {
  background: linear-gradient(135deg, #1e293b 0%, #334155 40%, #64748b 70%, #475569 100%);
  border: 1.5px solid #94a3b8;
}

.card-tier-rare-gold {
  background: linear-gradient(135deg, #713f12 0%, #a16207 40%, #eab308 70%, #ca8a04 100%);
  border: 1.5px solid #fde047;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.3);
}

/* Pitch Slot Empty Glow */
.pitch-slot-empty {
  background: rgba(15, 23, 42, 0.65);
  border: 2px dashed rgba(52, 211, 153, 0.4);
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.pitch-slot-empty:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  transform: scale(1.05);
}

/* Active Slot Pulse */
.slot-active-target {
  animation: targetPulse 1.4s infinite alternate ease-in-out;
  border-color: #f59e0b !important;
}

@keyframes targetPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6); }
  100% { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

/* Card Foil Shimmer */
.card-shimmer {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 35%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 65%
  );
  transform: rotate(30deg);
  pointer-events: none;
  opacity: 0.6;
}

/* Match Event Notification */
.match-event-pill {
  animation: slideEvent 0.3s ease-out forwards;
}

@keyframes slideEvent {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Difficulty Card Selection */
.diff-card.selected {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

/* Mobile responsive fixes */
@media (max-width: 640px) {
  .pitch-center-circle {
    width: 80px;
    height: 80px;
  }
}