:root {
  --bg: #08070c;
  --panel: rgba(14, 14, 22, 0.84);
  --line: rgba(255, 64, 142, 0.2);
  --text: #f8f4ff;
  --muted: #a59aac;
  --red: #ff304f;
  --violet: #9b4dff;
  --cyan: #28f5db;
  --gold: #f5c36b;
  --rose: #ff3f86;
  --ivory: #ffe2bf;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  font-family: Inter, Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 48, 79, 0.18), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(155, 77, 255, 0.16), transparent 24%),
    linear-gradient(180deg, #09070e, #05060a 58%, #08070c);
}

button,
a {
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.asset-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 14px 28px;
}

.asset-header,
.asset-panel,
.builder {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.asset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.asset-header p,
.section-title p {
  margin: 0;
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.asset-header h1,
.section-title h2 {
  margin: 4px 0 0;
  line-height: 1.05;
}

.asset-header h1 {
  font-size: clamp(24px, 7vw, 42px);
}

.asset-header a {
  display: grid;
  min-height: 40px;
  place-items: center;
  padding: 0 13px;
  border: 1px solid rgba(155, 77, 255, 0.42);
  border-radius: 8px;
  color: #d9ccff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  background: rgba(155, 77, 255, 0.12);
}

.asset-panel {
  margin-top: 12px;
  padding: 14px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.section-title h2 {
  font-size: clamp(18px, 5vw, 26px);
}

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

.asset-tile {
  display: grid;
  justify-items: center;
  min-height: 182px;
  padding: 14px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 48, 79, 0.11), transparent 48%),
    rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.asset-tile:active {
  transform: scale(0.98);
}

.asset-tile b,
.asset-tile small {
  display: block;
}

.asset-tile b {
  margin-top: 12px;
  font-size: 13px;
}

.asset-tile small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.avatar-frame {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 50%;
  isolation: isolate;
}

.avatar-frame img {
  position: relative;
  z-index: 1;
  width: 82%;
  height: 82%;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
}

.avatar-frame::before,
.avatar-frame::after {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.avatar-frame::before {
  z-index: 2;
}

.avatar-frame::after {
  z-index: 0;
}

.frame-plain::before {
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.frame-crimson::before {
  border: 2px solid rgba(255, 48, 79, 0.9);
  box-shadow:
    inset 0 0 12px rgba(255, 48, 79, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 14px rgba(255, 48, 79, 0.72),
    0 0 28px rgba(255, 48, 79, 0.28);
}

.frame-violet::before {
  border: 2px solid rgba(155, 77, 255, 0.92);
  box-shadow:
    inset 0 0 13px rgba(155, 77, 255, 0.38),
    0 0 12px rgba(155, 77, 255, 0.78),
    0 0 26px rgba(155, 77, 255, 0.32);
}

.frame-cyan::before {
  border: 2px solid rgba(40, 245, 219, 0.86);
  box-shadow:
    inset 0 0 10px rgba(40, 245, 219, 0.32),
    0 0 12px rgba(40, 245, 219, 0.74),
    0 0 24px rgba(40, 245, 219, 0.28);
}

.frame-gold::before {
  border: 2px dashed rgba(245, 195, 107, 0.9);
  box-shadow:
    inset 0 0 12px rgba(245, 195, 107, 0.24),
    0 0 14px rgba(245, 195, 107, 0.62);
}

.frame-rose::before {
  border: 2px solid rgba(255, 63, 134, 0.9);
  box-shadow:
    0 0 7px rgba(255, 63, 134, 0.95),
    0 0 20px rgba(255, 63, 134, 0.34);
}

.frame-rose::after {
  background:
    conic-gradient(from 12deg, transparent 0 18deg, rgba(255, 63, 134, 0.82) 20deg 24deg, transparent 26deg 58deg, rgba(255, 48, 79, 0.7) 60deg 64deg, transparent 66deg 100deg);
  filter: blur(0.4px);
  opacity: 0.86;
}

.frame-ivory::before {
  border: 2px solid rgba(255, 226, 191, 0.9);
  box-shadow:
    inset 0 0 10px rgba(255, 226, 191, 0.22),
    0 0 10px rgba(255, 226, 191, 0.58),
    0 0 24px rgba(245, 195, 107, 0.22);
}

.effect-blood::after {
  background:
    radial-gradient(circle at 28% 78%, rgba(255, 37, 66, 0.95), transparent 18%),
    radial-gradient(circle at 72% 22%, rgba(255, 48, 79, 0.58), transparent 26%);
  filter: blur(7px);
}

.effect-violet::after {
  background:
    radial-gradient(circle at 72% 36%, rgba(155, 77, 255, 0.9), transparent 22%),
    radial-gradient(circle at 45% 58%, rgba(215, 58, 255, 0.5), transparent 34%);
  filter: blur(8px);
}

.effect-sparks::after {
  background:
    radial-gradient(circle at 18% 72%, rgba(255, 74, 57, 0.95) 0 4%, transparent 7%),
    radial-gradient(circle at 68% 23%, rgba(255, 48, 79, 0.9) 0 3%, transparent 6%),
    radial-gradient(circle at 82% 70%, rgba(245, 195, 107, 0.82) 0 3%, transparent 7%),
    radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.55) 0 2%, transparent 4%);
  filter: blur(1px);
}

.effect-ice::after {
  background:
    radial-gradient(circle at 50% 50%, transparent 42%, rgba(160, 230, 255, 0.62) 56%, transparent 70%),
    radial-gradient(circle at 30% 72%, rgba(94, 210, 255, 0.44), transparent 22%);
  filter: blur(4px);
}

.effect-blue::after {
  background:
    radial-gradient(circle at 50% 50%, transparent 35%, rgba(20, 149, 255, 0.72) 52%, transparent 68%),
    radial-gradient(circle at 70% 75%, rgba(40, 245, 219, 0.36), transparent 22%);
  filter: blur(5px);
}

.effect-ember::after {
  background:
    radial-gradient(circle at 50% 82%, rgba(255, 65, 40, 0.86), transparent 24%),
    radial-gradient(circle at 76% 28%, rgba(255, 139, 58, 0.58), transparent 20%),
    radial-gradient(circle at 22% 22%, rgba(255, 48, 79, 0.46), transparent 18%);
  filter: blur(6px);
}

.effect-moon::after {
  background:
    radial-gradient(circle at 50% 50%, transparent 40%, rgba(255, 58, 73, 0.82) 43%, rgba(255, 58, 73, 0.2) 54%, transparent 68%);
  filter: blur(2px);
}

.effect-rain::after {
  background:
    linear-gradient(110deg, transparent 0 34%, rgba(81, 190, 255, 0.42) 35% 37%, transparent 39% 64%, rgba(255, 48, 79, 0.35) 65% 67%, transparent 69%),
    radial-gradient(circle at 65% 72%, rgba(40, 245, 219, 0.38), transparent 22%);
  filter: blur(1.5px);
}

.effect-heart::after {
  background:
    radial-gradient(circle at 34% 38%, rgba(255, 63, 134, 0.68), transparent 18%),
    radial-gradient(circle at 64% 38%, rgba(255, 63, 134, 0.68), transparent 18%),
    radial-gradient(circle at 50% 62%, rgba(255, 48, 79, 0.62), transparent 20%);
  filter: blur(6px);
}

.builder {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.builder-preview {
  display: grid;
  min-height: 148px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.builder-preview .avatar-frame {
  width: 124px;
  height: 124px;
}

.builder-info span {
  display: block;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.builder-info p {
  max-width: 360px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 560px) {
  .asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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