.tags-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 38px 28px 26px;
  border: 1px solid rgba(120, 33, 27, 0.32);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(135, 34, 27, 0.16), transparent 24%),
    radial-gradient(circle at bottom left, rgba(68, 71, 78, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(7, 8, 12, 0.99), rgba(23, 25, 31, 0.97) 58%, rgba(31, 16, 18, 0.95));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.tags-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 32%),
    url("/modules/TattooTheme/assets/img/noise.png");
  opacity: 0.28;
  pointer-events: none;
}

.tags-hero h1 {
  position: relative;
  z-index: 1;
  margin: 8px 0 10px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 0.96;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #f6ede9;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

.tags-hero .muted {
  position: relative;
  z-index: 1;
  max-width: 640px;
  color: #a79c99;
}

.tags-hero .eyebrow {
  position: relative;
  z-index: 1;
  color: #d05647;
}

.tags-toolbar {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tags-sort-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  min-width: 168px;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(163, 57, 45, 0.34);
  background: linear-gradient(135deg, rgba(18, 12, 14, 0.92), rgba(33, 17, 19, 0.88));
  color: #cfb2aa;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.tags-sort-link:hover {
  transform: translateY(-1px);
  color: #f4ddd5;
  border-color: rgba(214, 92, 76, 0.48);
  box-shadow: 0 10px 24px rgba(34, 10, 10, 0.26);
}

.tags-sort-link.is-active {
  background: linear-gradient(135deg, rgba(32, 26, 31, 0.96), rgba(21, 19, 25, 0.94));
  border-color: rgba(126, 56, 52, 0.34);
  color: #f3ebe7;
  box-shadow:
    0 12px 28px rgba(8, 8, 10, 0.3),
    0 0 18px rgba(116, 29, 23, 0.12);
}

.tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.tag-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(125, 38, 31, 0.3);
  background:
    radial-gradient(circle at top left, rgba(122, 31, 25, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(8, 10, 14, 0.98), rgba(24, 26, 32, 0.96) 60%, rgba(29, 15, 17, 0.94));
  color: #f3ebe7;
  text-decoration: none;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tag-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 42%);
  pointer-events: none;
}

.tag-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(204, 78, 61, 0.52);
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.24),
    0 0 30px rgba(118, 29, 23, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.tag-chip--low {
  border-color: rgba(102, 96, 108, 0.24);
}

.tag-chip--low .tag-bullet {
  background: radial-gradient(circle at 30% 30%, #ffd2c8, #d86b58 52%, #6a2f2f);
  box-shadow:
    0 0 0 5px rgba(150, 68, 58, 0.14),
    0 0 16px rgba(171, 63, 34, 0.16);
}

.tag-chip--mid {
  border-color: rgba(181, 87, 52, 0.42);
  background:
    radial-gradient(circle at top left, rgba(145, 57, 31, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(11, 10, 14, 0.98), rgba(29, 22, 24, 0.96) 60%, rgba(39, 19, 16, 0.94));
}

.tag-chip--mid .tag-bullet {
  background: radial-gradient(circle at 30% 30%, #ffd0a7, #f08742 54%, #7a2d10);
  box-shadow:
    0 0 0 5px rgba(179, 96, 33, 0.18),
    0 0 18px rgba(240, 135, 66, 0.2);
}

.tag-chip--high {
  border-color: rgba(214, 136, 46, 0.5);
  background:
    radial-gradient(circle at top left, rgba(179, 104, 22, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(14, 11, 8, 0.98), rgba(33, 23, 15, 0.96) 60%, rgba(49, 28, 12, 0.94));
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.22),
    0 0 32px rgba(179, 104, 22, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.tag-chip--high .tag-bullet {
  background: radial-gradient(circle at 30% 30%, #ffe4a3, #f6b73c 54%, #8b4d05);
  box-shadow:
    0 0 0 5px rgba(190, 129, 32, 0.18),
    0 0 20px rgba(246, 183, 60, 0.24);
}

.tag-bullet {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffb2a2, #cb4a3a 58%, #681d16);
  box-shadow:
    0 0 0 4px rgba(158, 37, 29, 0.18),
    0 0 14px rgba(171, 43, 34, 0.2);
}

.tag-name {
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.tag-name-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tag-chip__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ba8f88;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.tag-score {
  display: inline-flex;
  gap: 5px;
}

.tag-score__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(186, 143, 136, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.tag-score__dot.is-on {
  background: radial-gradient(circle at 35% 35%, #ffc2b3, #d15a47 62%, #7d261d);
  box-shadow:
    0 0 0 3px rgba(158, 37, 29, 0.12),
    0 0 12px rgba(171, 43, 34, 0.18);
}

.tag-chip--mid .tag-score__dot.is-on {
  background: radial-gradient(circle at 35% 35%, #ffd4aa, #f08742 62%, #8a3a0d);
  box-shadow:
    0 0 0 3px rgba(179, 96, 33, 0.12),
    0 0 12px rgba(240, 135, 66, 0.2);
}

.tag-chip--high .tag-score__dot.is-on {
  background: radial-gradient(circle at 35% 35%, #ffe9b8, #f6b73c 62%, #8b4d05);
  box-shadow:
    0 0 0 3px rgba(190, 129, 32, 0.14),
    0 0 14px rgba(246, 183, 60, 0.22);
}

.tag-arrow {
  color: #ba8f88;
  font-size: 13px;
  transition: transform 0.18s ease, color 0.18s ease;
}

.tag-chip:hover .tag-arrow {
  transform: translateX(3px);
  color: #f1c8c0;
}

@media (max-width: 720px) {
  .tags-hero {
    padding: 30px 20px 22px;
    border-radius: 24px;
  }

  .tags-toolbar {
    flex-direction: column;
  }

  .tags-sort-link {
    width: 100%;
  }

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

  .tag-chip {
    min-height: 50px;
    padding: 11px 13px;
    border-radius: 16px;
  }
}
