body {
  background:
    radial-gradient(circle at top left, rgba(255, 59, 59, 0.16), transparent 35%),
    radial-gradient(circle at bottom right, rgba(88, 101, 242, 0.15), transparent 35%),
    #080810;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
}

.market-page {
  padding: 60px 7% 90px;
}

.market-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 35px;
  align-items: center;
  margin-bottom: 40px;
}

.market-tagline {
  color: #ff3b3b;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.market-hero h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1;
  margin-bottom: 18px;
}

.market-hero p {
  color: #b8b8c8;
  line-height: 1.7;
  max-width: 700px;
}

.market-stats {
  display: grid;
  gap: 16px;
}

.stat-card {
  background: rgba(17, 17, 29, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 20px;
}

.stat-card span {
  display: block;
  color: #aaaabb;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 1.6rem;
}

.market-controls {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.search-box {
  flex: 1;
}

.search-box input,
.market-controls select {
  width: 100%;
  background: #11111d;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 15px 16px;
  outline: none;
}

.search-box input:focus,
.market-controls select:focus {
  border-color: #5865f2;
}

.market-controls select {
  max-width: 220px;
  cursor: pointer;
}

.coin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.empty-market {
  color: #b8b8c8;
  background: #11111d;
  border-radius: 18px;
  padding: 25px;
  grid-column: 1 / -1;
}

.coin-card {
  background: rgba(17, 17, 29, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
  transition: 0.2s ease;
  overflow: hidden;
}

.coin-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
}

.coin-card.sold-out {
  opacity: 0.75;
}

.coin-image-wrap {
  width: 100%;
  height: 220px;
  background: transparent;
  border-radius: 20px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.coin-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: transparent;
  border: none;
  padding: 0;
}

.coin-image[src=""],
.coin-image:not([src]) {
  display: none;
}

.coin-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.coin-top h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.coin-top p {
  color: #aaaabb;
  font-size: 0.92rem;
}

.coin-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.exist-badge {
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.risk {
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: capitalize;
}

.risk.low {
  background: rgba(77, 255, 157, 0.14);
  color: #4dff9d;
}

.risk.medium {
  background: rgba(255, 209, 102, 0.14);
  color: #ffd166;
}

.risk.high {
  background: rgba(255, 59, 59, 0.15);
  color: #ff6b6b;
}

.coin-price {
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 14px;
}

.assigned-value-line {
  margin-bottom: 22px;
  color: #aaaabb;
  font-weight: 800;
}

.assigned-value-line strong {
  color: #ffd166;
}

.coin-details {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 22px;
}

.coin-details div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.coin-details div:last-child {
  border-bottom: none;
}

.coin-details span {
  color: #aaaabb;
}

.coin-details strong {
  color: #ffffff;
  text-align: right;
}

.buy-area {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
}

.buy-quantity {
  width: 100%;
  background: #080810;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px;
  outline: none;
  font-weight: 900;
}

.buy-quantity:focus {
  border-color: #5865f2;
}

.buy-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 15px 18px;
  background: #5865f2;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.buy-btn:hover {
  background: #6d78f5;
  transform: translateY(-2px);
}

.buy-btn.disabled {
  background: rgba(255, 255, 255, 0.12);
  color: #888899;
  cursor: not-allowed;
}

.buy-btn.disabled:hover {
  transform: none;
}

@media (max-width: 1050px) {
  .market-hero {
    grid-template-columns: 1fr;
  }

  .coin-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .market-page {
    padding: 40px 5% 70px;
  }

  .market-controls {
    flex-direction: column;
  }

  .market-controls select {
    max-width: 100%;
  }

  .coin-grid {
    grid-template-columns: 1fr;
  }

  .coin-top {
    flex-direction: column;
  }

  .coin-badges {
    align-items: flex-start;
  }

  .coin-price {
    font-size: 2.3rem;
  }

  .coin-image-wrap {
    height: 200px;
  }

  .buy-area {
    grid-template-columns: 1fr;
  }
}