/**
 * High-Velocity Economy UI Styles
 * Styles for credit purchase, item minting, and marketplace
 */

/* Credit Purchase Modal - BLACK MARKET (Premium Layer) */
.credit-purchase-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: "Courier New", monospace;
}

.credit-purchase-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
}

.credit-purchase-container {
  position: relative;
  background: #0a0a0a;
  border: 3px solid #ffd700;
  box-shadow:
    0 0 40px rgba(255, 215, 0, 0.6),
    inset 0 0 20px rgba(255, 215, 0, 0.1);
  max-width: 1000px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 10001;
  animation: blackMarketPulse 2s ease-in-out infinite;
}

@keyframes blackMarketPulse {
  0%,
  100% {
    box-shadow:
      0 0 40px rgba(255, 215, 0, 0.6),
      inset 0 0 20px rgba(255, 215, 0, 0.1);
  }
  50% {
    box-shadow:
      0 0 60px rgba(255, 215, 0, 0.8),
      inset 0 0 30px rgba(255, 215, 0, 0.2);
  }
}

.credit-purchase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #ffd700;
  background: linear-gradient(
    90deg,
    rgba(255, 215, 0, 0.1) 0%,
    transparent 100%
  );
}

.credit-purchase-header h2 {
  margin: 0;
  color: #ffd700;
  font-family: "Courier New", monospace;
  font-size: 1.5rem;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  letter-spacing: 2px;
}

.close-btn {
  background: transparent;
  border: 1px solid #39ff14;
  color: #39ff14;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s;
}

.close-btn:hover {
  background: #39ff14;
  color: #000;
}

.bundles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  padding: 30px;
}

.bundle-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  border: 2px solid #333;
  padding: 25px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.bundle-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.1) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

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

.bundle-card:hover {
  border-color: #ffd700;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
  transform: translateY(-8px) scale(1.02);
}

.bundle-card.best-value {
  border-color: #ffd700;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
  background: linear-gradient(135deg, #2a1a00 0%, #0a0a0a 100%);
}

.bundle-card.best-value::after {
  content: "BEST VALUE";
  position: absolute;
  top: 10px;
  right: -30px;
  background: #ffd700;
  color: #000;
  padding: 5px 40px;
  font-size: 0.7rem;
  font-weight: bold;
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  animation: ribbonFlash 1.5s ease-in-out infinite;
}

@keyframes ribbonFlash {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.bundle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.bundle-header h3 {
  margin: 0;
  color: #ffd700;
  font-size: 1.3rem;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  letter-spacing: 1px;
}

.bonus-badge {
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
  color: #000;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.bundle-icon {
  font-size: 3rem;
  margin: 15px 0;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

.bundle-price {
  font-size: 2.5rem;
  color: #ffd700;
  font-weight: bold;
  margin: 20px 0;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
  font-family: "Courier New", monospace;
}

.bundle-credits {
  margin: 20px 0;
  padding: 15px;
  background: rgba(255, 215, 0, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 4px;
}

.credits-amount {
  font-size: 1.8rem;
  color: #ffd700;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  font-family: "Courier New", monospace;
}

.credits-label {
  font-size: 0.9rem;
  color: #888;
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bonus-credits {
  font-size: 0.95rem;
  color: #ffa500;
  margin-top: 8px;
  font-weight: bold;
}

.select-bundle-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
  color: #000;
  border: 2px solid #ffd700;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: "Courier New", monospace;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.select-bundle-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.select-bundle-btn:hover::before {
  width: 300px;
  height: 300px;
}

.select-bundle-btn:hover {
  background: linear-gradient(135deg, #ffa500 0%, #ffd700 100%);
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.7);
}

.select-bundle-btn:active {
  transform: scale(0.98);
}

.payment-section {
  padding: 20px;
}

.payment-section h3 {
  color: #39ff14;
  margin-bottom: 20px;
}

#payment-element {
  margin: 20px 0;
  padding: 20px;
  background: #111;
  border: 1px solid #333;
}

.purchase-btn {
  width: 100%;
  padding: 15px;
  background: #39ff14;
  color: #000;
  border: none;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.purchase-btn:hover:not(:disabled) {
  background: #2ecc71;
}

.purchase-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Item Minting Modal */
.item-minting-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.minting-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.minting-container {
  position: relative;
  background: #0a0a0a;
  border: 2px solid #39ff14;
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.5);
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 10001;
}

.minting-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #39ff14;
}

.minting-header h2 {
  margin: 0;
  color: #39ff14;
  font-family: "Courier New", monospace;
}

.minting-form {
  padding: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #88cc88;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  background: #111;
  border: 1px solid #333;
  color: #39ff14;
  font-family: "Courier New", monospace;
}

.stats-section {
  margin: 30px 0;
  padding: 20px;
  background: #111;
  border: 1px solid #333;
}

.stats-section h3 {
  color: #39ff14;
  margin-bottom: 20px;
}

.stat-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.stat-control {
  text-align: center;
}

.stat-control label {
  display: block;
  color: #88cc88;
  margin-bottom: 10px;
  font-weight: bold;
}

.stat-control input[type="number"] {
  width: 80px;
  text-align: center;
  margin-bottom: 10px;
}

.stat-slider {
  margin-top: 10px;
}

.stat-slider input[type="range"] {
  width: 100%;
}

.stat-summary {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #333;
  color: #88cc88;
}

.minting-cost {
  margin: 30px 0;
  padding: 25px;
  background: linear-gradient(135deg, #1a0a00 0%, #0a0a0a 100%);
  border: 3px solid #ff0033;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.minting-cost::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 0, 51, 0.2),
    transparent
  );
  animation: costShimmer 2s infinite;
}

@keyframes costShimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.minting-cost h3 {
  color: #ff0033;
  margin-bottom: 15px;
  text-shadow: 0 0 10px rgba(255, 0, 51, 0.8);
  font-family: "Courier New", monospace;
  letter-spacing: 2px;
}

.cost-display {
  font-size: 2.5rem;
  color: #ff0033;
  font-weight: bold;
  margin: 20px 0;
  text-shadow: 0 0 15px rgba(255, 0, 51, 0.9);
  font-family: "Courier New", monospace;
  animation: costPulse 1s ease-in-out infinite;
}

@keyframes costPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.cost-breakdown {
  font-size: 0.9rem;
  color: #88cc88;
}

.minting-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.mint-btn,
.cancel-btn {
  flex: 1;
  padding: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.mint-btn {
  background: linear-gradient(135deg, #ff0033 0%, #cc0022 100%);
  color: #fff;
  border: 3px solid #ff0033;
  font-weight: bold;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-family: "Courier New", monospace;
  box-shadow: 0 0 20px rgba(255, 0, 51, 0.6);
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.mint-btn::before {
  content: "HOLD TO MINT";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #cc0022 0%, #ff0033 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.mint-btn.holding::before {
  opacity: 1;
}

.mint-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff0033 0%, #ff0044 100%);
  box-shadow: 0 0 30px rgba(255, 0, 51, 0.9);
  transform: scale(1.02);
}

.mint-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.mint-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #333;
  border-color: #555;
  box-shadow: none;
}

.mint-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: #fff;
  transition: width 0.1s linear;
  z-index: 1;
}

.cancel-btn {
  background: transparent;
  color: #ff0033;
  border: 2px solid #ff0033;
}

.cancel-btn:hover {
  background: #ff0033;
  color: #000;
}

/* Marketplace */
.marketplace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #39ff14;
  margin-bottom: 20px;
}

.marketplace-tabs {
  display: flex;
  gap: 10px;
  padding: 0 20px;
  margin-bottom: 20px;
  border-bottom: 2px solid #333;
}

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

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

.marketplace-tab.active {
  color: #39ff14;
  border-bottom-color: #39ff14;
}

.marketplace-header h2 {
  margin: 0;
  color: #39ff14;
  font-family: "Courier New", monospace;
}

.mint-item-btn {
  padding: 10px 20px;
  background: #39ff14;
  color: #000;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.mint-item-btn:hover {
  background: #2ecc71;
}

.marketplace-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  padding: 20px;
  background: #111;
  border: 1px solid #333;
  margin-bottom: 20px;
}

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

.filter-group label {
  color: #88cc88;
  font-size: 0.9rem;
}

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

.filter-group input[type="number"] {
  width: 100px;
}

.marketplace-listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

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

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

.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;
}

.signed-badge {
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
  color: #000;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: "Courier New", monospace;
}

.item-serial {
  color: #88cc88;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.item-type {
  color: #ffcc00;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.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;
}

.item-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-top: 15px;
  border-top: 1px solid #333;
  color: #88cc88;
  font-size: 0.9rem;
  font-family: "Courier New", monospace;
}

.item-rap {
  color: #ffd700;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.item-rap-graph {
  display: inline-block;
  width: 60px;
  height: 20px;
  background: linear-gradient(90deg, #39ff14 0%, #ffd700 50%, #ff0033 100%);
  margin-left: 8px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.item-rap-graph::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--rap-percent, 50%);
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  animation: rapGraphPulse 2s ease-in-out infinite;
}

@keyframes rapGraphPulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

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

.price-amount {
  font-size: 1.5rem;
  color: #ffd700;
  font-weight: bold;
}

.purchase-btn {
  padding: 10px 20px;
  background: #39ff14;
  color: #000;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.purchase-btn:hover {
  background: #2ecc71;
}

.empty-msg {
  text-align: center;
  color: #88cc88;
  padding: 40px;
  font-style: italic;
}

/* Marketplace Tabs */
.marketplace-tabs {
  display: flex;
  gap: 10px;
  padding: 0 20px;
  margin-bottom: 20px;
  border-bottom: 2px solid #333;
}

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

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

.marketplace-tab.active {
  color: #39ff14;
  border-bottom-color: #39ff14;
}

/* Sell/Unlist Buttons */
.sell-btn,
.unlist-btn {
  width: 100%;
  padding: 10px;
  background: #ff6b00;
  color: #fff;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
}

.sell-btn:hover {
  background: #ff8800;
}

.unlist-btn {
  background: #cc0000;
}

.unlist-btn:hover {
  background: #ff0000;
}

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

/* Transactions */
.marketplace-transactions {
  padding: 20px;
}

.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

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

.transaction-item.purchase {
  border-left: 3px solid #ff6b00;
}

.transaction-item.sale {
  border-left: 3px solid #39ff14;
}

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

.transaction-type {
  color: #39ff14;
  font-weight: bold;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
}

.transaction-date {
  color: #888;
  font-size: 0.85rem;
}

.transaction-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.transaction-item-name {
  color: #fff;
  font-weight: bold;
}

.transaction-amount {
  font-size: 1.2rem;
  font-weight: bold;
  font-family: "Courier New", monospace;
}

.transaction-amount.negative {
  color: #ff6b00;
}

.transaction-amount.positive {
  color: #39ff14;
}

.transaction-serial {
  color: #88cc88;
  font-size: 0.8rem;
  margin-top: 5px;
}

.transaction-meta {
  color: #888;
  font-size: 0.75rem;
  margin-top: 5px;
  font-family: "Courier New", monospace;
}

.transaction-item.royalty {
  border-left: 3px solid #ffd700;
}
