html,body,button,a{touch-action:manipulation;-webkit-text-size-adjust:100%}
* {
  box-sizing: border-box;
}

:root {
  --bg: #080d0b;
  --panel: #151c19;
  --panel-2: #202924;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f8f5;
  --muted: rgba(244, 248, 245, 0.62);
  --muted-2: rgba(244, 248, 245, 0.45);
  --green: #54d957;
  --button: #242e2a;
  --button-line: #36413d;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(84, 217, 87, 0.10), transparent 34%),
    radial-gradient(circle at bottom right, rgba(84, 217, 87, 0.05), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

body {
  overflow-x: hidden;
}

a {
  color: inherit;
}

.app {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 42px 24px 72px;
}

.header {
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--green);
  font-size: 14px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.header h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.92;
  letter-spacing: -0.07em;
  font-weight: 950;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 0 0 16px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar,
.subtabs::-webkit-scrollbar {
  display: none;
}

.category-tabs a {
  position: relative;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--muted);
  font-size: clamp(18px, 2.3vw, 28px);
  font-weight: 850;
  padding: 8px 14px 12px;
  border-radius: 999px;
}

.category-tabs a.active {
  color: #fff;
}

.category-tabs a.active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -17px;
  height: 2px;
  border-radius: 999px;
  background: var(--green);
}

.subtabs {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  margin-bottom: 34px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.subtabs button {
  flex: 0 0 auto;
  border: 0;
  outline: 0;
  cursor: pointer;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
  padding: 16px 23px;
  border-radius: 999px;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 850;
}

.subtabs button.active {
  color: #061008;
  background: var(--green);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.market-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 152px;
  grid-template-areas:
    "copy image"
    "actions actions";
  gap: 22px 18px;
  min-height: 340px;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(29, 38, 34, 0.92), rgba(21, 28, 25, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 26px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.market-card:hover {
  transform: translateY(-2px);
  border-color: rgba(84, 217, 87, 0.22);
  background: linear-gradient(180deg, rgba(34, 45, 40, 0.94), rgba(21, 28, 25, 0.98));
}

.market-copy {
  grid-area: copy;
  min-width: 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.volume {
  color: #fff;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.market-card h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(21px, 2.05vw, 28px);
  line-height: 1.17;
  letter-spacing: -0.047em;
  font-weight: 720;
}

.market-image {
  grid-area: image;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  background: var(--panel-2);
  align-self: start;
}

.actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-self: end;
}

.actions button {
  min-height: 72px;
  border: 1.5px solid var(--button-line);
  border-radius: 16px;
  background: var(--button);
  color: #fff;
  font-family: inherit;
  font-size: 23px;
  font-weight: 880;
  letter-spacing: -0.03em;
  cursor: pointer;
}

.actions span {
  color: var(--muted-2);
  margin-right: 6px;
}

.actions strong {
  font-weight: 950;
}

@media (max-width: 980px) {
  .app {
    max-width: 760px;
  }

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

  .market-card {
    grid-template-columns: minmax(0, 1fr) 164px;
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .app {
    padding: 28px 16px 48px;
  }

  .header {
    margin-bottom: 24px;
  }

  .category-tabs {
    gap: 4px;
    margin-left: -4px;
    margin-right: -16px;
    padding-right: 16px;
  }

  .category-tabs a {
    font-size: 20px;
    padding-inline: 10px;
  }

  .category-tabs a.active::after {
    left: 10px;
    right: 10px;
  }

  .subtabs {
    margin-right: -16px;
    padding-right: 16px;
    margin-bottom: 24px;
  }

  .subtabs button {
    padding: 14px 20px;
    font-size: 18px;
  }

  .market-grid {
    gap: 14px;
  }

  .market-card {
    grid-template-columns: minmax(0, 1fr) 116px;
    gap: 18px 14px;
    min-height: auto;
    border-radius: 22px;
    padding: 18px;
  }

  .meta {
    gap: 9px;
    margin-bottom: 13px;
  }

  .date-pill {
    min-height: 33px;
    padding: 0 12px;
    font-size: 15px;
  }

  .volume {
    font-size: 15px;
  }

  .market-card h2 {
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: -0.04em;
  }

  .market-image {
    border-radius: 14px;
  }

  .actions {
    gap: 10px;
  }

  .actions button {
    min-height: 58px;
    border-radius: 14px;
    font-size: 19px;
  }
}

@media (max-width: 420px) {
  .market-card {
    grid-template-columns: minmax(0, 1fr) 94px;
    padding: 16px;
  }

  .market-card h2 {
    font-size: 17px;
  }

  .actions button {
    font-size: 17px;
  }
}
