@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700;800&family=Rajdhani:wght@400;500;600;700&display=swap");

body.tools-page {
  --tools-accent: #7c3aed;
  --tools-accent-2: #22d3ee;
  --tools-text-soft: #cbd5f4;
  --tools-card: rgba(13, 18, 40, 0.5);
  --tools-card-strong: rgba(13, 18, 40, 0.72);
  --tools-line: rgba(170, 186, 255, 0.24);
  --tools-shadow: 0 30px 70px rgba(2, 8, 24, 0.62);
  font-family: "Rajdhani", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

body.tools-page::before {
  background:
    radial-gradient(1100px 900px at 8% -10%, rgba(124, 58, 237, 0.3), transparent 60%),
    radial-gradient(900px 700px at 96% 8%, rgba(34, 211, 238, 0.2), transparent 62%),
    linear-gradient(180deg, rgba(2, 6, 18, 0.7), rgba(2, 6, 18, 0.92));
}

body.tools-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(140, 164, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 164, 255, 0.35) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 36%, transparent 100%);
}

.tools-page .pageMediaFixed {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 0 !important;
  opacity: 1 !important;
  pointer-events: none !important;
  background-size: cover !important;
  background-position: center !important;
  filter: blur(3px) saturate(1.15) brightness(0.56);
  transform: scale(1.03);
}

.tools-page .pageOverlayFixed {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: block !important;
  background:
    radial-gradient(1100px 650px at 10% 0%, rgba(124, 58, 237, 0.22), transparent 58%),
    radial-gradient(1000px 760px at 88% 10%, rgba(34, 211, 238, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(3, 6, 18, 0.56), rgba(3, 6, 18, 0.84));
}

.tools-page .page,
.tools-page main {
  position: relative;
  z-index: 2;
}

.tools-page .page {
  width: min(1380px, calc(100% - 32px));
}

.tools-showcase {
  position: relative;
  padding: 24px 0 14px;
}

.tools-showcase::before,
.tools-showcase::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
}

.tools-showcase::before {
  width: 300px;
  height: 300px;
  left: -90px;
  top: -36px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.42), transparent 70%);
}

.tools-showcase::after {
  width: 260px;
  height: 260px;
  right: -40px;
  top: 24px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.3), transparent 72%);
}

.tools-showcase__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.tools-showcase__intro {
  max-width: 860px;
}

.tools-showcase__title {
  margin: 0;
  font-family: "Orbitron", "Rajdhani", ui-sans-serif, sans-serif;
  font-size: clamp(34px, 5.2vw, 62px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f8f7ff;
  text-shadow:
    0 0 18px rgba(124, 58, 237, 0.34),
    0 0 36px rgba(34, 211, 238, 0.22);
}

.tools-showcase__lead {
  margin: 12px 0 0;
  max-width: 78ch;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  color: var(--tools-text-soft);
}

.tools-showcase__admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tools-showcase__admin-actions .btn,
.tools-page .modal__foot .btn,
.tools-page .modal__head .iconbtn {
  appearance: none;
  border: 1px solid var(--tools-line);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  color: #eff6ff;
  font-family: "Rajdhani", ui-sans-serif, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow:
    0 8px 24px rgba(8, 14, 36, 0.45),
    0 0 0 1px rgba(124, 58, 237, 0.16) inset;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tools-showcase__admin-actions .btn:hover,
.tools-page .modal__foot .btn:hover,
.tools-page .modal__head .iconbtn:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow:
    0 14px 30px rgba(4, 12, 30, 0.56),
    0 0 20px rgba(124, 58, 237, 0.35);
}

.tools-showcase__admin-actions .btn:not(.btn--ghost),
.tools-page .modal__foot .btn:not(.btn--ghost) {
  border-color: rgba(124, 58, 237, 0.7);
  background: linear-gradient(130deg, rgba(124, 58, 237, 0.96), rgba(34, 211, 238, 0.86));
  color: #f7fbff;
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.36);
}

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

.tools-sectionTitle {
  grid-column: 1 / -1;
  margin: 4px 0 -2px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(170, 186, 255, 0.24);
  background: rgba(8, 12, 28, 0.5);
  color: #eff6ff;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tools-sectionTitle--premium {
  border-color: rgba(250, 204, 21, 0.34);
  background: linear-gradient(130deg, rgba(120, 92, 12, 0.26), rgba(8, 12, 28, 0.48));
  color: #fff4cf;
}

.tool-card {
  --tool-accent-rgb: 124 58 237;
  --tool-accent2-rgb: 34 211 238;
  --tool-border-rgb: 170 186 255;
  --tool-title-rgb: 246 251 255;
  --tool-desc-rgb: 213 222 248;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgb(var(--tool-border-rgb) / 0.24);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(14px);
  box-shadow: var(--tools-shadow);
  isolation: isolate;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.tool-card::before,
.tool-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.tool-card::before {
  inset: -1px;
  border-radius: inherit;
  border: 1px solid transparent;
  background:
    linear-gradient(130deg, rgb(var(--tool-accent-rgb) / 0.66), rgb(var(--tool-accent2-rgb) / 0.62)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
}

.tool-card::after {
  width: 220px;
  height: 220px;
  top: -100px;
  right: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--tool-accent-rgb) / 0.5), transparent 74%);
  opacity: 0.2;
}

.tool-card:hover {
  transform: translateY(-8px) scale(1.016);
  border-color: rgb(var(--tool-border-rgb) / 0.68);
  box-shadow:
    0 35px 72px rgba(1, 8, 25, 0.72),
    0 0 0 1px rgb(var(--tool-accent2-rgb) / 0.28) inset;
}

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

.tool-card:hover::after {
  opacity: 0.34;
}

.tool-card__link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.tool-card__link:focus-visible {
  outline: 2px solid rgb(var(--tool-accent2-rgb) / 0.9);
  outline-offset: -2px;
}

.tool-card__thumb {
  position: relative;
  height: 188px;
  background-size: cover;
  background-position: center;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.tool-card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 8, 20, 0.08), rgba(4, 8, 20, 0.64)),
    radial-gradient(400px 260px at 70% 0%, rgb(var(--tool-accent2-rgb) / 0.22), transparent 58%);
}

.tool-card:hover .tool-card__thumb {
  transform: scale(1.08);
  filter: saturate(1.14);
}

.tool-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 18px;
  flex: 1;
  background: linear-gradient(180deg, rgba(8, 12, 28, 0.14), rgba(8, 12, 28, 0.58));
}

.tool-card__metaRow {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.tool-card__tierBadge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(170, 186, 255, 0.44);
  background: rgba(6, 10, 22, 0.48);
  color: #dce9ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tool-card__tierBadge--premium {
  border-color: rgba(250, 204, 21, 0.56);
  background: rgba(161, 98, 7, 0.3);
  color: #fff3bf;
}

.tool-card__title {
  margin: 0;
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.04;
  font-family: "Orbitron", "Rajdhani", ui-sans-serif, sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgb(var(--tool-title-rgb) / 1);
}

.tool-card__desc {
  margin: 0;
  color: rgb(var(--tool-desc-rgb) / 1);
  font-size: 18px;
  line-height: 1.4;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card__cta {
  margin-top: auto;
  width: fit-content;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid rgb(var(--tool-accent2-rgb) / 0.64);
  background: linear-gradient(130deg, rgb(var(--tool-accent-rgb) / 0.24), rgb(var(--tool-accent2-rgb) / 0.18));
  color: #e8f7ff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 8px 14px;
  box-shadow: 0 0 0 1px rgb(var(--tool-accent2-rgb) / 0.18) inset;
}

.tool-card__cta span:last-child {
  transition: transform 0.2s ease;
}

.tool-card:hover .tool-card__cta span:last-child {
  transform: translateX(2px);
}

.tool-card__games {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.tool-game-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgb(var(--tool-border-rgb) / 0.5);
  background: rgb(var(--tool-accent2-rgb) / 0.14);
  color: #eef6ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
}

.tool-game-chip--ase {
  background: rgba(87, 209, 140, 0.1);
  border-color: rgba(87, 209, 140, 0.35);
  color: #d8ffe8;
}

.tool-game-chip--asa {
  background: rgba(107, 214, 255, 0.1);
  border-color: rgba(107, 214, 255, 0.35);
  color: #dff5ff;
}

.tool-game-chip--ark2 {
  background: rgba(255, 59, 59, 0.1);
  border-color: rgba(255, 59, 59, 0.45);
  color: #ffd9d9;
}

.tools-page.is-admin .tool-card {
  cursor: default;
}

.tools-page.is-admin .tool-card:active {
  cursor: default;
}

.tool-card__edit {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  border: 1px solid rgba(214, 224, 255, 0.44);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  color: #eff8ff;
  background: rgba(4, 8, 18, 0.78);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.34);
  cursor: pointer;
}

.tool-card__tierToggle {
  position: absolute;
  top: 48px;
  right: 10px;
  z-index: 3;
  border: 1px solid rgba(170, 186, 255, 0.4);
  border-radius: 999px;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #dce9ff;
  background: rgba(4, 8, 18, 0.78);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.tool-card__tierToggle.is-premium {
  border-color: rgba(250, 204, 21, 0.56);
  color: #fff3bf;
  background: rgba(161, 98, 7, 0.36);
}

.tool-card__tierToggle:hover {
  border-color: rgba(198, 218, 245, 0.6);
  transform: translateY(-1px);
}

.tool-card__drag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  border-radius: 10px;
  border: 1px solid rgba(170, 186, 255, 0.36);
  padding: 6px 9px;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #dbe9ff;
  background: rgba(4, 8, 18, 0.74);
  backdrop-filter: blur(6px);
  cursor: grab;
  user-select: none;
}
.tool-card__drag:active { cursor: grabbing; }

.tool-card.is-dragging {
  opacity: 0.58;
  transform: scale(0.98);
}

.tool-card.is-locked {
  border-color: rgba(250, 204, 21, 0.78);
  filter: saturate(1.04) brightness(1.02) contrast(1.02);
  box-shadow:
    0 18px 34px rgba(2, 8, 24, 0.54),
    0 0 0 1px rgba(250, 204, 21, 0.24) inset,
    0 0 22px rgba(250, 204, 21, 0.2);
}

.tool-card.is-locked:hover {
  transform: translateY(-4px) scale(1.008);
  border-color: rgba(250, 204, 21, 0.84);
  box-shadow:
    0 24px 40px rgba(2, 8, 24, 0.6),
    0 0 0 1px rgba(250, 204, 21, 0.32) inset,
    0 0 28px rgba(250, 204, 21, 0.32);
}

.tool-card__lockedOverlay,
.premium-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
  transition: background 0.2s ease;
}

.tool-card__lockedOverlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(380px 220px at 80% 16%, rgba(250, 204, 21, 0.16), transparent 72%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.12));
  pointer-events: none;
  opacity: 1;
}

.tool-card.is-locked .tool-card__thumb::after {
  background:
    linear-gradient(180deg, rgba(4, 8, 20, 0.01), rgba(4, 8, 20, 0.11)),
    radial-gradient(400px 260px at 70% 0%, rgb(var(--tool-accent2-rgb) / 0.2), transparent 58%);
}

.premium-locked-card:hover .tool-card__thumb {
  filter: brightness(1.08) saturate(1.08);
}

.premium-lock {
  position: relative;
  z-index: 5;
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
  margin: -24px auto 8px;
  width: fit-content;
  pointer-events: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.premium-lock__iconWrap {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 239, 176, 0.8);
  background: linear-gradient(160deg, rgba(14, 20, 40, 0.9), rgba(8, 12, 28, 0.84));
  color: #ffe08a;
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.22) inset,
    0 0 8px rgba(255, 200, 50, 0.25);
  animation: premiumGlowPulse 3s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.premium-lock__icon {
  width: 28px;
  height: 28px;
  display: block;
}

.premium-lock__label {
  color: #fff3c6;
  opacity: 0.85;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.28);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tool-card__lockedRibbon {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 14px;
  right: -46px;
  width: 170px;
  height: 34px;
  transform: rotate(32deg);
  border: 1px solid rgba(255, 236, 173, 0.86);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.98), rgba(245, 158, 11, 0.92));
  color: #2d1a03;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow:
    0 0 0 1px rgba(255, 249, 215, 0.72) inset,
    0 0 18px rgba(250, 204, 21, 0.6),
    0 8px 16px rgba(0, 0, 0, 0.4);
}

@keyframes premiumGlowPulse {
  0% {
    transform: scale(1);
    box-shadow:
      0 0 0 1px rgba(250, 204, 21, 0.22) inset,
      0 0 8px rgba(255, 200, 50, 0.25);
  }
  50% {
    transform: scale(1.06);
    box-shadow:
      0 0 0 1px rgba(250, 204, 21, 0.3) inset,
      0 0 18px rgba(255, 200, 50, 0.55);
  }
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 1px rgba(250, 204, 21, 0.22) inset,
      0 0 8px rgba(255, 200, 50, 0.25);
  }
}

.premium-locked-card:hover .tool-card__lockedOverlay {
  background: rgba(0, 0, 0, 0.44);
}

.premium-locked-card:hover .premium-lock {
  transform: scale(1.1);
  filter: brightness(1.06);
}

.premium-locked-card:hover .premium-lock__iconWrap {
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.3) inset,
    0 0 24px rgba(250, 204, 21, 0.64);
  filter: brightness(1.06);
}

.premium-locked-card:hover .premium-lock__label {
  opacity: 0.92;
  transform: translateY(1px);
}

.premium-ctaWrap {
  margin-top: auto;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.tool-card__cta--locked {
  border-color: rgba(250, 204, 21, 0.7);
  background: linear-gradient(130deg, rgba(92, 65, 7, 0.42), rgba(250, 204, 21, 0.2));
  color: #fff4cf;
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.22) inset,
    0 0 12px rgba(250, 204, 21, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.tool-card__cta--locked span:last-child {
  transform: none !important;
}

.premium-locked-card:hover .premium-cta {
  transform: translateY(-1px) scale(1.04);
  filter: brightness(1.05);
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.28) inset,
    0 0 18px rgba(250, 204, 21, 0.42);
}

.premium-cta__hint {
  color: rgba(239, 246, 255, 0.7);
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .premium-lock__iconWrap {
    animation: none;
  }
  .premium-locked-card,
  .premium-locked-card:hover,
  .premium-lock,
  .premium-lock__iconWrap,
  .premium-lock__label,
  .premium-cta,
  .premium-locked-card:hover .premium-cta,
  .premium-locked-card:hover .premium-lock {
    transition: none;
    transform: none;
  }
}

@media (max-width: 640px) {
  .premium-lock {
    margin-top: -18px;
  }
  .premium-lock__iconWrap {
    width: 50px;
    height: 50px;
  }
  .premium-lock__icon {
    width: 24px;
    height: 24px;
  }
  .premium-lock__label {
    font-size: 11px;
  }
}

.tools-page .modal__panel {
  width: min(760px, calc(100% - 24px));
  background: linear-gradient(160deg, rgba(18, 24, 52, 0.92), rgba(10, 14, 34, 0.9));
  border: 1px solid rgba(170, 186, 255, 0.22);
  box-shadow: 0 34px 74px rgba(2, 8, 20, 0.76);
  backdrop-filter: blur(12px);
}

.tools-page .modal__head {
  border-bottom: 1px solid rgba(170, 186, 255, 0.18);
}

.tools-page .modal__head h3 {
  margin: 0;
  font-size: 20px;
  font-family: "Orbitron", "Rajdhani", ui-sans-serif, sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tools-page .modal__body {
  display: grid;
  gap: 12px;
}

.tools-page #toolModal[aria-hidden="false"] {
  display: grid !important;
  place-items: center;
  padding: 0.75rem;
}

.tools-page #toolModal .tool-editor {
  width: min(92vw, 72rem);
  max-width: none;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
}

.tools-page #toolModal .tool-editor__head {
  flex: 0 0 auto;
}

.tools-page #toolModal .tool-editor__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: block;
  padding: clamp(0.75rem, 1.1vw, 1rem);
}

.tools-page #toolModal .tool-editor__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 21rem);
  gap: clamp(0.7rem, 1.1vw, 0.95rem);
  align-items: start;
}

.tools-page #toolModal .tool-editor__form,
.tools-page #toolModal .tool-editor__preview {
  min-width: 0;
}

.tools-page #toolModal .tool-editor__preview {
  display: block;
}

.tools-page #toolModal .tool-editor__foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.tools-page #toolModal .tool-editor-section {
  margin: 0 0 1rem;
  padding: 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(170, 186, 255, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.tools-page #toolModal .tool-editor-section:last-of-type {
  margin-bottom: 0;
}

.tools-page #toolModal .tool-editor-section__title {
  margin: 0 0 0.55rem;
  font-size: 13px;
  font-weight: 800;
  color: #dfe8ff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tools-page #toolModal .tool-editor-field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.tools-page #toolModal .tool-editor-field:last-child {
  margin-bottom: 0;
}

.tools-page #toolModal .tool-editor-field span {
  font-size: 13px;
  font-weight: 700;
  color: #d9e2ff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tools-page #toolModal .tool-editor-field input,
.tools-page #toolModal .tool-editor-field textarea {
  min-width: 0;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(170, 186, 255, 0.24);
  background: var(--tools-card-strong);
  color: #eef6ff;
  font-size: 15px;
  font-family: "Rajdhani", ui-sans-serif, sans-serif;
  padding: 9px 11px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tools-page #toolModal .tool-editor-field textarea {
  resize: vertical;
  min-height: 96px;
}

.tools-page #toolModal .tool-editor-field input[type="file"] {
  height: auto;
  min-height: 44px;
  line-height: 1.25;
}

.tools-page #toolModal .tool-editor-field input:focus,
.tools-page #toolModal .tool-editor-field textarea:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

.tools-page #toolModal .tool-editor-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tools-page #toolModal .tool-editor-field--compact span {
  min-height: 30px;
  display: flex;
  align-items: flex-end;
}

.tools-page #toolModal .tool-editor-field--compact input[type="color"] {
  height: 44px;
  padding: 6px;
  cursor: pointer;
}

.tools-page #toolModal .tool-editor-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.tools-page #toolModal .tool-editor-games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.tools-page #toolModal .tool-editor-game {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 9px;
  border-radius: 10px;
  border: 1px solid rgba(170, 186, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: #ecf4ff;
  font-size: 12px;
  font-weight: 700;
}

.tools-page #toolModal .tool-editor-game input[type="checkbox"] {
  margin: 0;
  accent-color: #22d3ee;
}

.tools-page #toolModal .tool-editor-preview {
  --tool-accent-rgb: 124 58 237;
  --tool-accent2-rgb: 34 211 238;
  --tool-border-rgb: 170 186 255;
  --tool-title-rgb: 246 251 255;
  --tool-desc-rgb: 213 222 248;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgb(var(--tool-border-rgb) / 0.55);
  background:
    linear-gradient(180deg, rgba(6, 10, 24, 0.42), rgba(6, 10, 24, 0.86)),
    radial-gradient(440px 260px at 84% 4%, rgb(var(--tool-accent2-rgb) / 0.25), transparent 62%),
    radial-gradient(380px 240px at 10% 0%, rgb(var(--tool-accent-rgb) / 0.20), transparent 64%);
  box-shadow: 0 24px 56px rgba(2, 8, 20, 0.62);
}

.tools-page #toolModal .tool-editor-preview__media {
  height: clamp(10rem, 25vw, 13rem);
  background-size: cover;
  background-position: center;
  position: relative;
}

.tools-page #toolModal .tool-editor-preview__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 6, 16, 0.08), rgba(3, 6, 16, 0.74));
}

.tools-page #toolModal .tool-editor-preview__content {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.tools-page #toolModal .tool-editor-preview__title {
  margin: 0;
  font-family: "Orbitron", "Rajdhani", ui-sans-serif, sans-serif;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgb(var(--tool-title-rgb) / 1);
}

.tools-page #toolModal .tool-editor-preview__desc {
  margin: 0;
  color: rgb(var(--tool-desc-rgb) / 1);
  font-size: 14px;
  line-height: 1.35;
}

.tools-page #toolModal .tool-editor-preview__cta {
  margin-top: 2px;
  width: fit-content;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid rgb(var(--tool-accent2-rgb) / 0.62);
  background: linear-gradient(130deg, rgb(var(--tool-accent-rgb) / 0.24), rgb(var(--tool-accent2-rgb) / 0.18));
  color: #e8f7ff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 7px 12px;
}

.tools-page #toolModal .tool-editor-preview__games {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 1100px) {
  .tools-page #toolModal .tool-editor__grid {
    grid-template-columns: 1fr;
  }

  .tools-page #toolModal .tool-editor__form {
    order: 1;
  }

  .tools-page #toolModal .tool-editor__preview {
    order: 2;
  }
}

@media (max-width: 560px) {
  .tools-page #toolModal .tool-editor-color-grid {
    grid-template-columns: 1fr;
  }

  .tools-page #toolModal .tool-editor-games {
    grid-template-columns: 1fr;
  }
}

.tool-modal__preview {
  height: 176px;
  border-radius: 14px;
  border: 1px solid rgba(170, 186, 255, 0.28);
  background: rgba(0, 0, 0, 0.34) center / cover no-repeat;
}

@media (max-width: 1240px) {
  .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  .tools-showcase__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .tools-showcase__title {
    letter-spacing: 0.02em;
  }

  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 680px) {
  .tools-page .page {
    width: calc(100% - 22px);
  }

  .tools-showcase {
    padding-top: 18px;
  }

  .tools-showcase__lead {
    font-size: 18px;
  }

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

  .tool-card {
    min-height: 332px;
  }

  .tool-card__thumb {
    height: 168px;
  }

  .tools-page .modal__panel {
    width: calc(100% - 14px);
  }

  .tools-page #toolModal .tool-editor {
    width: calc(100vw - 0.625rem);
    max-height: 92vh;
  }

}

@media (prefers-reduced-motion: reduce) {
  .tool-card,
  .tool-card::before,
  .tool-card::after,
  .tool-card__thumb,
  .tool-card__cta span:last-child,
  .tools-showcase__admin-actions .btn,
  .tools-page .modal__foot .btn,
  .tools-page .modal__head .iconbtn {
    transition: none !important;
  }
}
