/**
 * File: C:\xampp\htdocs\charapp\assets\css\character-combat-skills.css
 * 
 * Purpose:
 * - Attack Cards styling (RPG Theme)
 * - Skill Cards styling (RPG Theme)
 * - Combat & Skills section components
 * 
 * Dependencies:
 * - app.css (base variables and colors)
 * 
 * Load Order: 3
 * 
 * OPTIMIZATIONS:
 * - Magical gradient backgrounds
 * - Glow effects on hover
 * - Smooth transitions with depth
 * - RPG-themed color schemes
 */

/* =========================
   Attack Cards (Combat Theme)
   ========================= */
.attack-card {
  background: 
    linear-gradient(135deg, rgba(13,110,253,0.08), rgba(176,140,255,0.08)),
    rgba(255,255,255,0.02);
  border: 1px solid rgba(176,140,255,0.2);
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.attack-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(176,140,255,0.1),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.attack-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(176,140,255,0.05),
    transparent
  );
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.attack-card:hover {
  background: 
    linear-gradient(135deg, rgba(13,110,253,0.12), rgba(176,140,255,0.12)),
    rgba(255,255,255,0.04);
  border-color: rgba(176,140,255,0.4);
  transform: translateY(-2px);
  box-shadow: 
    0 4px 12px rgba(176,140,255,0.2),
    0 0 20px rgba(176,140,255,0.1),
    inset 0 1px 1px rgba(255,255,255,0.1);
}

.attack-card:hover::before {
  opacity: 1;
}

.attack-card:hover::after {
  opacity: 1;
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.attack-card .fw-semibold {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.attack-card .fw-semibold i {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

.attack-card:hover .fw-semibold i {
  transform: scale(1.1);
}

.attack-card .small {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.7);
}

.attack-card .btn-outline-danger {
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.attack-card .btn-outline-danger:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(220,53,69,0.3);
}

/* =========================
   Skill Cards (Crafting Theme)
   ========================= */
.skill-card {
  background: 
    linear-gradient(135deg, rgba(255,211,107,0.08), rgba(93,214,201,0.08)),
    rgba(255,255,255,0.02);
  border: 1px solid rgba(255,211,107,0.2);
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(255,211,107,0.1),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255,211,107,0.05),
    transparent
  );
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.skill-card:hover {
  background: 
    linear-gradient(135deg, rgba(255,211,107,0.12), rgba(93,214,201,0.12)),
    rgba(255,255,255,0.04);
  border-color: rgba(255,211,107,0.4);
  transform: translateY(-2px);
  box-shadow: 
    0 4px 12px rgba(255,211,107,0.2),
    0 0 20px rgba(255,211,107,0.1),
    inset 0 1px 1px rgba(255,255,255,0.1);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card:hover::after {
  opacity: 1;
  animation: shimmer 2s ease-in-out infinite;
}

.skill-card .fw-semibold {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.skill-card .fw-semibold i {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

.skill-card:hover .fw-semibold i {
  transform: scale(1.1);
}

.skill-card .small {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.7);
}

.skill-card .btn-outline-danger {
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.skill-card .btn-outline-danger:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(220,53,69,0.3);
}

/* =========================
   Icon Glow Effects (Color-Coded)
   ========================= */
.attack-card .fw-semibold i[style*="#B08CFF"],
.attack-card .fw-semibold i[style*="#b08cff"] {
  filter: drop-shadow(0 0 8px rgba(176,140,255,0.6));
}

.attack-card .fw-semibold i[style*="#0D6EFD"],
.attack-card .fw-semibold i[style*="#0d6efd"] {
  filter: drop-shadow(0 0 8px rgba(13,110,253,0.6));
}

.skill-card .fw-semibold i[style*="#FFD36B"],
.skill-card .fw-semibold i[style*="#ffd36b"] {
  filter: drop-shadow(0 0 8px rgba(255,211,107,0.6));
}

.skill-card .fw-semibold i[style*="#5DD6C9"],
.skill-card .fw-semibold i[style*="#5dd6c9"] {
  filter: drop-shadow(0 0 8px rgba(93,214,201,0.6));
}

/* =========================
   Rank/Level Badge Styling
   ========================= */
.skill-card .small i.fa-star {
  color: #FFD36B;
  filter: drop-shadow(0 0 4px rgba(255,211,107,0.5));
}

.attack-card .small i.fa-dice-d20 {
  color: #B08CFF;
  filter: drop-shadow(0 0 4px rgba(176,140,255,0.5));
}

.attack-card .small i.fa-burst {
  color: #FF6B6B;
  filter: drop-shadow(0 0 4px rgba(255,107,107,0.5));
}

/* =========================
   Empty State
   ========================= */
.text-muted {
  color: rgba(255,255,255,0.4) !important;
  font-style: italic;
}

/* =========================
   Form Input Enhancements
   ========================= */
#attacks .form-control,
#attacks .form-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  transition: all 0.3s ease;
}

#attacks .form-control:focus,
#attacks .form-select:focus {
  background: rgba(255,255,255,0.08);
  border-color: rgba(93,214,201,0.4);
  box-shadow: 0 0 0 0.2rem rgba(93,214,201,0.15);
  color: rgba(255,255,255,1);
}

#attacks .form-control::placeholder {
  color: rgba(255,255,255,0.3);
}

#attacks .btn-success {
  background: linear-gradient(135deg, rgba(93,214,201,0.8), rgba(93,214,201,0.9));
  border: 1px solid rgba(93,214,201,0.4);
  transition: all 0.3s ease;
}

#attacks .btn-success:hover {
  background: linear-gradient(135deg, rgba(93,214,201,0.9), rgba(93,214,201,1));
  border-color: rgba(93,214,201,0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(93,214,201,0.3);
}

/* =========================
   Responsive Design
   ========================= */
@media (max-width: 992px) {
  .attack-card,
  .skill-card {
    padding: 0.9rem;
  }
}

@media (max-width: 768px) {
  .attack-card,
  .skill-card {
    padding: 0.85rem;
  }
  
  .attack-card .fw-semibold,
  .skill-card .fw-semibold {
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .attack-card,
  .skill-card {
    padding: 0.75rem;
  }
  
  .attack-card .fw-semibold,
  .skill-card .fw-semibold {
    font-size: 0.9rem;
  }
  
  .attack-card .small,
  .skill-card .small {
    font-size: 0.8rem;
  }
  
  .attack-card .btn-outline-danger,
  .skill-card .btn-outline-danger {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
  }
}

/* =========================
   Print Styles
   ========================= */
@media print {
  .attack-card,
  .skill-card {
    background: white !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  
  .attack-card::before,
  .attack-card::after,
  .skill-card::before,
  .skill-card::after {
    display: none !important;
  }
  
  .attack-card .btn-outline-danger,
  .skill-card .btn-outline-danger {
    display: none !important;
  }
}