/*
 * Варианты блока «Бесплатные CS2 инструменты» (?tools=1…4).
 *
 * Общая часть — рамка карточки, фоновая сетка, уголки и типографика. Дальше четыре
 * оформления: 1 — плотная сетка, 2 — плитки с мини-превью результата, 3 — окно
 * превью плюс список строк, 4 — терминальная тема.
 *
 * Цвета берём те же, что в исходной вёрстке: #9bde00 (primary) по тёмному фону.
 */

.skt {
  --skt-primary: #9bde00;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background: linear-gradient(135deg, #0e0e11, #0c0c0e 45%, #0a0a0c);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .65);
}

/* Сетка на фоне: у левого края заметна, к правому гаснет — так блок перестаёт быть плоским. */
.skt-net {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity: .05;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 85%);
  mask-image: linear-gradient(90deg, #000, transparent 85%);
}
.skt-glow {
  position: absolute;
  right: -6rem;
  top: -8rem;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  background: rgba(155, 222, 0, .12);
  filter: blur(80px);
  pointer-events: none;
}
.skt-corner {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 1.5px solid rgba(155, 222, 0, .6);
  pointer-events: none;
}
.skt-corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0 }
.skt-corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0 }
.skt-corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0 }
.skt-corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0 }

/* ---- текстовая колонка -------------------------------------------------- */

.skt-side {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border-right: 1px solid rgba(255, 255, 255, .05);
}
.skt-kicker {
  color: rgba(155, 222, 0, .6);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
}
.skt-kicker b { color: rgba(155, 222, 0, .4) }
.skt-side h2 {
  margin: 12px 0 0;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.skt-side p {
  margin: 12px 0 0;
  max-width: 30ch;
  color: rgba(255, 255, 255, .5);
  font-size: 12px;
  line-height: 1.6;
}
.skt-cta {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  border: 1px solid rgba(155, 222, 0, .3);
  border-radius: 8px;
  padding: 9px 14px;
  background: rgba(155, 222, 0, .08);
  color: var(--skt-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color .2s, background .2s;
}
.skt-cta:hover { border-color: rgba(155, 222, 0, .6); background: rgba(155, 222, 0, .14) }
.skt-arrow { width: 14px; height: 14px; transition: transform .2s }
.skt-cta:hover .skt-arrow { transform: translateX(3px) }

/* ---- плитки ------------------------------------------------------------- */

.skt-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr) }
.skt-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px;
  border-right: 1px solid rgba(255, 255, 255, .05);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  color: inherit;
  text-decoration: none;
  transition: background .25s;
}
.skt-tile:nth-child(4n) { border-right: 0 }
.skt-tile:nth-child(n+5) { border-bottom: 0 }
.skt-tile:hover { background: rgba(255, 255, 255, .02) }
.skt-ico {
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(155, 222, 0, .25);
  border-radius: 9px;
  background: rgba(155, 222, 0, .06);
  color: var(--skt-primary);
  transition: transform .35s, border-color .35s, background .35s;
}
.skt-ico svg { width: 16px; height: 16px }
.skt-tile:hover .skt-ico { transform: translateY(-2px); border-color: rgba(155, 222, 0, .5); background: rgba(155, 222, 0, .12) }
.skt-tile b {
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.skt-tile i {
  color: rgba(255, 255, 255, .38);
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
}
.skt-no {
  position: absolute;
  right: 12px;
  top: 12px;
  color: rgba(255, 255, 255, .16);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .1em;
}

/* ---- вариант 1: плотная сетка ------------------------------------------- */

.skt1 { display: grid; grid-template-columns: 340px minmax(0, 1fr) }
.skt1 .skt-tile { min-height: 112px }

/* ---- вариант 2: плитки с мини-превью ------------------------------------ */

.skt2 { display: grid; grid-template-columns: 300px minmax(0, 1fr) }
.skt2 .skt-tile { min-height: 164px; padding-bottom: 14px }
.skt2 .skt-tile i { font-size: 10.5px }
.skt-art {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

/* Инвентарь: столбики подрастают при наведении, снизу сумма. */
.skt-bars { display: flex; align-items: flex-end; gap: 3px; height: 26px }
.skt-bars i {
  width: 6px;
  height: var(--h);
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, rgba(155, 222, 0, .85), rgba(155, 222, 0, .25));
  transform-origin: bottom;
  transform: scaleY(.55);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
  transition-delay: calc(var(--i) * 45ms);
}
.skt-tile:hover .skt-bars i, .skt-panel .skt-bars i { transform: scaleY(1) }
.skt-sum { color: var(--skt-primary); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums }
.skt-sum em { color: rgba(155, 222, 0, .55); font-style: normal; font-size: 11px }

/* Float: шкала износа с ползунком. */
.skt-scale {
  position: relative;
  display: block;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #4ade80, #9bde00 22%, #facc15 48%, #fb923c 72%, #ef4444);
  opacity: .8;
}
.skt-pin {
  position: absolute;
  top: -3px;
  left: 8%;
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, .8);
  transition: left .6s cubic-bezier(.22, 1, .36, 1);
}
.skt-tile:hover .skt-pin, .skt-panel .skt-pin { left: 62% }
.skt-line { display: flex; align-items: baseline; gap: 8px }
.skt-line b { color: #fff; font-family: var(--font-mono), ui-monospace, monospace; font-size: 12px; font-weight: 700 }
.skt-line em { color: rgba(255, 255, 255, .35); font-size: 10px; font-style: normal }

/* Fade: дуга, которая дорисовывается до 93%. */
.skt-arc { position: relative; display: block; width: 64px; height: 38px }
.skt-arc svg { width: 64px; height: 38px; fill: none }
.skt-arc-bg { stroke: rgba(255, 255, 255, .1); stroke-width: 5; stroke-linecap: round }
.skt-arc-fg {
  stroke: var(--skt-primary);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 82;
  stroke-dashoffset: 60;
  transition: stroke-dashoffset .7s cubic-bezier(.22, 1, .36, 1);
}
.skt-tile:hover .skt-arc-fg, .skt-panel .skt-arc-fg { stroke-dashoffset: 6 }
.skt-arc b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.skt-arc em { color: rgba(255, 255, 255, .45); font-size: 9px; font-style: normal }

/* Marble Fade: три цвета ножа. */
.skt-stripes { display: flex; gap: 3px; height: 22px }
.skt-stripes i { flex: 1; border-radius: 3px; transition: flex .45s cubic-bezier(.22, 1, .36, 1) }
.skt-stripes i:nth-child(1) { background: linear-gradient(180deg, #ff5f5f, #b91c1c) }
.skt-stripes i:nth-child(2) { background: linear-gradient(180deg, #60a5fa, #1d4ed8) }
.skt-stripes i:nth-child(3) { background: linear-gradient(180deg, #fde047, #ca8a04) }
.skt-tile:hover .skt-stripes i:nth-child(2), .skt-panel .skt-stripes i:nth-child(2) { flex: 2.2 }
.skt-cap {
  color: rgba(255, 255, 255, .35);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 9.5px;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Doppler: четыре фазы, выбранная подсвечивается. */
.skt-chips { display: flex; gap: 4px }
.skt-chips i {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 5px;
  padding: 4px 0;
  background: rgba(255, 255, 255, .02);
  color: rgba(255, 255, 255, .4);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  text-align: center;
  transition: border-color .3s, background .3s, color .3s;
}
.skt-chips i.on { border-color: rgba(155, 222, 0, .5); background: rgba(155, 222, 0, .12); color: var(--skt-primary) }

/* Паттерн: решётка ячеек, найденная мигает. */
.skt-cells { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px }
.skt-cells i { height: 8px; border-radius: 2px; background: rgba(255, 255, 255, .07) }
.skt-cells i.on { background: var(--skt-primary); box-shadow: 0 0 10px rgba(155, 222, 0, .6) }
.skt-tile:hover .skt-cells i.on, .skt-panel .skt-cells i.on { animation: skt-blink 1.1s ease-in-out infinite }
@keyframes skt-blink { 50% { opacity: .35 } }

/* SteamID: число собирается по четвёркам. */
.skt-id { display: flex; gap: 4px }
.skt-id b {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 4px;
  padding: 3px 5px;
  background: rgba(255, 255, 255, .02);
  color: rgba(255, 255, 255, .75);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
}

/* Trade-Up: десять входов и один выход. */
.skt-trade { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding-right: 30px }
.skt-trade i { height: 10px; border-radius: 2px; background: rgba(255, 255, 255, .08) }
.skt-trade u {
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: rgba(155, 222, 0, .5);
  transform: translateY(-50%);
}
.skt-trade b {
  position: absolute;
  right: 0;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--skt-primary);
  box-shadow: 0 0 12px rgba(155, 222, 0, .5);
  transform: translateY(-50%);
}

/* ---- вариант 3: окно превью + список ------------------------------------ */

.skt3 { display: grid; grid-template-columns: minmax(0, 1fr) 420px }
.skt-stage { position: relative; display: flex; align-items: center; padding: 26px; border-right: 1px solid rgba(255, 255, 255, .05) }
.skt-win {
  position: relative;
  display: block;
  width: 100%;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: #0b0b0e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.skt-win-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .02);
}
.skt-win-bar i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .14) }
.skt-win-bar i:first-child { background: rgba(155, 222, 0, .5) }
.skt-win-bar em {
  margin-left: 6px;
  color: rgba(255, 255, 255, .3);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 10px;
  font-style: normal;
  letter-spacing: .08em;
}
/* Панели лежат стопкой; показывается та, чья строка под курсором. */
.skt-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 35px;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 24px 28px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s, transform .35s;
  pointer-events: none;
}
.skt3:not(:has(.skt-row:hover)) .skt-panel.p0,
.skt3:has(.skt-row.r0:hover) .skt-panel.p0,
.skt3:has(.skt-row.r1:hover) .skt-panel.p1,
.skt3:has(.skt-row.r2:hover) .skt-panel.p2,
.skt3:has(.skt-row.r3:hover) .skt-panel.p3,
.skt3:has(.skt-row.r4:hover) .skt-panel.p4,
.skt3:has(.skt-row.r5:hover) .skt-panel.p5,
.skt3:has(.skt-row.r6:hover) .skt-panel.p6,
.skt3:has(.skt-row.r7:hover) .skt-panel.p7 { opacity: 1; transform: none }
.skt-panel-head { display: flex; align-items: center; gap: 10px }
.skt-panel-head b { color: #fff; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em }
.skt-panel-art { display: flex; flex-direction: column; gap: 10px; max-width: 320px }
.skt-panel-art .skt-bars { height: 54px }
.skt-panel-art .skt-bars i { width: 12px }
.skt-panel-art .skt-sum { font-size: 20px }
.skt-panel-art .skt-arc, .skt-panel-art .skt-arc svg { width: 112px; height: 66px }
.skt-panel-art .skt-arc b { font-size: 20px }
.skt-panel-art .skt-stripes { height: 40px }
.skt-panel-art .skt-cells i { height: 14px }
.skt-panel-art .skt-chips i { padding: 7px 0; font-size: 11px }
.skt-panel-art .skt-id b { font-size: 13px; padding: 5px 7px }
.skt-panel-art .skt-trade i { height: 16px }

.skt-menu { display: flex; flex-direction: column }
.skt-menu-head { padding: 22px 24px 16px; border-bottom: 1px solid rgba(255, 255, 255, .05) }
.skt-menu-head h2 {
  margin: 10px 0 0;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}
.skt-menu-head .skt-cta { margin-top: 14px }
.skt-rows { display: flex; flex: 1; flex-direction: column }
.skt-row {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 7px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  color: inherit;
  text-decoration: none;
  transition: background .25s, padding-left .25s;
}
.skt-row:last-child { border-bottom: 0 }
.skt-row:hover { background: rgba(155, 222, 0, .05); padding-left: 28px }
.skt-row .skt-ico { width: 30px; height: 30px; flex: none }
.skt-row .skt-ico svg { width: 14px; height: 14px }
.skt-row-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px }
.skt-row-copy b { color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em }
.skt-row-copy i { color: rgba(255, 255, 255, .35); font-size: 10.5px; font-style: normal }
.skt-row .skt-arrow { width: 14px; height: 14px; color: rgba(255, 255, 255, .2); transition: color .25s, transform .25s }
.skt-row:hover .skt-arrow { color: var(--skt-primary); transform: translateX(3px) }

/* ---- вариант 4: терминал ------------------------------------------------ */

.skt4 { display: grid; grid-template-columns: 340px minmax(0, 1fr) }
.skt4 .skt-net { opacity: .07 }
.skt4 .skt-tile { min-height: 118px; overflow: hidden }
.skt-cmd {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, .55);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .04em;
}
.skt-cmd b { color: var(--skt-primary); font-weight: 700 }
.skt-caret {
  width: 7px;
  height: 13px;
  background: var(--skt-primary);
  animation: skt-caret 1.1s steps(1) infinite;
}
@keyframes skt-caret { 50% { opacity: 0 } }
.skt4 .skt-no { color: rgba(155, 222, 0, .35) }
.skt4 .skt-tile b { font-family: var(--font-mono), ui-monospace, monospace; font-size: 12px; letter-spacing: .04em }
/* Сканлайн: при наведении по плитке сверху вниз проходит зелёная полоса. */
.skt-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(155, 222, 0, .8), transparent);
  opacity: 0;
  pointer-events: none;
}
.skt4 .skt-tile:hover .skt-scan { animation: skt-scan 1.1s linear infinite }
@keyframes skt-scan {
  0% { opacity: 0; transform: translateY(0) }
  12% { opacity: 1 }
  88% { opacity: 1 }
  100% { opacity: 0; transform: translateY(118px) }
}
.skt4 .skt-tile:hover { background: rgba(155, 222, 0, .04) }

/* На тач-экранах наведения не будет никогда — показываем превью сразу в конечном
   состоянии, иначе столбики и дуга так и останутся недорисованными. */
@media (hover: none) {
  .skt-bars i { transform: scaleY(1) }
  .skt-pin { left: 62% }
  .skt-arc-fg { stroke-dashoffset: 6 }
  .skt-stripes i:nth-child(2) { flex: 2.2 }
  .skt-cells i.on { animation: skt-blink 1.1s ease-in-out infinite }
}

/* ---- адаптив ------------------------------------------------------------ */

@media (max-width: 1100px) {
  .skt1, .skt2, .skt3, .skt4 { grid-template-columns: 1fr }
  .skt-side, .skt-stage { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .05) }
  .skt3 .skt-menu-head { border-top: 0 }
}
@media (max-width: 760px) {
  .skt-grid { grid-template-columns: repeat(2, 1fr) }
  .skt-tile:nth-child(4n) { border-right: 1px solid rgba(255, 255, 255, .05) }
  .skt-tile:nth-child(2n) { border-right: 0 }
  .skt-tile:nth-child(n+5) { border-bottom: 1px solid rgba(255, 255, 255, .05) }
  .skt-tile:nth-child(n+7) { border-bottom: 0 }
  .skt-side { padding: 22px 18px }
  .skt-side h2 { font-size: 23px }
  /* Наведения на телефоне нет, и окно превью показывает один статичный инструмент:
     отдаём ему меньше места, список строк важнее. */
  .skt-win { min-height: 186px }
  .skt-stage { padding: 16px }
  .skt-panel { gap: 10px; padding: 14px 18px }
  .skt-panel-art .skt-bars { height: 40px }
  .skt-panel-art .skt-sum { font-size: 17px }
}
