/* ═══════════════════════════════════════════════════════════════════════════════
   OLYMPUS RISING - EQUIPMENT UI STYLES
   Paper doll, comparison panel, set bonuses
   ═══════════════════════════════════════════════════════════════════════════════ */

.equipment-view {
  padding: 16px;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  height: calc(100vh - 220px);
}

.equipment-layout {
  display: grid;
  grid-template-columns: 340px 1fr 300px;
  gap: 16px;
  min-height: 100%;
}

@media (max-width: 1100px) {
  .equipment-layout {
    grid-template-columns: 300px 1fr 260px;
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .equipment-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────────
   PAPER DOLL SECTION
   ───────────────────────────────────────────────────────────────────────────────── */

.paper-doll-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.paper-doll {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 40, 60, 0.8), rgba(20, 30, 50, 0.9));
  border-radius: 12px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  padding: 20px;
  min-height: 320px;
}

/* View Toggle (2D/3D) */
.view-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 8px;
  width: fit-content;
}

.view-btn {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.view-btn.active {
  background: rgba(212, 175, 55, 0.3);
  color: #d4af37;
}

.character-silhouette {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 140px;
  background: linear-gradient(180deg, rgba(100, 120, 150, 0.2), rgba(60, 80, 110, 0.3));
  border-radius: 50% 50% 40% 40%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

.silhouette-icon {
  font-size: 3rem;
  opacity: 0.6;
}

.equipment-slots {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
  height: 100%;
}

/* Equipment Slot Positions */
.equip-slot {
  width: 56px;
  height: 56px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.equip-slot:hover {
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(212, 175, 55, 0.1);
}

.equip-slot.filled {
  border-color: var(--rarity-color, #666);
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--rarity-color) 20%, transparent), 
    rgba(0, 0, 0, 0.5));
}

.equip-slot.filled:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px color-mix(in srgb, var(--rarity-color) 50%, transparent);
}

.equip-slot.empty .slot-icon {
  font-size: 1.5rem;
  opacity: 0.4;
}

.equip-slot.empty .slot-name {
  font-size: 0.6rem;
  opacity: 0.4;
  text-align: center;
}

.slot-item {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-item-icon {
  font-size: 1.8rem;
}

.set-indicator {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  padding: 2px;
}

/* Slot Tooltip */
.slot-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 30, 50, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 6px 10px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  z-index: 100;
  pointer-events: none;
}

.equip-slot:hover .slot-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

.tooltip-name {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
}

.tooltip-type {
  display: block;
  font-size: 0.7rem;
  opacity: 0.7;
  text-transform: capitalize;
}

/* Position slots around the silhouette */
.equip-slot.top-center { grid-column: 2; grid-row: 1; }
.equip-slot.left { grid-column: 1; grid-row: 2; }
.equip-slot.center { grid-column: 2; grid-row: 2; }
.equip-slot.right { grid-column: 3; grid-row: 2; }
.equip-slot.left-bottom { grid-column: 1; grid-row: 3; }
.equip-slot.bottom-center { grid-column: 2; grid-row: 3; }
.equip-slot.right-bottom { grid-column: 3; grid-row: 3; }
.equip-slot.accessory-1 { grid-column: 1; grid-row: 4; }
.equip-slot.accessory-2 { grid-column: 2; grid-row: 4; }
.equip-slot.accessory-3 { grid-column: 3; grid-row: 4; }
.equip-slot.accessory-4 { grid-column: 2; grid-row: 4; margin-left: 60px; }

/* Stats Summary */
.equipped-stats-summary {
  background: linear-gradient(135deg, rgba(13, 31, 51, 0.8), rgba(20, 40, 65, 0.9));
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.equipped-stats-summary h4 {
  margin: 12px 0 10px;
  font-size: 0.9rem;
  color: #d4af37;
}

.power-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  margin-bottom: 12px;
}

.power-score-label {
  font-size: 0.85rem;
  color: #d4af37;
}

.power-score-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.slots-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.slots-label {
  font-size: 0.8rem;
  opacity: 0.8;
  white-space: nowrap;
}

.slots-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.slots-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.slots-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: #3498db;
  min-width: 30px;
  text-align: right;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 0.75rem;
}

.stat-item .stat-icon {
  margin-right: 4px;
}

.stat-item .stat-value {
  color: #2ecc71;
  font-weight: 600;
}

.stat-item.secondary .stat-value {
  color: #3498db;
}

.no-stats {
  text-align: center;
  padding: 16px;
  opacity: 0.5;
  font-size: 0.85rem;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   COMPARISON SECTION
   ───────────────────────────────────────────────────────────────────────────────── */

.comparison-section {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.comparison-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0.5;
}

.comparison-placeholder .placeholder-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.comparison-placeholder .hint {
  font-size: 0.8rem;
  opacity: 0.7;
}

.comparison-placeholder.success {
  opacity: 1;
  color: #2ecc71;
}

/* Comparison Panel */
.comparison-panel {
  display: flex;
  gap: 12px;
  flex: 1;
}

.compare-item {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compare-item.empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-slot-info {
  text-align: center;
  opacity: 0.6;
}

.empty-slot-info .empty-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.item-header.large {
  padding-bottom: 14px;
}

.item-icon {
  font-size: 1.8rem;
}

.item-icon.large {
  font-size: 2.2rem;
}

.item-icon.xlarge {
  font-size: 3rem;
}

.item-title h4, .item-title h3 {
  margin: 0;
  font-size: 0.95rem;
}

.item-title h3 {
  font-size: 1.1rem;
}

.item-type {
  font-size: 0.75rem;
  opacity: 0.7;
  text-transform: capitalize;
}

.equipped-badge {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(46, 204, 113, 0.3);
  border: 1px solid #2ecc71;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  color: #2ecc71;
  margin-left: 8px;
}

/* Item Stats */
.item-stats {
  flex: 1;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-row .stat-name {
  opacity: 0.9;
}

.stat-row .stat-value {
  font-weight: 600;
}

.stat-row .stat-value.positive,
.stat-row.positive .stat-value {
  color: #2ecc71;
}

.stat-row .diff {
  margin-left: 8px;
  font-size: 0.75rem;
}

.stat-row .diff.positive {
  color: #2ecc71;
}

.stat-row .diff.negative {
  color: #e74c3c;
}

.stat-row.negative {
  opacity: 0.7;
}

.stat-group {
  margin-bottom: 12px;
}

.stat-group h5 {
  margin: 0 0 6px;
  font-size: 0.75rem;
  color: #d4af37;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.no-stats {
  opacity: 0.5;
  font-size: 0.8rem;
  text-align: center;
  padding: 20px;
}

/* Special Effect */
.item-special {
  padding: 8px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 6px;
  border-left: 3px solid #d4af37;
}

.item-special.large {
  padding: 12px;
}

.special-label {
  font-size: 0.75rem;
  color: #d4af37;
  font-weight: 600;
}

.special-text {
  font-size: 0.8rem;
  font-style: italic;
  margin: 4px 0 0;
}

/* Set Info */
.item-set {
  padding: 6px 8px;
  background: rgba(52, 152, 219, 0.1);
  border-radius: 4px;
  font-size: 0.8rem;
}

.set-label {
  color: #3498db;
}

.item-set-info {
  background: rgba(52, 152, 219, 0.1);
  border-radius: 8px;
  padding: 10px;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.item-set-info h5 {
  margin: 0 0 4px;
  color: #3498db;
}

.set-progress {
  font-size: 0.75rem;
  opacity: 0.8;
}

.set-bonus-preview {
  margin-top: 8px;
}

.bonus-preview {
  font-size: 0.7rem;
  padding: 3px 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  margin-top: 4px;
  opacity: 0.5;
}

.bonus-preview.active {
  opacity: 1;
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
}

/* Requirements */
.item-req {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
}

.item-req.met {
  background: rgba(46, 204, 113, 0.1);
  color: #2ecc71;
}

.item-req.unmet {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

/* Comparison Arrow */
.compare-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.stat-summary {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}

.stat-summary.upgrade {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
}

.stat-summary.downgrade {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

.stat-summary.sidegrade {
  background: rgba(241, 196, 15, 0.2);
  color: #f1c40f;
}

.arrow-icon {
  font-size: 1.5rem;
  opacity: 0.5;
}

/* Comparison Actions */
.comparison-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-actions .btn {
  flex: 1;
  padding: 10px;
  font-size: 0.85rem;
}

.comparison-actions .btn-small {
  flex: 0;
  padding: 10px 16px;
}

/* Item Meta */
.item-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  opacity: 0.6;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─────────────────────────────────────────────────────────────────────────────────
   INVENTORY SECTION
   ───────────────────────────────────────────────────────────────────────────────── */

.inventory-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.inventory-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #d4af37;
}

.inventory-controls {
  display: flex;
  gap: 6px;
}

.equip-filter {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 0.75rem;
}

.sort-btn {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  cursor: pointer;
}

.sort-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

#equip-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 8px;
  flex: 1;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

#equip-inventory-grid::-webkit-scrollbar {
  width: 6px;
}

#equip-inventory-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

#equip-inventory-grid::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}

#equip-inventory-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}

.inv-item {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--rarity-color) 15%, transparent), 
    rgba(0, 0, 0, 0.4));
  border: 2px solid var(--rarity-color, #666);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.inv-item:hover {
  transform: scale(1.08);
  box-shadow: 0 0 12px color-mix(in srgb, var(--rarity-color) 50%, transparent);
  z-index: 10;
}

.inv-item.cant-equip {
  opacity: 0.5;
}

.inv-item-icon {
  font-size: 1.6rem;
}

.inv-item-level {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.55rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 1px 3px;
  border-radius: 2px;
}

.set-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 0.5rem;
}

.inventory-actions {
  display: flex;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.inventory-actions .btn {
  flex: 1;
  font-size: 0.75rem;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.empty-inventory {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  opacity: 0.5;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   SET BONUSES SECTION
   ───────────────────────────────────────────────────────────────────────────────── */

.set-bonuses-section {
  margin-top: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.set-bonuses-section h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #d4af37;
}

.set-bonuses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.no-sets {
  opacity: 0.5;
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}

.set-bonus-card {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 14px;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.set-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.set-icon {
  font-size: 1.8rem;
}

.set-title h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #3498db;
}

.set-count {
  font-size: 0.75rem;
  opacity: 0.7;
}

.set-bonus-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.set-bonus-tier {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.set-bonus-tier.active {
  background: rgba(46, 204, 113, 0.15);
}

.set-bonus-tier.inactive {
  opacity: 0.4;
}

.tier-label {
  font-weight: 600;
  color: #d4af37;
  min-width: 30px;
}

.bonus-name {
  flex: 1;
}

.active-check {
  color: #2ecc71;
  font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   DETAIL PANEL
   ───────────────────────────────────────────────────────────────────────────────── */

.item-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.item-description {
  font-size: 0.85rem;
  opacity: 0.9;
  line-height: 1.5;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  margin: 0;
}

.detail-actions {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Empty Slot Panel */
.empty-slot-panel {
  text-align: center;
  padding: 20px;
}

.slot-header {
  margin-bottom: 20px;
}

.slot-header .slot-icon.large {
  font-size: 3rem;
  display: block;
  margin-bottom: 10px;
}

.slot-header h3 {
  margin: 0 0 4px;
}

.slot-header p {
  margin: 0;
  opacity: 0.6;
}

.compatible-items h4 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #d4af37;
}

.compatible-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.compatible-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s;
}

.compatible-item:hover {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.1);
}

.compatible-item .item-icon {
  font-size: 1.2rem;
}

.compatible-item .item-name {
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.no-items {
  opacity: 0.5;
  padding: 20px;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .comparison-panel {
    flex-direction: column;
  }
  
  .compare-arrow {
    flex-direction: row;
    padding: 8px 0;
  }
  
  .stat-summary {
    margin: 0 8px 0 0;
  }
  
  .arrow-icon {
    transform: rotate(90deg);
  }
  
  #equip-inventory-grid {
    grid-template-columns: repeat(5, 1fr);
    max-height: 200px;
  }
}

@media (max-width: 600px) {
  .equipment-slots {
    gap: 4px;
  }
  
  .equip-slot {
    width: 48px;
    height: 48px;
  }
  
  #equip-inventory-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .inv-item {
    width: 48px;
    height: 48px;
  }
  
  .set-bonuses-grid {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════════
   SPRINT 4 ENHANCEMENTS - Equipment & Inventory System
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────────
   RARITY GLOW EFFECTS
   ───────────────────────────────────────────────────────────────────────────────── */

.inv-item, .equip-slot.filled {
  position: relative;
  overflow: hidden;
}

/* Common - no glow */
.inv-item[style*="#9d9d9d"]::before,
.equip-slot.filled[style*="#9d9d9d"]::before {
  display: none;
}

/* Uncommon - subtle green glow */
.inv-item[style*="#1eff00"]::before,
.equip-slot.filled[style*="#1eff00"]::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(circle, rgba(30, 255, 0, 0.3), transparent 70%);
  animation: uncommon-glow 3s ease infinite;
}

@keyframes uncommon-glow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Rare - blue pulse */
.inv-item[style*="#0070dd"]::before,
.equip-slot.filled[style*="#0070dd"]::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(circle, rgba(0, 112, 221, 0.4), transparent 70%);
  animation: rare-glow 2.5s ease infinite;
}

@keyframes rare-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

/* Epic - purple shimmer */
.inv-item[style*="#a335ee"]::before,
.equip-slot.filled[style*="#a335ee"]::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(circle, rgba(163, 53, 238, 0.5), transparent 60%);
  animation: epic-glow 2s ease infinite;
}

@keyframes epic-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

/* Legendary - orange fire effect */
.inv-item[style*="#ff8000"]::before,
.equip-slot.filled[style*="#ff8000"]::before {
  content: "";
  position: absolute;
  inset: -3px;
  background: radial-gradient(circle, rgba(255, 128, 0, 0.6), rgba(255, 60, 0, 0.3), transparent 60%);
  animation: legendary-glow 1.5s ease infinite;
}

@keyframes legendary-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  25% { opacity: 0.9; }
  50% { opacity: 0.7; transform: scale(1.08); }
  75% { opacity: 0.9; }
}

/* Mythic - golden rainbow shimmer */
.inv-item[style*="#e6cc80"]::before,
.equip-slot.filled[style*="#e6cc80"]::before {
  content: "";
  position: absolute;
  inset: -4px;
  background: linear-gradient(45deg, 
    rgba(230, 204, 128, 0.6), 
    rgba(255, 215, 0, 0.6), 
    rgba(255, 165, 0, 0.6), 
    rgba(230, 204, 128, 0.6));
  background-size: 300% 300%;
  animation: mythic-glow 3s linear infinite;
  filter: blur(2px);
}

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

/* Legendary/Mythic border shine */
.inv-item[style*="#ff8000"]::after,
.inv-item[style*="#e6cc80"]::after,
.equip-slot.filled[style*="#ff8000"]::after,
.equip-slot.filled[style*="#e6cc80"]::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shine-sweep 3s linear infinite;
  pointer-events: none;
}

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

/* ─────────────────────────────────────────────────────────────────────────────────
   INVENTORY ITEM HOVER TOOLTIP
   ───────────────────────────────────────────────────────────────────────────────── */

.inv-item {
  position: relative;
}

.inv-item-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 10px 14px;
  background: rgba(15, 15, 25, 0.98);
  border: 2px solid var(--rarity-color, #666);
  border-radius: 8px;
  min-width: 180px;
  max-width: 250px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.inv-item:hover .inv-item-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

.tooltip-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.tooltip-name {
  font-weight: bold;
  font-size: 1rem;
  display: block;
}

.tooltip-type {
  font-size: 0.75rem;
  opacity: 0.7;
}

.tooltip-stats {
  font-size: 0.8rem;
}

.tooltip-stat {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}

.tooltip-stat-value {
  color: #27ae60;
}

.tooltip-special {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1c40f;
  font-size: 0.8rem;
  font-style: italic;
}

.tooltip-req {
  margin-top: 6px;
  font-size: 0.75rem;
}

.tooltip-req.met { color: #27ae60; }
.tooltip-req.unmet { color: #e74c3c; }

/* ─────────────────────────────────────────────────────────────────────────────────
   EQUIP ANIMATION
   ───────────────────────────────────────────────────────────────────────────────── */

.equip-slot.equipping {
  animation: equip-flash 0.5s ease;
}

@keyframes equip-flash {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); filter: brightness(2); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.equip-slot.unequipping {
  animation: unequip-shrink 0.3s ease forwards;
}

@keyframes unequip-shrink {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.5; }
}

/* Item flying animation for equip */
.item-flying {
  position: fixed;
  z-index: 10000;
  animation: fly-to-slot 0.4s ease-out forwards;
  pointer-events: none;
}

@keyframes fly-to-slot {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(0.8); }
}

/* ─────────────────────────────────────────────────────────────────────────────────
   COMPARISON PANEL ENHANCEMENTS
   ───────────────────────────────────────────────────────────────────────────────── */

.stat-change {
  transition: all 0.3s ease;
}

.stat-change.positive {
  color: #27ae60;
  animation: stat-positive 0.5s ease;
}

.stat-change.negative {
  color: #e74c3c;
  animation: stat-negative 0.5s ease;
}

@keyframes stat-positive {
  0% { transform: translateX(-10px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes stat-negative {
  0% { transform: translateX(10px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* Upgrade/Downgrade indicators */
.stat-summary.upgrade {
  background: rgba(39, 174, 96, 0.2);
  border: 1px solid #27ae60;
  color: #27ae60;
}

.stat-summary.downgrade {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid #e74c3c;
  color: #e74c3c;
}

.stat-summary.sidegrade {
  background: rgba(241, 196, 15, 0.2);
  border: 1px solid #f1c40f;
  color: #f1c40f;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   SET BONUS DISPLAY
   ───────────────────────────────────────────────────────────────────────────────── */

.set-bonus-panel {
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(46, 204, 113, 0.05));
  border: 1px solid rgba(39, 174, 96, 0.3);
  border-radius: 8px;
}

.set-bonus-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #2ecc71;
  font-weight: bold;
}

.set-bonus-progress {
  font-size: 0.85rem;
  opacity: 0.8;
}

.set-bonus-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.set-bonus-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 0.85rem;
}

.set-bonus-item.active {
  background: rgba(39, 174, 96, 0.2);
  border-left: 3px solid #27ae60;
}

.set-bonus-item.inactive {
  opacity: 0.5;
}

.set-bonus-count {
  font-weight: bold;
  color: #f1c40f;
}

.set-bonus-effect {
  flex: 1;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   PAPER DOLL ENHANCEMENTS
   ───────────────────────────────────────────────────────────────────────────────── */

.character-silhouette {
  transition: all 0.3s ease;
}

.character-silhouette.powered-up {
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
  animation: silhouette-pulse 2s ease infinite;
}

@keyframes silhouette-pulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3)); }
  50% { filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.6)); }
}

/* Connection lines between slots (visual enhancement) */
.equipment-slots::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  border: 1px dashed rgba(212, 175, 55, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   QUICK ACTIONS
   ───────────────────────────────────────────────────────────────────────────────── */

#auto-equip-btn {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  border: none;
  transition: all 0.3s ease;
}

#auto-equip-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

#sell-junk-btn {
  transition: all 0.3s ease;
}

#sell-junk-btn:hover {
  background: rgba(231, 76, 60, 0.2);
  border-color: #e74c3c;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   ITEM NEW INDICATOR
   ───────────────────────────────────────────────────────────────────────────────── */

.inv-item.new::after,
.equip-slot.new::after {
  content: "NEW";
  position: absolute;
  top: -5px;
  right: -5px;
  padding: 2px 6px;
  background: #e74c3c;
  color: white;
  font-size: 0.6rem;
  font-weight: bold;
  border-radius: 4px;
  animation: new-pulse 1.5s ease infinite;
}

@keyframes new-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ─────────────────────────────────────────────────────────────────────────────────
   LOADING & EMPTY STATES
   ───────────────────────────────────────────────────────────────────────────────── */

.empty-inventory {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0.6;
}

.empty-inventory::before {
  content: "📦";
  font-size: 3rem;
  margin-bottom: 10px;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   STATS SUMMARY PANEL
   ───────────────────────────────────────────────────────────────────────────────── */

.equipped-stats-summary {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 0.85rem;
}

.stat-item .stat-icon {
  margin-right: 6px;
}

.stat-item .stat-value {
  font-weight: bold;
  color: #d4af37;
}

.power-score {
  text-align: center;
  padding: 12px;
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(241, 196, 15, 0.1));
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.power-score-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.power-score-value {
  font-size: 2rem;
  font-weight: bold;
  color: #f1c40f;
  text-shadow: 0 0 10px rgba(241, 196, 15, 0.5);
}



/* ─────────────────────────────────────────────────────────────────────────────────
   SLOTS PROGRESS BAR
   ───────────────────────────────────────────────────────────────────────────────── */

.slots-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.slots-label {
  font-size: 0.8rem;
  opacity: 0.8;
  white-space: nowrap;
}

.slots-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.slots-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #9b59b6);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.slots-count {
  font-size: 0.85rem;
  font-weight: bold;
  color: #d4af37;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   COMPARISON SUCCESS STATE
   ───────────────────────────────────────────────────────────────────────────────── */

.comparison-placeholder.success {
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(46, 204, 113, 0.05));
  border: 1px dashed rgba(39, 174, 96, 0.5);
}

.comparison-placeholder.success .placeholder-icon {
  animation: success-bounce 0.5s ease;
}

@keyframes success-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* ─────────────────────────────────────────────────────────────────────────────────
   ITEM SLOT RARITY BORDERS (CSS Variables approach)
   ───────────────────────────────────────────────────────────────────────────────── */

.equip-slot.filled {
  position: relative;
}

/* Rarity-based pulsing border */
.equip-slot.filled.legendary,
.inv-item.legendary {
  animation: legendary-border-pulse 2s ease infinite;
}

@keyframes legendary-border-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 128, 0, 0.5), inset 0 0 5px rgba(255, 128, 0, 0.2); }
  50% { box-shadow: 0 0 15px rgba(255, 128, 0, 0.8), inset 0 0 10px rgba(255, 128, 0, 0.4); }
}

.equip-slot.filled.mythic,
.inv-item.mythic {
  animation: mythic-border-pulse 2.5s ease infinite;
}

@keyframes mythic-border-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(230, 204, 128, 0.6), inset 0 0 5px rgba(230, 204, 128, 0.2); }
  50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.9), inset 0 0 15px rgba(255, 215, 0, 0.4); }
}

/* ─────────────────────────────────────────────────────────────────────────────────
   FILTER & SORT CONTROLS
   ───────────────────────────────────────────────────────────────────────────────── */

.inventory-controls {
  display: flex;
  gap: 8px;
}

.equip-filter {
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}

.equip-filter:focus {
  border-color: #d4af37;
  outline: none;
}

.sort-btn {
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: #d4af37;
}

.sort-btn.active {
  background: rgba(212, 175, 55, 0.3);
  border-color: #d4af37;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   ITEM DETAILS PANEL ENHANCEMENTS
   ───────────────────────────────────────────────────────────────────────────────── */

.compare-item .item-header {
  border-left: 4px solid;
  padding-left: 12px;
  margin-bottom: 12px;
}

.compare-item .item-special {
  padding: 10px;
  margin: 10px 0;
  background: rgba(241, 196, 15, 0.1);
  border: 1px solid rgba(241, 196, 15, 0.3);
  border-radius: 6px;
}

.special-label {
  font-weight: bold;
  color: #f1c40f;
}

.special-text {
  font-style: italic;
  color: #fff;
}

.compare-item .item-set {
  padding: 8px 12px;
  background: rgba(39, 174, 96, 0.1);
  border-radius: 6px;
  margin-top: 10px;
}

.set-label {
  font-weight: bold;
  color: #2ecc71;
}

.set-name {
  color: #27ae60;
}

.item-req {
  margin-top: 10px;
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  font-size: 0.85rem;
}

.item-req.met {
  background: rgba(39, 174, 96, 0.15);
  color: #27ae60;
}

.item-req.unmet {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   EQUIPPED BADGE
   ───────────────────────────────────────────────────────────────────────────────── */

.equipped-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(52, 152, 219, 0.3);
  border: 1px solid #3498db;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #3498db;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-left: 8px;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   COMPARISON ARROW ENHANCEMENT
   ───────────────────────────────────────────────────────────────────────────────── */

.compare-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 10px;
}

.compare-arrow .arrow-icon {
  font-size: 2rem;
  opacity: 0.5;
}

.stat-summary {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   EMPTY SLOT OPTIONS
   ───────────────────────────────────────────────────────────────────────────────── */

.empty-slot-options {
  text-align: center;
  padding: 30px;
}

.empty-slot-options .slot-icon-large {
  font-size: 4rem;
  opacity: 0.5;
  margin-bottom: 15px;
}

.empty-slot-options h3 {
  margin-bottom: 10px;
  color: #d4af37;
}

.compatible-items-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}

.compatible-item {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compatible-item:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: #d4af37;
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────────────────────────────────────────────
   SELL JUNK CONFIRMATION
   ───────────────────────────────────────────────────────────────────────────────── */

.sell-junk-summary {
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  margin-bottom: 15px;
}

.junk-count {
  font-size: 1.5rem;
  font-weight: bold;
  color: #f1c40f;
}

.gold-estimate {
  font-size: 1.2rem;
  color: #f39c12;
}



/* ─────────────────────────────────────────────────────────────────────────────────
   GOLD GAIN FLOATER ANIMATION
   ───────────────────────────────────────────────────────────────────────────────── */

.gold-gain-floater {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: bold;
  color: #f1c40f;
  text-shadow: 
    0 0 10px rgba(241, 196, 15, 0.8),
    0 0 20px rgba(241, 196, 15, 0.5),
    2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: gold-float-up 1.5s ease-out forwards;
  pointer-events: none;
  z-index: 1000;
}

@keyframes gold-float-up {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5);
  }
  30% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -150%) scale(1);
  }
}

/* ─────────────────────────────────────────────────────────────────────────────────
   INVENTORY COUNT BADGE
   ───────────────────────────────────────────────────────────────────────────────── */

.inventory-header {
  position: relative;
}

.inventory-count-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 10px;
  background: rgba(52, 152, 219, 0.3);
  border: 1px solid #3498db;
  border-radius: 12px;
  font-size: 0.75rem;
  color: #3498db;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   QUICK EQUIP INDICATOR
   ───────────────────────────────────────────────────────────────────────────────── */

.inv-item.upgrade-available {
  position: relative;
}

.inv-item.upgrade-available::before {
  content: "⬆";
  position: absolute;
  top: -4px;
  left: -4px;
  font-size: 0.8rem;
  color: #27ae60;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: upgrade-pulse 1s ease infinite;
}

@keyframes upgrade-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

/* ─────────────────────────────────────────────────────────────────────────────────
   ITEM DRAG AND DROP (Future feature prep)
   ───────────────────────────────────────────────────────────────────────────────── */

.inv-item.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.equip-slot.drag-over {
  background: rgba(39, 174, 96, 0.3) !important;
  border-color: #27ae60 !important;
  transform: scale(1.05);
}

/* ─────────────────────────────────────────────────────────────────────────────────
   ITEM LEVEL DISPLAY
   ───────────────────────────────────────────────────────────────────────────────── */

.inv-item-level {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 1px 4px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 3px;
  color: #fff;
}

/* ─────────────────────────────────────────────────────────────────────────────────
   INVENTORY SCROLL STYLING
   ───────────────────────────────────────────────────────────────────────────────── */

.inventory-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.3) rgba(0, 0, 0, 0.2);
}

.inventory-grid::-webkit-scrollbar {
  width: 8px;
}

.inventory-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.inventory-grid::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 4px;
}

.inventory-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}

