/* ==================== TRANSMOG SYSTEM STYLES ==================== */

/* Transmog Panel Container */
.transmog-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid var(--accent-cyan);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Transmog Header */
.transmog-header {
  position: relative;
  margin-bottom: 25px;
  text-align: center;
  border-bottom: 2px solid var(--accent-cyan);
  padding-bottom: 15px;
}

.transmog-header h3 {
  font-size: 2rem;
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  margin: 0 0 10px 0;
}

.transmog-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 5px 0;
}

.transmog-cost {
  color: var(--accent-gold);
  font-size: 1.1rem;
  font-weight: bold;
  margin: 5px 0;
}

.transmog-btn-close {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid #ff0000;
  color: #ff0000;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.transmog-btn-close:hover {
  background: rgba(255, 0, 0, 0.4);
  transform: scale(1.1);
}

/* Equipment Transmog Header in Equipment Panel */
.equipment-transmog-header {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(138, 43, 226, 0.1));
  border: 2px solid var(--accent-cyan);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
}

.transmog-open-btn {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border: none;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 12px 30px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.transmog-open-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 255, 0.5);
}

.transmog-hint {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 10px 0 0 0;
}

/* Transmog Indicator on Equipment Slots */
.equipment-slot.transmogged {
  position: relative;
  border: 2px solid var(--accent-purple);
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(0, 255, 255, 0.1));
  animation: transmogGlow 2s infinite;
}

@keyframes transmogGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.6);
  }
}

.transmog-indicator {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 1.2rem;
  animation: sparkle 1.5s infinite;
}

@keyframes sparkle {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 0.7;
  }
}

.transmog-info {
  font-size: 0.75rem;
  color: var(--accent-purple);
  margin: 3px 0;
  font-style: italic;
}

.reset-transmog-btn {
  background: rgba(138, 43, 226, 0.2);
  border: 1px solid var(--accent-purple);
  color: var(--accent-purple);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 5px;
  transition: all 0.3s;
}

.reset-transmog-btn:hover {
  background: rgba(138, 43, 226, 0.4);
  transform: scale(1.05);
}

/* Appearance Unlocked Badge in Inventory */
.appearance-unlocked {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 1rem;
  animation: pulse 1s infinite;
}

/* Transmog Presets */
.transmog-presets {
  margin-bottom: 30px;
}

.transmog-presets h4 {
  color: var(--accent-gold);
  font-size: 1.3rem;
  margin-bottom: 15px;
  text-align: center;
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.preset-slot {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s;
}

.preset-slot.filled {
  border-color: var(--accent-cyan);
  background: rgba(0, 255, 255, 0.05);
}

.preset-slot:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 255, 255, 0.2);
}

.preset-name {
  font-size: 1.1rem;
  color: var(--accent-cyan);
  font-weight: bold;
  margin-bottom: 10px;
}

.preset-items {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px 0;
  min-height: 30px;
  flex-wrap: wrap;
}

.preset-item-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5));
}

.preset-empty-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 10px 0;
  font-style: italic;
}

.preset-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

.preset-btn {
  flex: 1;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.preset-btn.save-btn {
  background: var(--accent-cyan);
  color: #000;
}

.preset-btn.save-btn:hover {
  background: var(--accent-green);
  transform: scale(1.05);
}

.preset-btn.load-btn {
  background: var(--accent-purple);
  color: white;
}

.preset-btn.load-btn:hover {
  background: var(--accent-pink);
  transform: scale(1.05);
}

.preset-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
  transform: none;
}

/* Appearance Library */
.transmog-library {
  margin-bottom: 20px;
}

.transmog-library h4 {
  color: var(--accent-purple);
  font-size: 1.3rem;
  margin-bottom: 15px;
  text-align: center;
}

.library-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 30px;
  font-style: italic;
}

.library-slot-group {
  margin-bottom: 25px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 15px;
}

.library-slot-title {
  font-size: 1.2rem;
  color: var(--accent-gold);
  font-weight: bold;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.library-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.library-item {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
}

.library-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cyan);
  box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
}

.library-item.active {
  border-color: var(--accent-green);
  background: rgba(0, 255, 0, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

/* Rarity Colors for Library Items */
.library-item.rarity-common { border-color: #9e9e9e; }
.library-item.rarity-uncommon { border-color: #4caf50; }
.library-item.rarity-rare { border-color: #2196f3; }
.library-item.rarity-epic { border-color: #9c27b0; }
.library-item.rarity-legendary { border-color: #ff9800; }

.library-item-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
  display: block;
  filter: drop-shadow(0 0 5px currentColor);
}

.library-item-name {
  display: block;
  font-size: 0.9rem;
  color: white;
  font-weight: bold;
  margin-bottom: 5px;
}

.library-item-rarity {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: capitalize;
  margin-bottom: 8px;
}

.library-item-badge {
  background: var(--accent-green);
  color: #000;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 10px;
  margin: 5px 0;
  display: inline-block;
}

.library-item-actions {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.library-btn {
  flex: 1;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.library-btn.preview-btn {
  background: rgba(0, 255, 255, 0.2);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
}

.library-btn.preview-btn:hover {
  background: rgba(0, 255, 255, 0.4);
  transform: scale(1.05);
}

.library-btn.apply-btn {
  background: var(--accent-purple);
  color: white;
}

.library-btn.apply-btn:hover {
  background: var(--accent-pink);
  transform: scale(1.05);
}

/* Transmog Actions */
.transmog-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding-top: 20px;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.transmog-action-btn {
  background: rgba(255, 0, 0, 0.2);
  border: 2px solid #ff0000;
  color: #ff0000;
  padding: 10px 25px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.transmog-action-btn:hover {
  background: rgba(255, 0, 0, 0.4);
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
  .transmog-panel {
    width: 95%;
    max-height: 90vh;
  }

  .presets-grid {
    grid-template-columns: 1fr;
  }

  .library-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .transmog-header h3 {
    font-size: 1.5rem;
  }
}

/* Scrollbar Styling */
.transmog-panel::-webkit-scrollbar {
  width: 10px;
}

.transmog-panel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

.transmog-panel::-webkit-scrollbar-thumb {
  background: var(--accent-cyan);
  border-radius: 10px;
}

.transmog-panel::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}
