/* NPC Trading UI Styles */

.npc-trading-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.npc-trading-container {
  background: #0a0a0a;
  border: 2px solid #39ff14;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.3);
}

.npc-trading-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #39ff14;
  background: #111;
}

.npc-trading-header h2 {
  margin: 0;
  color: #39ff14;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.close-btn {
  background: transparent;
  border: 2px solid #ff0033;
  color: #ff0033;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  font-family: "Courier New", monospace;
}

.close-btn:hover {
  background: #ff0033;
  color: #000;
  box-shadow: 0 0 15px rgba(255, 0, 51, 0.5);
}

.npc-trading-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #333;
  background: #111;
}

.tab-btn {
  background: transparent;
  border: none;
  color: #555;
  padding: 15px 30px;
  font-family: "Courier New", monospace;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  letter-spacing: 1px;
}

.tab-btn:hover {
  color: #888;
}

.tab-btn.active {
  color: #39ff14;
  border-bottom-color: #39ff14;
  background: #0a0a0a;
}

/* Trading Filters */
.trading-filters {
  display: flex;
  gap: 15px;
  padding: 15px 20px;
  background: #111;
  border-bottom: 1px solid #333;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label {
  color: #88cc88;
  font-size: 0.85rem;
  font-family: "Courier New", monospace;
}

.filter-group select {
  padding: 8px;
  background: #0a0a0a;
  border: 1px solid #333;
  color: #39ff14;
  font-family: "Courier New", monospace;
  cursor: pointer;
}

.filter-group select:hover {
  border-color: #39ff14;
}

.filter-group select:focus {
  outline: none;
  border-color: #39ff14;
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.npc-trading-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  background: #0a0a0a;
  transition: opacity 0.15s ease-in-out;
}

/* Trading Items Grid */
.trading-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.trading-item-card {
  background: #111;
  border: 1px solid #333;
  padding: 20px;
  transition: all 0.3s;
}

.trading-item-card:hover {
  border-color: #39ff14;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.2);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 10px;
}

.item-header h3 {
  margin: 0;
  color: #39ff14;
  font-size: 1.1rem;
}

.item-type {
  background: #222;
  color: #88cc88;
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 3px;
  font-family: "Courier New", monospace;
}

.item-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.stat-badge {
  background: #222;
  color: #39ff14;
  padding: 4px 8px;
  font-size: 0.8rem;
  border-radius: 3px;
  font-family: "Courier New", monospace;
}

.item-description {
  color: #88cc88;
  font-size: 0.9rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.item-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #333;
}

.price-amount,
.price-estimate {
  color: #ffd700;
  font-size: 1.2rem;
  font-weight: bold;
  font-family: "Courier New", monospace;
}

.buy-btn,
.sell-btn {
  padding: 10px 20px;
  background: #39ff14;
  color: #000;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
}

.buy-btn:hover {
  background: #2ecc71;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
}

.sell-btn {
  background: #ff6b00;
  color: #fff;
}

.sell-btn:hover {
  background: #ff8800;
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.5);
}

/* NPC Needs */
.npc-needs-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.npc-need-card {
  background: #111;
  border: 2px solid #333;
  padding: 20px;
  transition: all 0.3s;
}

.npc-need-card.desperate {
  border-color: #ff0033;
  background: linear-gradient(135deg, #1a0000, #000);
  box-shadow: 0 0 20px rgba(255, 0, 51, 0.3);
}

.npc-need-card.normal {
  border-color: #ffd700;
}

.need-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.need-level {
  background: #ff0033;
  color: #fff;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: bold;
  border-radius: 3px;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
}

.npc-need-card.normal .need-level {
  background: #ffd700;
  color: #000;
}

.need-priority {
  color: #88cc88;
  font-size: 0.85rem;
  font-family: "Courier New", monospace;
}

.need-description {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.need-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #333;
}

.price-bonus {
  color: #39ff14;
  font-weight: bold;
  font-family: "Courier New", monospace;
}

.matching-items {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #333;
}

.matching-items strong {
  color: #39ff14;
  display: block;
  margin-bottom: 10px;
}

.sell-need-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  background: #39ff14;
  color: #000;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  font-family: "Courier New", monospace;
  text-align: left;
}

.sell-need-btn:hover {
  background: #2ecc71;
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.empty-msg {
  text-align: center;
  color: #88cc88;
  padding: 40px;
  font-style: italic;
  font-family: "Courier New", monospace;
}
