.ctxmenu {
  visibility: hidden;
  position: fixed;
  z-index: 10000;
  pointer-events: auto;
  min-width: 196px;
  max-width: min(280px, calc(100vw - 16px));
  padding: 10px 12px 12px;
  box-sizing: border-box;
  color: #e8f4ff;
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 600;
  pointer-events: auto;
  background:
    linear-gradient(180deg, rgba(0, 255, 255, 0.05) 0%, transparent 24%),
    linear-gradient(225deg, rgba(255, 0, 170, 0.06) 0%, transparent 40%),
    linear-gradient(135deg, rgba(8, 14, 28, 0.96) 0%, rgba(4, 8, 18, 0.98) 100%);
  border: 1px solid rgba(0, 255, 255, 0.24);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  box-shadow:
    0 0 0 1px rgba(255, 0, 128, 0.08),
    0 14px 36px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 28px rgba(0, 255, 255, 0.12);
}

.ctxmenu-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ctxmenu-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: rgba(0, 255, 255, 0.8);
  border-style: solid;
  filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.45));
}

.ctxmenu-corner-tl {
  top: 4px;
  left: 4px;
  border-width: 2px 0 0 2px;
}

.ctxmenu-corner-tr {
  top: 4px;
  right: 4px;
  border-width: 2px 2px 0 0;
}

.ctxmenu-corner-bl {
  bottom: 4px;
  left: 4px;
  border-width: 0 0 2px 2px;
}

.ctxmenu-corner-br {
  bottom: 4px;
  right: 4px;
  border-width: 0 2px 2px 0;
}

.ctxmenu-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 255, 0.02) 2px,
    rgba(0, 255, 255, 0.02) 4px
  );
  opacity: 0.65;
}

.ctxmenu-head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.18);
}

.ctxmenu-tag {
  font-family: "Orbitron", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0, 255, 255, 0.72);
}

.ctxmenu-head > h1 {
  margin: 0;
  padding: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e0ffff;
  line-height: 1.2;
  word-break: break-word;
}

.ctxmenu-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding: 0;
  margin: 0;
}

.ctxmenu-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(0, 255, 255, 0.28);
  border-radius: 0;
  color: #e0ffff;
  background: linear-gradient(135deg, rgba(0, 36, 52, 0.92), rgba(28, 0, 44, 0.92));
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  box-shadow:
    0 0 8px rgba(0, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ctxmenu-item:focus {
  outline: none;
}

.ctxmenu-item:hover:not(.disabled) {
  background: linear-gradient(135deg, rgba(0, 56, 72, 0.98), rgba(56, 0, 72, 0.98));
  border-color: rgba(255, 0, 180, 0.5);
  box-shadow:
    0 0 14px rgba(0, 255, 255, 0.28),
    0 0 8px rgba(255, 0, 128, 0.18);
}

.ctxmenu-item:active:not(.disabled) {
  background: linear-gradient(135deg, rgba(0, 24, 36, 0.98), rgba(16, 0, 28, 0.98));
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.35);
}

.ctxmenu-item--accent {
  border-color: rgba(0, 255, 255, 0.45);
  color: #b8ffff;
}

.ctxmenu-item--warn {
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
}

.ctxmenu-item--danger {
  border-color: rgba(248, 113, 113, 0.5);
  background: linear-gradient(135deg, rgba(52, 0, 16, 0.92), rgba(32, 0, 32, 0.92));
  color: #fecaca;
}

.ctxmenu-item--danger:hover:not(.disabled) {
  border-color: rgba(252, 165, 165, 0.7);
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.28);
}

.ctxmenu-item.disabled {
  background: rgba(24, 28, 36, 0.88);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.28);
  box-shadow: none;
  cursor: not-allowed;
}

.ctxmenu-item.disabled:hover {
  background: rgba(24, 28, 36, 0.88);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.ctxmenu-loading {
  padding: 8px 10px;
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 255, 255, 0.65);
  text-align: center;
}
